diff options
author | m0rpher <cryptomorpher@gmail.com> | 2020-05-08 22:56:37 +0200 |
---|---|---|
committer | m0rpher <cryptomorpher@gmail.com> | 2020-05-08 22:56:37 +0200 |
commit | 115eb450839f1ecc86ffe03768a59637986a6c83 (patch) | |
tree | 9740f4a1dc550ddc3a7d7dc3755a38ca4fc38180 | |
parent | 0d78c2a120823fef7aa67d02401087533b3fd4c8 (diff) | |
download | BIP39-115eb450839f1ecc86ffe03768a59637986a6c83.tar.gz BIP39-115eb450839f1ecc86ffe03768a59637986a6c83.tar.zst BIP39-115eb450839f1ecc86ffe03768a59637986a6c83.zip |
adding CRP support
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 11 | ||||
-rw-r--r-- | src/js/index.js | 8 | ||||
-rw-r--r-- | src/js/segwit-parameters.js | 30 |
3 files changed, 49 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 2792e13..37678c2 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -581,6 +581,17 @@ libs.bitcoin.networks.cannacoin = { | |||
581 | wif: 0x9c, | 581 | wif: 0x9c, |
582 | }; | 582 | }; |
583 | 583 | ||
584 | libs.bitcoin.networks.cranepay = { | ||
585 | messagePrefix: '\x18Bitcoin Signed Message:\n', | ||
586 | bip32: { | ||
587 | public: 0x0488b21e, | ||
588 | private: 0x0488ade4 | ||
589 | }, | ||
590 | pubKeyHash: 28, | ||
591 | scriptHash: 10, | ||
592 | wif: 123, | ||
593 | }; | ||
594 | |||
584 | libs.bitcoin.networks.cryptoescudo = { | 595 | libs.bitcoin.networks.cryptoescudo = { |
585 | messagePrefix: '\x18Cryptoescudo Signed Message:\n', | 596 | messagePrefix: '\x18Cryptoescudo Signed Message:\n', |
586 | bip32: { | 597 | bip32: { |
diff --git a/src/js/index.js b/src/js/index.js index f00d90b..009a320 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -2286,6 +2286,14 @@ | |||
2286 | }, | 2286 | }, |
2287 | }, | 2287 | }, |
2288 | { | 2288 | { |
2289 | name: "CRP - CranePay", | ||
2290 | onSelect: function() { | ||
2291 | network = libs.bitcoin.networks.cranepay; | ||
2292 | setHdCoin(2304); | ||
2293 | }, | ||
2294 | }, | ||
2295 | |||
2296 | { | ||
2289 | name: "CRW - Crown (Legacy)", | 2297 | name: "CRW - Crown (Legacy)", |
2290 | onSelect: function() { | 2298 | onSelect: function() { |
2291 | network = libs.bitcoin.networks.crown; | 2299 | network = libs.bitcoin.networks.crown; |
diff --git a/src/js/segwit-parameters.js b/src/js/segwit-parameters.js index ea6f86e..997a0f8 100644 --- a/src/js/segwit-parameters.js +++ b/src/js/segwit-parameters.js | |||
@@ -163,6 +163,36 @@ libs.bitcoin.networks.regtest.p2wshInP2sh = { | |||
163 | scriptHash: 0xc4, | 163 | scriptHash: 0xc4, |
164 | wif: 0xef | 164 | wif: 0xef |
165 | }; | 165 | }; |
166 | |||
167 | libs.bitcoin.networks.cranepay.p2wpkhInP2sh = { | ||
168 | baseNetwork: "cranepay", | ||
169 | messagePrefix: '\x18Bitcoin Signed Message:\n', | ||
170 | bech32: 'cp', | ||
171 | bip32: { | ||
172 | public: 0x049d7cb2, | ||
173 | private: 0x049d7878 | ||
174 | }, | ||
175 | pubKeyHash: 28, | ||
176 | scriptHash: 10, | ||
177 | wif: 123 | ||
178 | }; | ||
179 | |||
180 | // bech32 | ||
181 | libs.bitcoin.networks.cranepay.p2wpkh = { | ||
182 | baseNetwork: "cranepay", | ||
183 | messagePrefix: '\x18Bitcoin Signed Message:\n', | ||
184 | bech32: 'cp', | ||
185 | bip32: { | ||
186 | public: 0x04b24746, | ||
187 | private: 0x04b2430c | ||
188 | }, | ||
189 | pubKeyHash: 28, | ||
190 | scriptHash: 10, | ||
191 | wif: 123 | ||
192 | }; | ||
193 | |||
194 | |||
195 | |||
166 | 196 | ||
167 | libs.bitcoin.networks.litecoin.p2wpkh = { | 197 | libs.bitcoin.networks.litecoin.p2wpkh = { |
168 | baseNetwork: "litecoin", | 198 | baseNetwork: "litecoin", |