mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-05-21 08:05:03 +00:00
Merge pull request #27 from dangershony/master
Adding DASH and fixing the root key network bug
This commit is contained in:
+19
-1
@@ -13353,6 +13353,17 @@ bitcoin.networks.clam = {
|
|||||||
pubKeyHash: 0x89,
|
pubKeyHash: 0x89,
|
||||||
wif: 0x85,
|
wif: 0x85,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bitcoin.networks.dash = {
|
||||||
|
bip32: {
|
||||||
|
public: 0x0488b21e,
|
||||||
|
private: 0x0488ade4
|
||||||
|
},
|
||||||
|
pubKeyHash: 0x4c,
|
||||||
|
scriptHash: 0x10,
|
||||||
|
wif: 0xcc,
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script>// Select components from sjcl to suit the crypto operations bip39 requires.
|
<script>// Select components from sjcl to suit the crypto operations bip39 requires.
|
||||||
|
|
||||||
@@ -15041,7 +15052,7 @@ var Mnemonic = function(language) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function calcBip32RootKeyFromBase58(rootKeyBase58) {
|
function calcBip32RootKeyFromBase58(rootKeyBase58) {
|
||||||
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58);
|
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58, network);
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcBip32ExtendedKey(path) {
|
function calcBip32ExtendedKey(path) {
|
||||||
@@ -15414,6 +15425,13 @@ var Mnemonic = function(language) {
|
|||||||
DOM.bip44coin.val(23);
|
DOM.bip44coin.val(23);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "DASH",
|
||||||
|
onSelect: function() {
|
||||||
|
network = bitcoin.networks.dash;
|
||||||
|
DOM.bip44coin.val(5);
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|||||||
@@ -34,3 +34,14 @@ bitcoin.networks.clam = {
|
|||||||
pubKeyHash: 0x89,
|
pubKeyHash: 0x89,
|
||||||
wif: 0x85,
|
wif: 0x85,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bitcoin.networks.dash = {
|
||||||
|
bip32: {
|
||||||
|
public: 0x0488b21e,
|
||||||
|
private: 0x0488ade4
|
||||||
|
},
|
||||||
|
pubKeyHash: 0x4c,
|
||||||
|
scriptHash: 0x10,
|
||||||
|
wif: 0xcc,
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -207,7 +207,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function calcBip32RootKeyFromBase58(rootKeyBase58) {
|
function calcBip32RootKeyFromBase58(rootKeyBase58) {
|
||||||
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58);
|
bip32RootKey = bitcoin.HDNode.fromBase58(rootKeyBase58, network);
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcBip32ExtendedKey(path) {
|
function calcBip32ExtendedKey(path) {
|
||||||
@@ -580,6 +580,13 @@
|
|||||||
DOM.bip44coin.val(23);
|
DOM.bip44coin.val(23);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "DASH",
|
||||||
|
onSelect: function() {
|
||||||
|
network = bitcoin.networks.dash;
|
||||||
|
DOM.bip44coin.val(5);
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|||||||
Reference in New Issue
Block a user