aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bip39-standalone.html20
-rw-r--r--src/js/bitcoinjs-extensions.js11
-rw-r--r--src/js/index.js9
3 files changed, 38 insertions, 2 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html
index 5f9cf7c..9b3c4f1 100644
--- a/bip39-standalone.html
+++ b/bip39-standalone.html
@@ -13353,6 +13353,17 @@ bitcoin.networks.clam = {
13353 pubKeyHash: 0x89, 13353 pubKeyHash: 0x89,
13354 wif: 0x85, 13354 wif: 0x85,
13355}; 13355};
13356
13357bitcoin.networks.dash = {
13358 bip32: {
13359 public: 0x0488b21e,
13360 private: 0x0488ade4
13361 },
13362 pubKeyHash: 0x4c,
13363 scriptHash: 0x10,
13364 wif: 0xcc,
13365};
13366
13356</script> 13367</script>
13357 <script>// Select components from sjcl to suit the crypto operations bip39 requires. 13368 <script>// Select components from sjcl to suit the crypto operations bip39 requires.
13358 13369
@@ -15041,7 +15052,7 @@ var Mnemonic = function(language) {
15041 } 15052 }
15042 15053
15043 function calcBip32RootKeyFromBase58(rootKeyBase58) { 15054 function calcBip32RootKeyFromBase58(rootKeyBase58) {
15044 bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58); 15055 bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58, network);
15045 } 15056 }
15046 15057
15047 function calcBip32ExtendedKey(path) { 15058 function calcBip32ExtendedKey(path) {
@@ -15414,6 +15425,13 @@ var Mnemonic = function(language) {
15414 DOM.bip44coin.val(23); 15425 DOM.bip44coin.val(23);
15415 }, 15426 },
15416 }, 15427 },
15428 {
15429 name: "DASH",
15430 onSelect: function() {
15431 network = bitcoin.networks.dash;
15432 DOM.bip44coin.val(5);
15433 },
15434 },
15417 ] 15435 ]
15418 15436
15419 init(); 15437 init();
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index a7ca2ec..9f11de8 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -34,3 +34,14 @@ bitcoin.networks.clam = {
34 pubKeyHash: 0x89, 34 pubKeyHash: 0x89,
35 wif: 0x85, 35 wif: 0x85,
36}; 36};
37
38bitcoin.networks.dash = {
39 bip32: {
40 public: 0x0488b21e,
41 private: 0x0488ade4
42 },
43 pubKeyHash: 0x4c,
44 scriptHash: 0x10,
45 wif: 0xcc,
46};
47
diff --git a/src/js/index.js b/src/js/index.js
index 8f7d658..5cd09b6 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -207,7 +207,7 @@
207 } 207 }
208 208
209 function calcBip32RootKeyFromBase58(rootKeyBase58) { 209 function calcBip32RootKeyFromBase58(rootKeyBase58) {
210 bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58); 210 bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58, network);
211 } 211 }
212 212
213 function calcBip32ExtendedKey(path) { 213 function calcBip32ExtendedKey(path) {
@@ -580,6 +580,13 @@
580 DOM.bip44coin.val(23); 580 DOM.bip44coin.val(23);
581 }, 581 },
582 }, 582 },
583 {
584 name: "DASH",
585 onSelect: function() {
586 network = bitcoin.networks.dash;
587 DOM.bip44coin.val(5);
588 },
589 },
583 ] 590 ]
584 591
585 init(); 592 init();