mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-05-22 16:44:48 +00:00
added Thought network spec
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
# 0.3.13
|
||||||
|
|
||||||
|
* Add Thought network
|
||||||
|
|
||||||
# 0.3.12
|
# 0.3.12
|
||||||
|
|
||||||
* Fix typos
|
* Fix typos
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<h1 class="text-center">Mnemonic Code Converter</h1>
|
<h1 class="text-center">Mnemonic Code Converter</h1>
|
||||||
<p class="version">v0.3.12</p>
|
<p class="version">v0.3.13</p>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|||||||
@@ -1716,3 +1716,14 @@ bitcoinjs.bitcoin.networks.aryacoin = {
|
|||||||
scriptHash: 0x6f,
|
scriptHash: 0x6f,
|
||||||
wif: 0x97
|
wif: 0x97
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bitcoinjs.bitcoin.networks.thought = {
|
||||||
|
messagePrefix: 'unused',
|
||||||
|
bip32: {
|
||||||
|
public: 0xFbC6A00D,
|
||||||
|
private: 0x5AEBD8C6
|
||||||
|
},
|
||||||
|
pubKeyHash: 0x07,
|
||||||
|
scriptHash: 0x09,
|
||||||
|
wif: 0x7B
|
||||||
|
};
|
||||||
|
|||||||
+11
-4
@@ -637,9 +637,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validateRootKey(rootKeyBase58) {
|
function validateRootKey(rootKeyBase58) {
|
||||||
if(isGRS())
|
if(isGRS())
|
||||||
return validateRootKeyGRS(rootKeyBase58);
|
return validateRootKeyGRS(rootKeyBase58);
|
||||||
|
|
||||||
// try various segwit network params since this extended key may be from
|
// try various segwit network params since this extended key may be from
|
||||||
// any one of them.
|
// any one of them.
|
||||||
if (networkHasSegwit()) {
|
if (networkHasSegwit()) {
|
||||||
@@ -991,7 +991,7 @@
|
|||||||
privkey = keyPair.toWIF();
|
privkey = keyPair.toWIF();
|
||||||
// BIP38 encode private key if required
|
// BIP38 encode private key if required
|
||||||
if (useBip38) {
|
if (useBip38) {
|
||||||
if(isGRS())
|
if(isGRS())
|
||||||
privkey = groestlcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) {
|
privkey = groestlcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) {
|
||||||
console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index);
|
console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index);
|
||||||
}, null, networks[DOM.network.val()].name.includes("Testnet"));
|
}, null, networks[DOM.network.val()].name.includes("Testnet"));
|
||||||
@@ -1121,7 +1121,7 @@
|
|||||||
else if (isP2wpkhInP2sh) {
|
else if (isP2wpkhInP2sh) {
|
||||||
address = groestlcoinjs.address.fromOutputScript(scriptpubkey, network)
|
address = groestlcoinjs.address.fromOutputScript(scriptpubkey, network)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//non-segwit addresses are handled by using groestlcoinjs for bip32RootKey
|
//non-segwit addresses are handled by using groestlcoinjs for bip32RootKey
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2840,6 +2840,13 @@
|
|||||||
setHdCoin(113);
|
setHdCoin(113);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "THT - Thought",
|
||||||
|
onSelect: function() {
|
||||||
|
network = bitcoinjs.bitcoin.networks.thought;
|
||||||
|
setHdCoin(1618);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "TOA - Toa",
|
name: "TOA - Toa",
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user