Merge pull request #27 from dangershony/master

Adding DASH and fixing the root key network bug
This commit is contained in:
iancoleman
2016-08-25 07:59:39 +10:00
committed by GitHub
3 changed files with 38 additions and 2 deletions
+19 -1
View File
@@ -13353,6 +13353,17 @@ bitcoin.networks.clam = {
pubKeyHash: 0x89,
wif: 0x85,
};
bitcoin.networks.dash = {
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x4c,
scriptHash: 0x10,
wif: 0xcc,
};
</script>
<script>// Select components from sjcl to suit the crypto operations bip39 requires.
@@ -15041,7 +15052,7 @@ var Mnemonic = function(language) {
}
function calcBip32RootKeyFromBase58(rootKeyBase58) {
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58);
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58, network);
}
function calcBip32ExtendedKey(path) {
@@ -15414,6 +15425,13 @@ var Mnemonic = function(language) {
DOM.bip44coin.val(23);
},
},
{
name: "DASH",
onSelect: function() {
network = bitcoin.networks.dash;
DOM.bip44coin.val(5);
},
},
]
init();
+11
View File
@@ -34,3 +34,14 @@ bitcoin.networks.clam = {
pubKeyHash: 0x89,
wif: 0x85,
};
bitcoin.networks.dash = {
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x4c,
scriptHash: 0x10,
wif: 0xcc,
};
+8 -1
View File
@@ -207,7 +207,7 @@
}
function calcBip32RootKeyFromBase58(rootKeyBase58) {
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58);
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58, network);
}
function calcBip32ExtendedKey(path) {
@@ -580,6 +580,13 @@
DOM.bip44coin.val(23);
},
},
{
name: "DASH",
onSelect: function() {
network = bitcoin.networks.dash;
DOM.bip44coin.val(5);
},
},
]
init();