aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorm0rpher <cryptomorpher@gmail.com>2020-05-08 22:56:37 +0200
committerm0rpher <cryptomorpher@gmail.com>2020-05-08 22:56:37 +0200
commit115eb450839f1ecc86ffe03768a59637986a6c83 (patch)
tree9740f4a1dc550ddc3a7d7dc3755a38ca4fc38180 /src/js
parent0d78c2a120823fef7aa67d02401087533b3fd4c8 (diff)
downloadBIP39-115eb450839f1ecc86ffe03768a59637986a6c83.tar.gz
BIP39-115eb450839f1ecc86ffe03768a59637986a6c83.tar.zst
BIP39-115eb450839f1ecc86ffe03768a59637986a6c83.zip
adding CRP support
Diffstat (limited to 'src/js')
-rw-r--r--src/js/bitcoinjs-extensions.js11
-rw-r--r--src/js/index.js8
-rw-r--r--src/js/segwit-parameters.js30
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
584libs.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
584libs.bitcoin.networks.cryptoescudo = { 595libs.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
167libs.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
181libs.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
167libs.bitcoin.networks.litecoin.p2wpkh = { 197libs.bitcoin.networks.litecoin.p2wpkh = {
168 baseNetwork: "litecoin", 198 baseNetwork: "litecoin",