mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-17 16:02:16 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ff30babbc | ||
|
|
ee0981f1ec | ||
|
|
6024e655a8 | ||
|
|
7e6bdc498e | ||
|
|
16b4c2788a | ||
|
|
0197de2795 | ||
|
|
861750ae51 | ||
|
|
a40d59d904 | ||
|
|
d933c3f731 | ||
|
|
408ecc184a | ||
|
|
00114002fe | ||
|
|
e80955983d | ||
|
|
f20b7e7128 | ||
|
|
908dc06fe8 | ||
|
|
3d548c6f9b | ||
|
|
0a8d06d03e | ||
|
|
88311463c7 | ||
|
|
cd7c8327b1 | ||
|
|
0cda44d5f6 | ||
|
|
7258b102c1 |
@@ -118,7 +118,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.2.4</p>
|
<p class="version">v0.2.6</p>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -167,7 +167,14 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
|
<label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards" data-translate-placeholder></textarea>
|
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards" data-translate-placeholder></textarea>
|
||||||
|
<div class="row filter-warning text-danger hidden">
|
||||||
|
<p class="col-sm-12">
|
||||||
|
<strong>
|
||||||
|
Some characters have been discarded
|
||||||
|
</strong>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label>
|
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label>
|
||||||
<div class="crack-time col-sm-3 form-control-static"></div>
|
<div class="crack-time col-sm-3 form-control-static"></div>
|
||||||
@@ -412,6 +419,13 @@
|
|||||||
<span data-translate>Use hardened addresses</span>
|
<span data-translate>Use hardened addresses</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-2"></div>
|
||||||
|
<label class="col-sm-10">
|
||||||
|
<input class="p2wpkh-nested-in-p2sh" type="checkbox">
|
||||||
|
<span data-translate>Use SegWit addresses (ie P2WPKH Nested In P2SH)</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="core-path" class="col-sm-2 control-label" data-translate>Bitcoin Core</label>
|
<label for="core-path" class="col-sm-2 control-label" data-translate>Bitcoin Core</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
@@ -630,6 +644,11 @@
|
|||||||
Read more at the
|
Read more at the
|
||||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
|
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
|
||||||
</p>
|
</p>
|
||||||
|
<h3>BIP49 <span class="small" data-translate>Derivation scheme for P2WPKH-nested-in-P2SH based accounts</span></h3>
|
||||||
|
<p data-translate-html>
|
||||||
|
Read more at the
|
||||||
|
<a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a>
|
||||||
|
</p>
|
||||||
<h3 data-translate>Private Keys</h3>
|
<h3 data-translate>Private Keys</h3>
|
||||||
<p>
|
<p>
|
||||||
<span data-translate-html>
|
<span data-translate-html>
|
||||||
@@ -7280,7 +7299,7 @@ this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(
|
|||||||
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
||||||
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
||||||
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
||||||
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
correctLevel:3,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||||
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
||||||
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
|
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
|
||||||
</script>
|
</script>
|
||||||
@@ -22126,135 +22145,135 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>bitcoinjs.bitcoin.networks.shadow = {
|
<script>bitcoinjs.bitcoin.networks.shadow = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0xEE80286A,
|
public: 0xEE80286A,
|
||||||
private: 0xEE8031E8
|
private: 0xEE8031E8
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x3f,
|
pubKeyHash: 0x3f,
|
||||||
scriptHash: 0x7d,
|
scriptHash: 0x7d,
|
||||||
wif: 0xbf,
|
wif: 0xbf
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.shadowtn = {
|
bitcoinjs.bitcoin.networks.shadowtn = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x76C0FDFB,
|
public: 0x76C0FDFB,
|
||||||
private: 0x76C1077A
|
private: 0x76C1077A
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x7f,
|
pubKeyHash: 0x7f,
|
||||||
scriptHash: 0xc4,
|
scriptHash: 0xc4,
|
||||||
wif: 0xff,
|
wif: 0xff
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.clam = {
|
bitcoinjs.bitcoin.networks.clam = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0xa8c26d64,
|
public: 0xa8c26d64,
|
||||||
private: 0xa8c17826
|
private: 0xa8c17826
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x89,
|
pubKeyHash: 0x89,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0x85,
|
wif: 0x85
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.crown = {
|
bitcoinjs.bitcoin.networks.crown = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x00,
|
pubKeyHash: 0x00,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0x80,
|
wif: 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.dash = {
|
bitcoinjs.bitcoin.networks.dash = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x4c,
|
pubKeyHash: 0x4c,
|
||||||
scriptHash: 0x10,
|
scriptHash: 0x10,
|
||||||
wif: 0xcc,
|
wif: 0xcc
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.maza = {
|
bitcoinjs.bitcoin.networks.maza = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x32,
|
pubKeyHash: 0x32,
|
||||||
scriptHash: 0x09,
|
scriptHash: 0x09,
|
||||||
wif: 0xe0,
|
wif: 0xe0
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.dashtn = {
|
bitcoinjs.bitcoin.networks.dashtn = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x043587cf,
|
public: 0x043587cf,
|
||||||
private: 0x04358394
|
private: 0x04358394
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x8c,
|
pubKeyHash: 0x8c,
|
||||||
scriptHash: 0x13,
|
scriptHash: 0x13,
|
||||||
wif: 0xef,
|
wif: 0xef
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.game = {
|
bitcoinjs.bitcoin.networks.game = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x26,
|
pubKeyHash: 0x26,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0xa6,
|
wif: 0xa6
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.namecoin = {
|
bitcoinjs.bitcoin.networks.namecoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x34,
|
pubKeyHash: 0x34,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0x80,
|
wif: 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.peercoin = {
|
bitcoinjs.bitcoin.networks.peercoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x37,
|
pubKeyHash: 0x37,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0xb7,
|
wif: 0xb7
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.slimcoin = {
|
bitcoinjs.bitcoin.networks.slimcoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0xef6adf10,
|
public: 0xef6adf10,
|
||||||
private: 0xef69ea80
|
private: 0xef69ea80
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x3f,
|
pubKeyHash: 0x3f,
|
||||||
scriptHash: 0x7d,
|
scriptHash: 0x7d,
|
||||||
wif: 0x46,
|
wif: 0x46
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.slimcointn = {
|
bitcoinjs.bitcoin.networks.slimcointn = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x043587CF,
|
public: 0x043587CF,
|
||||||
private: 0x04358394
|
private: 0x04358394
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x6f,
|
pubKeyHash: 0x6f,
|
||||||
scriptHash: 0xc4,
|
scriptHash: 0xc4,
|
||||||
wif: 0x57,
|
wif: 0x57
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.dogecoin = {
|
bitcoinjs.bitcoin.networks.dogecoin = {
|
||||||
@@ -22265,8 +22284,8 @@ bitcoinjs.bitcoin.networks.dogecoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x1e,
|
pubKeyHash: 0x1e,
|
||||||
scriptHash: 0x16,
|
scriptHash: 0x16,
|
||||||
wif: 0x9e,
|
wif: 0x9e
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.viacoin = {
|
bitcoinjs.bitcoin.networks.viacoin = {
|
||||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||||
@@ -22276,8 +22295,8 @@ bitcoinjs.bitcoin.networks.viacoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x47,
|
pubKeyHash: 0x47,
|
||||||
scriptHash: 0x21,
|
scriptHash: 0x21,
|
||||||
wif: 0xc7,
|
wif: 0xc7
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.viacointestnet = {
|
bitcoinjs.bitcoin.networks.viacointestnet = {
|
||||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||||
@@ -22287,8 +22306,8 @@ bitcoinjs.bitcoin.networks.viacointestnet = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x7f,
|
pubKeyHash: 0x7f,
|
||||||
scriptHash: 0xc4,
|
scriptHash: 0xc4,
|
||||||
wif: 0xff,
|
wif: 0xff
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.gamerscoin = {
|
bitcoinjs.bitcoin.networks.gamerscoin = {
|
||||||
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
||||||
@@ -22298,8 +22317,8 @@ bitcoinjs.bitcoin.networks.gamerscoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x26,
|
pubKeyHash: 0x26,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0xA6,
|
wif: 0xA6
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.jumbucks = {
|
bitcoinjs.bitcoin.networks.jumbucks = {
|
||||||
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
||||||
@@ -22309,8 +22328,8 @@ bitcoinjs.bitcoin.networks.jumbucks = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x2b,
|
pubKeyHash: 0x2b,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0xab,
|
wif: 0xab
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.zetacoin = {
|
bitcoinjs.bitcoin.networks.zetacoin = {
|
||||||
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
||||||
@@ -22320,40 +22339,40 @@ bitcoinjs.bitcoin.networks.zetacoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x50,
|
pubKeyHash: 0x50,
|
||||||
scriptHash: 0x09,
|
scriptHash: 0x09,
|
||||||
wif: 0xe0,
|
wif: 0xe0
|
||||||
}
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.myriadcoin = {
|
bitcoinjs.bitcoin.networks.myriadcoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x32,
|
pubKeyHash: 0x32,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0xb2,
|
wif: 0xb2
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.pivx = {
|
bitcoinjs.bitcoin.networks.pivx = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x022d2533,
|
public: 0x022d2533,
|
||||||
private: 0x0221312b
|
private: 0x0221312b
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x1e,
|
pubKeyHash: 0x1e,
|
||||||
scriptHash: 0x0d,
|
scriptHash: 0x0d,
|
||||||
wif: 0xd4,
|
wif: 0xd4
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.pivxtestnet = {
|
bitcoinjs.bitcoin.networks.pivxtestnet = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x3a8061a0,
|
public: 0x3a8061a0,
|
||||||
private: 0x3a805837
|
private: 0x3a805837
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x8b,
|
pubKeyHash: 0x8b,
|
||||||
scriptHash: 0x13,
|
scriptHash: 0x13,
|
||||||
wif: 0xef,
|
wif: 0xef
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script>(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ethUtil = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
<script>(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ethUtil = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||||
@@ -45767,7 +45786,7 @@ var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o
|
|||||||
|
|
||||||
},{}]},{},[4])(4)
|
},{}]},{},[4])(4)
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=zxcvbn.js.map
|
|
||||||
</script>
|
</script>
|
||||||
<script>/*
|
<script>/*
|
||||||
* Detects entropy from a string.
|
* Detects entropy from a string.
|
||||||
@@ -46155,6 +46174,7 @@ window.Entropy = new (function() {
|
|||||||
DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
|
DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
|
||||||
DOM.entropyBinary = DOM.entropyContainer.find(".binary");
|
DOM.entropyBinary = DOM.entropyContainer.find(".binary");
|
||||||
DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
|
DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
|
||||||
|
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
||||||
DOM.phrase = $(".phrase");
|
DOM.phrase = $(".phrase");
|
||||||
DOM.passphrase = $(".passphrase");
|
DOM.passphrase = $(".passphrase");
|
||||||
DOM.generateContainer = $(".generate-container");
|
DOM.generateContainer = $(".generate-container");
|
||||||
@@ -46190,6 +46210,7 @@ window.Entropy = new (function() {
|
|||||||
DOM.bip49change = $("#bip49 .change");
|
DOM.bip49change = $("#bip49 .change");
|
||||||
DOM.generatedStrength = $(".generate-container .strength");
|
DOM.generatedStrength = $(".generate-container .strength");
|
||||||
DOM.hardenedAddresses = $(".hardened-addresses");
|
DOM.hardenedAddresses = $(".hardened-addresses");
|
||||||
|
DOM.useP2wpkhNestedInP2sh = $(".p2wpkh-nested-in-p2sh");
|
||||||
DOM.addresses = $(".addresses");
|
DOM.addresses = $(".addresses");
|
||||||
DOM.rowsToAdd = $(".rows-to-add");
|
DOM.rowsToAdd = $(".rows-to-add");
|
||||||
DOM.more = $(".more");
|
DOM.more = $(".more");
|
||||||
@@ -46226,6 +46247,7 @@ window.Entropy = new (function() {
|
|||||||
DOM.bip49change.on("input", calcForDerivationPath);
|
DOM.bip49change.on("input", calcForDerivationPath);
|
||||||
DOM.tab.on("shown.bs.tab", calcForDerivationPath);
|
DOM.tab.on("shown.bs.tab", calcForDerivationPath);
|
||||||
DOM.hardenedAddresses.on("change", calcForDerivationPath);
|
DOM.hardenedAddresses.on("change", calcForDerivationPath);
|
||||||
|
DOM.useP2wpkhNestedInP2sh.on("change", calcForDerivationPath);
|
||||||
DOM.indexToggle.on("click", toggleIndexes);
|
DOM.indexToggle.on("click", toggleIndexes);
|
||||||
DOM.addressToggle.on("click", toggleAddresses);
|
DOM.addressToggle.on("click", toggleAddresses);
|
||||||
DOM.publicKeyToggle.on("click", togglePublicKeys);
|
DOM.publicKeyToggle.on("click", togglePublicKeys);
|
||||||
@@ -46248,11 +46270,11 @@ window.Entropy = new (function() {
|
|||||||
var networkIndex = e.target.value;
|
var networkIndex = e.target.value;
|
||||||
var network = networks[networkIndex];
|
var network = networks[networkIndex];
|
||||||
network.onSelect();
|
network.onSelect();
|
||||||
if (network.bip49available) {
|
if (network.p2wpkhNestedInP2shAvailable) {
|
||||||
showBip49();
|
showP2wpkhNestedInP2shAvailable();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hideBip49();
|
showP2wpkhNestedInP2shUnavailable();
|
||||||
}
|
}
|
||||||
if (seed != null) {
|
if (seed != null) {
|
||||||
phraseChanged();
|
phraseChanged();
|
||||||
@@ -46384,7 +46406,6 @@ window.Entropy = new (function() {
|
|||||||
function rootKeyChanged() {
|
function rootKeyChanged() {
|
||||||
showPending();
|
showPending();
|
||||||
hideValidationError();
|
hideValidationError();
|
||||||
// Validate the root key TODO
|
|
||||||
var rootKeyBase58 = DOM.rootKey.val();
|
var rootKeyBase58 = DOM.rootKey.val();
|
||||||
var errorText = validateRootKey(rootKeyBase58);
|
var errorText = validateRootKey(rootKeyBase58);
|
||||||
if (errorText) {
|
if (errorText) {
|
||||||
@@ -46577,7 +46598,7 @@ window.Entropy = new (function() {
|
|||||||
|
|
||||||
function validateRootKey(rootKeyBase58) {
|
function validateRootKey(rootKeyBase58) {
|
||||||
try {
|
try {
|
||||||
bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58);
|
bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
return "Invalid root key";
|
return "Invalid root key";
|
||||||
@@ -46755,8 +46776,8 @@ window.Entropy = new (function() {
|
|||||||
var self = this;
|
var self = this;
|
||||||
this.shouldGenerate = true;
|
this.shouldGenerate = true;
|
||||||
var useHardenedAddresses = DOM.hardenedAddresses.prop("checked");
|
var useHardenedAddresses = DOM.hardenedAddresses.prop("checked");
|
||||||
var isBip49 = bip49TabSelected();
|
var isP2wpkhNestedInP2sh = bip49TabSelected() || (bip32TabSelected() && useP2wpkhNestedInP2sh());
|
||||||
var bip49available = networkHasBip49();
|
var p2wpkhNestedInP2shAvailable = networkHasBip49();
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
calculateValues();
|
calculateValues();
|
||||||
@@ -46801,8 +46822,8 @@ window.Entropy = new (function() {
|
|||||||
address = convertRippleAdrr(address);
|
address = convertRippleAdrr(address);
|
||||||
}
|
}
|
||||||
// BIP49 addresses are different
|
// BIP49 addresses are different
|
||||||
if (isBip49) {
|
if (isP2wpkhNestedInP2sh) {
|
||||||
if (!bip49available) {
|
if (!p2wpkhNestedInP2shAvailable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var keyhash = bitcoinjs.bitcoin.crypto.hash160(key.getPublicKeyBuffer());
|
var keyhash = bitcoinjs.bitcoin.crypto.hash160(key.getPublicKeyBuffer());
|
||||||
@@ -47177,6 +47198,16 @@ window.Entropy = new (function() {
|
|||||||
DOM.entropyWordCount.text(wordCount);
|
DOM.entropyWordCount.text(wordCount);
|
||||||
DOM.entropyBinary.text(entropy.binaryStr);
|
DOM.entropyBinary.text(entropy.binaryStr);
|
||||||
DOM.entropyBitsPerEvent.text(bitsPerEvent);
|
DOM.entropyBitsPerEvent.text(bitsPerEvent);
|
||||||
|
// detect and warn of filtering
|
||||||
|
var rawNoSpaces = DOM.entropy.val().replace(/\s/g, "");
|
||||||
|
var cleanNoSpaces = entropy.cleanStr.replace(/\s/g, "");
|
||||||
|
var isFiltered = rawNoSpaces.length != cleanNoSpaces.length;
|
||||||
|
if (isFiltered) {
|
||||||
|
DOM.entropyFilterWarning.removeClass('hidden');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DOM.entropyFilterWarning.addClass('hidden');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEntropyTypeStr(entropy) {
|
function getEntropyTypeStr(entropy) {
|
||||||
@@ -47282,8 +47313,12 @@ window.Entropy = new (function() {
|
|||||||
return DOM.bip32tab.hasClass("active");
|
return DOM.bip32tab.hasClass("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function useP2wpkhNestedInP2sh() {
|
||||||
|
return DOM.useP2wpkhNestedInP2sh.prop("checked");
|
||||||
|
}
|
||||||
|
|
||||||
function networkHasBip49() {
|
function networkHasBip49() {
|
||||||
return networks[DOM.network.val()].bip49available;
|
return networks[DOM.network.val()].p2wpkhNestedInP2shAvailable;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bip49TabSelected() {
|
function bip49TabSelected() {
|
||||||
@@ -47295,20 +47330,23 @@ window.Entropy = new (function() {
|
|||||||
DOM.bip49coin.val(coinValue);
|
DOM.bip49coin.val(coinValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showBip49() {
|
function showP2wpkhNestedInP2shAvailable() {
|
||||||
DOM.bip49unavailable.addClass("hidden");
|
DOM.bip49unavailable.addClass("hidden");
|
||||||
DOM.bip49available.removeClass("hidden");
|
DOM.bip49available.removeClass("hidden");
|
||||||
|
DOM.useP2wpkhNestedInP2sh.prop("disabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideBip49() {
|
function showP2wpkhNestedInP2shUnavailable() {
|
||||||
DOM.bip49available.addClass("hidden");
|
DOM.bip49available.addClass("hidden");
|
||||||
DOM.bip49unavailable.removeClass("hidden");
|
DOM.bip49unavailable.removeClass("hidden");
|
||||||
|
DOM.useP2wpkhNestedInP2sh.prop("disabled", true);
|
||||||
|
DOM.useP2wpkhNestedInP2sh.prop("checked", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
var networks = [
|
var networks = [
|
||||||
{
|
{
|
||||||
name: "BCH - Bitcoin Cash",
|
name: "BCH - Bitcoin Cash",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(145);
|
setHdCoin(145);
|
||||||
@@ -47316,7 +47354,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "BTC - Bitcoin",
|
name: "BTC - Bitcoin",
|
||||||
bip49available: true,
|
p2wpkhNestedInP2shAvailable: true,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(0);
|
setHdCoin(0);
|
||||||
@@ -47324,7 +47362,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "BTC - Bitcoin Testnet",
|
name: "BTC - Bitcoin Testnet",
|
||||||
bip49available: true,
|
p2wpkhNestedInP2shAvailable: true,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.testnet;
|
network = bitcoinjs.bitcoin.networks.testnet;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -47332,7 +47370,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "CLAM - Clams",
|
name: "CLAM - Clams",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.clam;
|
network = bitcoinjs.bitcoin.networks.clam;
|
||||||
setHdCoin(23);
|
setHdCoin(23);
|
||||||
@@ -47340,7 +47378,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "CRW - Crown",
|
name: "CRW - Crown",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.crown;
|
network = bitcoinjs.bitcoin.networks.crown;
|
||||||
setHdCoin(72);
|
setHdCoin(72);
|
||||||
@@ -47348,7 +47386,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "DASH - Dash",
|
name: "DASH - Dash",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.dash;
|
network = bitcoinjs.bitcoin.networks.dash;
|
||||||
setHdCoin(5);
|
setHdCoin(5);
|
||||||
@@ -47356,7 +47394,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "DASH - Dash Testnet",
|
name: "DASH - Dash Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.dashtn;
|
network = bitcoinjs.bitcoin.networks.dashtn;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -47364,7 +47402,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "DOGE - Dogecoin",
|
name: "DOGE - Dogecoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.dogecoin;
|
network = bitcoinjs.bitcoin.networks.dogecoin;
|
||||||
setHdCoin(3);
|
setHdCoin(3);
|
||||||
@@ -47372,7 +47410,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ETH - Ethereum",
|
name: "ETH - Ethereum",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(60);
|
setHdCoin(60);
|
||||||
@@ -47380,7 +47418,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "GAME - GameCredits",
|
name: "GAME - GameCredits",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.game;
|
network = bitcoinjs.bitcoin.networks.game;
|
||||||
setHdCoin(101);
|
setHdCoin(101);
|
||||||
@@ -47388,7 +47426,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "JBS - Jumbucks",
|
name: "JBS - Jumbucks",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.jumbucks;
|
network = bitcoinjs.bitcoin.networks.jumbucks;
|
||||||
setHdCoin(26);
|
setHdCoin(26);
|
||||||
@@ -47396,7 +47434,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "LTC - Litecoin",
|
name: "LTC - Litecoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.litecoin;
|
network = bitcoinjs.bitcoin.networks.litecoin;
|
||||||
setHdCoin(2);
|
setHdCoin(2);
|
||||||
@@ -47405,7 +47443,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MAZA - Maza",
|
name: "MAZA - Maza",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.maza;
|
network = bitcoinjs.bitcoin.networks.maza;
|
||||||
setHdCoin(13);
|
setHdCoin(13);
|
||||||
@@ -47414,7 +47452,7 @@ window.Entropy = new (function() {
|
|||||||
|
|
||||||
{
|
{
|
||||||
name: "NMC - Namecoin",
|
name: "NMC - Namecoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.namecoin;
|
network = bitcoinjs.bitcoin.networks.namecoin;
|
||||||
setHdCoin(7);
|
setHdCoin(7);
|
||||||
@@ -47422,7 +47460,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "PIVX - PIVX",
|
name: "PIVX - PIVX",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.pivx;
|
network = bitcoinjs.bitcoin.networks.pivx;
|
||||||
setHdCoin(119);
|
setHdCoin(119);
|
||||||
@@ -47430,7 +47468,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "PIVX - PIVX Testnet",
|
name: "PIVX - PIVX Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.pivxtestnet;
|
network = bitcoinjs.bitcoin.networks.pivxtestnet;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -47438,7 +47476,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "PPC - Peercoin",
|
name: "PPC - Peercoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.peercoin;
|
network = bitcoinjs.bitcoin.networks.peercoin;
|
||||||
setHdCoin(6);
|
setHdCoin(6);
|
||||||
@@ -47446,7 +47484,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SDC - ShadowCash",
|
name: "SDC - ShadowCash",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.shadow;
|
network = bitcoinjs.bitcoin.networks.shadow;
|
||||||
setHdCoin(35);
|
setHdCoin(35);
|
||||||
@@ -47454,7 +47492,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SDC - ShadowCash Testnet",
|
name: "SDC - ShadowCash Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.shadowtn;
|
network = bitcoinjs.bitcoin.networks.shadowtn;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -47462,7 +47500,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SLM - Slimcoin",
|
name: "SLM - Slimcoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.slimcoin;
|
network = bitcoinjs.bitcoin.networks.slimcoin;
|
||||||
setHdCoin(63);
|
setHdCoin(63);
|
||||||
@@ -47470,7 +47508,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SLM - Slimcoin Testnet",
|
name: "SLM - Slimcoin Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.slimcointn;
|
network = bitcoinjs.bitcoin.networks.slimcointn;
|
||||||
setHdCoin(111);
|
setHdCoin(111);
|
||||||
@@ -47478,7 +47516,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "VIA - Viacoin",
|
name: "VIA - Viacoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.viacoin;
|
network = bitcoinjs.bitcoin.networks.viacoin;
|
||||||
setHdCoin(14);
|
setHdCoin(14);
|
||||||
@@ -47486,7 +47524,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "VIA - Viacoin Testnet",
|
name: "VIA - Viacoin Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.viacointestnet;
|
network = bitcoinjs.bitcoin.networks.viacointestnet;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -47494,7 +47532,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "XMY - Myriadcoin",
|
name: "XMY - Myriadcoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.myriadcoin;
|
network = bitcoinjs.bitcoin.networks.myriadcoin;
|
||||||
setHdCoin(90);
|
setHdCoin(90);
|
||||||
@@ -47502,7 +47540,7 @@ window.Entropy = new (function() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "XRP - Ripple",
|
name: "XRP - Ripple",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(144);
|
setHdCoin(144);
|
||||||
|
|||||||
16
changelog.md
16
changelog.md
@@ -1,3 +1,19 @@
|
|||||||
|
# 0.2.6
|
||||||
|
|
||||||
|
* Detect and warn when entropy is filtered / discarded
|
||||||
|
* Reword entropy text to indicate using a single source only
|
||||||
|
* Add BIP49 to More Info section
|
||||||
|
* Update compile script to work across python 2 and 3
|
||||||
|
* QR Codes use correctLevel 3 instead of 2
|
||||||
|
* Source map removed from zxcvbn
|
||||||
|
* Tidy up code with consistent use of commas and semicolons
|
||||||
|
|
||||||
|
# 0.2.5
|
||||||
|
|
||||||
|
* Rename variables for clarity between BIP49 and P2WPKH Nested In P2SH
|
||||||
|
* Fix bug for validation of root key when using non-bitcoin networks
|
||||||
|
* Add option to use P2WPKH Nested In P2SH addresses on BIP32 tab
|
||||||
|
|
||||||
# 0.2.4
|
# 0.2.4
|
||||||
|
|
||||||
* Show error when using xpub with hardened addresses
|
* Show error when using xpub with hardened addresses
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import datetime
|
import datetime
|
||||||
|
from io import open
|
||||||
|
|
||||||
# This script generates the bip39-standalone.html file.
|
# This script generates the bip39-standalone.html file.
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,10 @@ at 1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN
|
|||||||
Please do not make modifications to `bip39-standalone.html`, since they will
|
Please do not make modifications to `bip39-standalone.html`, since they will
|
||||||
be overwritten by `compile.py`.
|
be overwritten by `compile.py`.
|
||||||
|
|
||||||
Make changes in `src/*` and apply them using the command `python compile.py`
|
Make changes in `src/*`.
|
||||||
|
|
||||||
|
Changes are applied during release using the command `python compile.py`, so
|
||||||
|
please do not commit changes to `bip39-standalone.html`
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,17 @@ created with the following steps:
|
|||||||
1. Run `python compile.py`
|
1. Run `python compile.py`
|
||||||
1. Commit these changes with message `Release vX.Y.Z`
|
1. Commit these changes with message `Release vX.Y.Z`
|
||||||
1. Tag the commit `git tag X.Y.Z`
|
1. Tag the commit `git tag X.Y.Z`
|
||||||
1. Push the changes `git push`
|
|
||||||
1. Push the new tag `git push --tags`
|
|
||||||
1. Get the hash of the file `sha256sum bip39-standalone.html`
|
1. Get the hash of the file `sha256sum bip39-standalone.html`
|
||||||
1. Create the text for the release notes (see prior releases)
|
1. Create the text for the release notes (see prior releases)
|
||||||
1. Sign the release notes `gpg --clearsign /tmp/releasenotes.txt`
|
1. Sign the release notes `gpg --clearsign /tmp/signature.txt`
|
||||||
|
1. Push the changes `git push`
|
||||||
|
1. Push the new tag `git push --tags`
|
||||||
1. Create a release on github from the tagged commit
|
1. Create a release on github from the tagged commit
|
||||||
1. include the signed release notes as text for the release
|
1. include the signed release notes as text for the release
|
||||||
|
1. include the changelog for this release as text for the release
|
||||||
|
1. attach signature.txt.asc
|
||||||
1. attach the bip39-standalone.html file
|
1. attach the bip39-standalone.html file
|
||||||
1. Add a new post to twitter from @bip39tool with the version, link and hash
|
1. Add a new post to twitter from @bip39tool with the version, link and hash
|
||||||
1. Publish to any hosted locations (eg iancoleman.github.io/bip39)
|
1. Publish to any hosted locations (eg iancoleman.github.io/bip39)
|
||||||
|
1. Download the file from the release and confirm it hashes to the expected value `sha256sum bip39-standalone.html`
|
||||||
|
1. Download the signature from the release and verify it. `gpg --verify signature.txt.asc`
|
||||||
|
|||||||
@@ -114,7 +114,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.2.4</p>
|
<p class="version">v0.2.6</p>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -163,7 +163,14 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
|
<label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards" data-translate-placeholder></textarea>
|
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards" data-translate-placeholder></textarea>
|
||||||
|
<div class="row filter-warning text-danger hidden">
|
||||||
|
<p class="col-sm-12">
|
||||||
|
<strong>
|
||||||
|
Some characters have been discarded
|
||||||
|
</strong>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label>
|
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label>
|
||||||
<div class="crack-time col-sm-3 form-control-static"></div>
|
<div class="crack-time col-sm-3 form-control-static"></div>
|
||||||
@@ -408,6 +415,13 @@
|
|||||||
<span data-translate>Use hardened addresses</span>
|
<span data-translate>Use hardened addresses</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-2"></div>
|
||||||
|
<label class="col-sm-10">
|
||||||
|
<input class="p2wpkh-nested-in-p2sh" type="checkbox">
|
||||||
|
<span data-translate>Use SegWit addresses (ie P2WPKH Nested In P2SH)</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="core-path" class="col-sm-2 control-label" data-translate>Bitcoin Core</label>
|
<label for="core-path" class="col-sm-2 control-label" data-translate>Bitcoin Core</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
@@ -626,6 +640,11 @@
|
|||||||
Read more at the
|
Read more at the
|
||||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
|
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
|
||||||
</p>
|
</p>
|
||||||
|
<h3>BIP49 <span class="small" data-translate>Derivation scheme for P2WPKH-nested-in-P2SH based accounts</span></h3>
|
||||||
|
<p data-translate-html>
|
||||||
|
Read more at the
|
||||||
|
<a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a>
|
||||||
|
</p>
|
||||||
<h3 data-translate>Private Keys</h3>
|
<h3 data-translate>Private Keys</h3>
|
||||||
<p>
|
<p>
|
||||||
<span data-translate-html>
|
<span data-translate-html>
|
||||||
|
|||||||
@@ -1,133 +1,133 @@
|
|||||||
bitcoinjs.bitcoin.networks.shadow = {
|
bitcoinjs.bitcoin.networks.shadow = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0xEE80286A,
|
public: 0xEE80286A,
|
||||||
private: 0xEE8031E8
|
private: 0xEE8031E8
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x3f,
|
pubKeyHash: 0x3f,
|
||||||
scriptHash: 0x7d,
|
scriptHash: 0x7d,
|
||||||
wif: 0xbf,
|
wif: 0xbf
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.shadowtn = {
|
bitcoinjs.bitcoin.networks.shadowtn = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x76C0FDFB,
|
public: 0x76C0FDFB,
|
||||||
private: 0x76C1077A
|
private: 0x76C1077A
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x7f,
|
pubKeyHash: 0x7f,
|
||||||
scriptHash: 0xc4,
|
scriptHash: 0xc4,
|
||||||
wif: 0xff,
|
wif: 0xff
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.clam = {
|
bitcoinjs.bitcoin.networks.clam = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0xa8c26d64,
|
public: 0xa8c26d64,
|
||||||
private: 0xa8c17826
|
private: 0xa8c17826
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x89,
|
pubKeyHash: 0x89,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0x85,
|
wif: 0x85
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.crown = {
|
bitcoinjs.bitcoin.networks.crown = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x00,
|
pubKeyHash: 0x00,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0x80,
|
wif: 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.dash = {
|
bitcoinjs.bitcoin.networks.dash = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x4c,
|
pubKeyHash: 0x4c,
|
||||||
scriptHash: 0x10,
|
scriptHash: 0x10,
|
||||||
wif: 0xcc,
|
wif: 0xcc
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.maza = {
|
bitcoinjs.bitcoin.networks.maza = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x32,
|
pubKeyHash: 0x32,
|
||||||
scriptHash: 0x09,
|
scriptHash: 0x09,
|
||||||
wif: 0xe0,
|
wif: 0xe0
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.dashtn = {
|
bitcoinjs.bitcoin.networks.dashtn = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x043587cf,
|
public: 0x043587cf,
|
||||||
private: 0x04358394
|
private: 0x04358394
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x8c,
|
pubKeyHash: 0x8c,
|
||||||
scriptHash: 0x13,
|
scriptHash: 0x13,
|
||||||
wif: 0xef,
|
wif: 0xef
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.game = {
|
bitcoinjs.bitcoin.networks.game = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x26,
|
pubKeyHash: 0x26,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0xa6,
|
wif: 0xa6
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.namecoin = {
|
bitcoinjs.bitcoin.networks.namecoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x34,
|
pubKeyHash: 0x34,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0x80,
|
wif: 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.peercoin = {
|
bitcoinjs.bitcoin.networks.peercoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x37,
|
pubKeyHash: 0x37,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0xb7,
|
wif: 0xb7
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.slimcoin = {
|
bitcoinjs.bitcoin.networks.slimcoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0xef6adf10,
|
public: 0xef6adf10,
|
||||||
private: 0xef69ea80
|
private: 0xef69ea80
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x3f,
|
pubKeyHash: 0x3f,
|
||||||
scriptHash: 0x7d,
|
scriptHash: 0x7d,
|
||||||
wif: 0x46,
|
wif: 0x46
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.slimcointn = {
|
bitcoinjs.bitcoin.networks.slimcointn = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x043587CF,
|
public: 0x043587CF,
|
||||||
private: 0x04358394
|
private: 0x04358394
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x6f,
|
pubKeyHash: 0x6f,
|
||||||
scriptHash: 0xc4,
|
scriptHash: 0xc4,
|
||||||
wif: 0x57,
|
wif: 0x57
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.dogecoin = {
|
bitcoinjs.bitcoin.networks.dogecoin = {
|
||||||
@@ -138,8 +138,8 @@ bitcoinjs.bitcoin.networks.dogecoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x1e,
|
pubKeyHash: 0x1e,
|
||||||
scriptHash: 0x16,
|
scriptHash: 0x16,
|
||||||
wif: 0x9e,
|
wif: 0x9e
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.viacoin = {
|
bitcoinjs.bitcoin.networks.viacoin = {
|
||||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||||
@@ -149,8 +149,8 @@ bitcoinjs.bitcoin.networks.viacoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x47,
|
pubKeyHash: 0x47,
|
||||||
scriptHash: 0x21,
|
scriptHash: 0x21,
|
||||||
wif: 0xc7,
|
wif: 0xc7
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.viacointestnet = {
|
bitcoinjs.bitcoin.networks.viacointestnet = {
|
||||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||||
@@ -160,8 +160,8 @@ bitcoinjs.bitcoin.networks.viacointestnet = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x7f,
|
pubKeyHash: 0x7f,
|
||||||
scriptHash: 0xc4,
|
scriptHash: 0xc4,
|
||||||
wif: 0xff,
|
wif: 0xff
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.gamerscoin = {
|
bitcoinjs.bitcoin.networks.gamerscoin = {
|
||||||
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
||||||
@@ -171,8 +171,8 @@ bitcoinjs.bitcoin.networks.gamerscoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x26,
|
pubKeyHash: 0x26,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0xA6,
|
wif: 0xA6
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.jumbucks = {
|
bitcoinjs.bitcoin.networks.jumbucks = {
|
||||||
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
||||||
@@ -182,8 +182,8 @@ bitcoinjs.bitcoin.networks.jumbucks = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x2b,
|
pubKeyHash: 0x2b,
|
||||||
scriptHash: 0x05,
|
scriptHash: 0x05,
|
||||||
wif: 0xab,
|
wif: 0xab
|
||||||
},
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.zetacoin = {
|
bitcoinjs.bitcoin.networks.zetacoin = {
|
||||||
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
||||||
@@ -193,38 +193,38 @@ bitcoinjs.bitcoin.networks.zetacoin = {
|
|||||||
},
|
},
|
||||||
pubKeyHash: 0x50,
|
pubKeyHash: 0x50,
|
||||||
scriptHash: 0x09,
|
scriptHash: 0x09,
|
||||||
wif: 0xe0,
|
wif: 0xe0
|
||||||
}
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.myriadcoin = {
|
bitcoinjs.bitcoin.networks.myriadcoin = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x32,
|
pubKeyHash: 0x32,
|
||||||
scriptHash: 0x00, // TODO set this correctly
|
scriptHash: 0x00, // TODO set this correctly
|
||||||
wif: 0xb2,
|
wif: 0xb2
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.pivx = {
|
bitcoinjs.bitcoin.networks.pivx = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x022d2533,
|
public: 0x022d2533,
|
||||||
private: 0x0221312b
|
private: 0x0221312b
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x1e,
|
pubKeyHash: 0x1e,
|
||||||
scriptHash: 0x0d,
|
scriptHash: 0x0d,
|
||||||
wif: 0xd4,
|
wif: 0xd4
|
||||||
};
|
};
|
||||||
|
|
||||||
bitcoinjs.bitcoin.networks.pivxtestnet = {
|
bitcoinjs.bitcoin.networks.pivxtestnet = {
|
||||||
messagePrefix: "unused",
|
messagePrefix: 'unused',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x3a8061a0,
|
public: 0x3a8061a0,
|
||||||
private: 0x3a805837
|
private: 0x3a805837
|
||||||
},
|
},
|
||||||
pubKeyHash: 0x8b,
|
pubKeyHash: 0x8b,
|
||||||
scriptHash: 0x13,
|
scriptHash: 0x13,
|
||||||
wif: 0xef,
|
wif: 0xef
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
|
DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
|
||||||
DOM.entropyBinary = DOM.entropyContainer.find(".binary");
|
DOM.entropyBinary = DOM.entropyContainer.find(".binary");
|
||||||
DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
|
DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
|
||||||
|
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
||||||
DOM.phrase = $(".phrase");
|
DOM.phrase = $(".phrase");
|
||||||
DOM.passphrase = $(".passphrase");
|
DOM.passphrase = $(".passphrase");
|
||||||
DOM.generateContainer = $(".generate-container");
|
DOM.generateContainer = $(".generate-container");
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
DOM.bip49change = $("#bip49 .change");
|
DOM.bip49change = $("#bip49 .change");
|
||||||
DOM.generatedStrength = $(".generate-container .strength");
|
DOM.generatedStrength = $(".generate-container .strength");
|
||||||
DOM.hardenedAddresses = $(".hardened-addresses");
|
DOM.hardenedAddresses = $(".hardened-addresses");
|
||||||
|
DOM.useP2wpkhNestedInP2sh = $(".p2wpkh-nested-in-p2sh");
|
||||||
DOM.addresses = $(".addresses");
|
DOM.addresses = $(".addresses");
|
||||||
DOM.rowsToAdd = $(".rows-to-add");
|
DOM.rowsToAdd = $(".rows-to-add");
|
||||||
DOM.more = $(".more");
|
DOM.more = $(".more");
|
||||||
@@ -109,6 +111,7 @@
|
|||||||
DOM.bip49change.on("input", calcForDerivationPath);
|
DOM.bip49change.on("input", calcForDerivationPath);
|
||||||
DOM.tab.on("shown.bs.tab", calcForDerivationPath);
|
DOM.tab.on("shown.bs.tab", calcForDerivationPath);
|
||||||
DOM.hardenedAddresses.on("change", calcForDerivationPath);
|
DOM.hardenedAddresses.on("change", calcForDerivationPath);
|
||||||
|
DOM.useP2wpkhNestedInP2sh.on("change", calcForDerivationPath);
|
||||||
DOM.indexToggle.on("click", toggleIndexes);
|
DOM.indexToggle.on("click", toggleIndexes);
|
||||||
DOM.addressToggle.on("click", toggleAddresses);
|
DOM.addressToggle.on("click", toggleAddresses);
|
||||||
DOM.publicKeyToggle.on("click", togglePublicKeys);
|
DOM.publicKeyToggle.on("click", togglePublicKeys);
|
||||||
@@ -131,11 +134,11 @@
|
|||||||
var networkIndex = e.target.value;
|
var networkIndex = e.target.value;
|
||||||
var network = networks[networkIndex];
|
var network = networks[networkIndex];
|
||||||
network.onSelect();
|
network.onSelect();
|
||||||
if (network.bip49available) {
|
if (network.p2wpkhNestedInP2shAvailable) {
|
||||||
showBip49();
|
showP2wpkhNestedInP2shAvailable();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hideBip49();
|
showP2wpkhNestedInP2shUnavailable();
|
||||||
}
|
}
|
||||||
if (seed != null) {
|
if (seed != null) {
|
||||||
phraseChanged();
|
phraseChanged();
|
||||||
@@ -267,7 +270,6 @@
|
|||||||
function rootKeyChanged() {
|
function rootKeyChanged() {
|
||||||
showPending();
|
showPending();
|
||||||
hideValidationError();
|
hideValidationError();
|
||||||
// Validate the root key TODO
|
|
||||||
var rootKeyBase58 = DOM.rootKey.val();
|
var rootKeyBase58 = DOM.rootKey.val();
|
||||||
var errorText = validateRootKey(rootKeyBase58);
|
var errorText = validateRootKey(rootKeyBase58);
|
||||||
if (errorText) {
|
if (errorText) {
|
||||||
@@ -460,7 +462,7 @@
|
|||||||
|
|
||||||
function validateRootKey(rootKeyBase58) {
|
function validateRootKey(rootKeyBase58) {
|
||||||
try {
|
try {
|
||||||
bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58);
|
bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
return "Invalid root key";
|
return "Invalid root key";
|
||||||
@@ -638,8 +640,8 @@
|
|||||||
var self = this;
|
var self = this;
|
||||||
this.shouldGenerate = true;
|
this.shouldGenerate = true;
|
||||||
var useHardenedAddresses = DOM.hardenedAddresses.prop("checked");
|
var useHardenedAddresses = DOM.hardenedAddresses.prop("checked");
|
||||||
var isBip49 = bip49TabSelected();
|
var isP2wpkhNestedInP2sh = bip49TabSelected() || (bip32TabSelected() && useP2wpkhNestedInP2sh());
|
||||||
var bip49available = networkHasBip49();
|
var p2wpkhNestedInP2shAvailable = networkHasBip49();
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
calculateValues();
|
calculateValues();
|
||||||
@@ -684,8 +686,8 @@
|
|||||||
address = convertRippleAdrr(address);
|
address = convertRippleAdrr(address);
|
||||||
}
|
}
|
||||||
// BIP49 addresses are different
|
// BIP49 addresses are different
|
||||||
if (isBip49) {
|
if (isP2wpkhNestedInP2sh) {
|
||||||
if (!bip49available) {
|
if (!p2wpkhNestedInP2shAvailable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var keyhash = bitcoinjs.bitcoin.crypto.hash160(key.getPublicKeyBuffer());
|
var keyhash = bitcoinjs.bitcoin.crypto.hash160(key.getPublicKeyBuffer());
|
||||||
@@ -1060,6 +1062,16 @@
|
|||||||
DOM.entropyWordCount.text(wordCount);
|
DOM.entropyWordCount.text(wordCount);
|
||||||
DOM.entropyBinary.text(entropy.binaryStr);
|
DOM.entropyBinary.text(entropy.binaryStr);
|
||||||
DOM.entropyBitsPerEvent.text(bitsPerEvent);
|
DOM.entropyBitsPerEvent.text(bitsPerEvent);
|
||||||
|
// detect and warn of filtering
|
||||||
|
var rawNoSpaces = DOM.entropy.val().replace(/\s/g, "");
|
||||||
|
var cleanNoSpaces = entropy.cleanStr.replace(/\s/g, "");
|
||||||
|
var isFiltered = rawNoSpaces.length != cleanNoSpaces.length;
|
||||||
|
if (isFiltered) {
|
||||||
|
DOM.entropyFilterWarning.removeClass('hidden');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DOM.entropyFilterWarning.addClass('hidden');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEntropyTypeStr(entropy) {
|
function getEntropyTypeStr(entropy) {
|
||||||
@@ -1165,8 +1177,12 @@
|
|||||||
return DOM.bip32tab.hasClass("active");
|
return DOM.bip32tab.hasClass("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function useP2wpkhNestedInP2sh() {
|
||||||
|
return DOM.useP2wpkhNestedInP2sh.prop("checked");
|
||||||
|
}
|
||||||
|
|
||||||
function networkHasBip49() {
|
function networkHasBip49() {
|
||||||
return networks[DOM.network.val()].bip49available;
|
return networks[DOM.network.val()].p2wpkhNestedInP2shAvailable;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bip49TabSelected() {
|
function bip49TabSelected() {
|
||||||
@@ -1178,20 +1194,23 @@
|
|||||||
DOM.bip49coin.val(coinValue);
|
DOM.bip49coin.val(coinValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showBip49() {
|
function showP2wpkhNestedInP2shAvailable() {
|
||||||
DOM.bip49unavailable.addClass("hidden");
|
DOM.bip49unavailable.addClass("hidden");
|
||||||
DOM.bip49available.removeClass("hidden");
|
DOM.bip49available.removeClass("hidden");
|
||||||
|
DOM.useP2wpkhNestedInP2sh.prop("disabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideBip49() {
|
function showP2wpkhNestedInP2shUnavailable() {
|
||||||
DOM.bip49available.addClass("hidden");
|
DOM.bip49available.addClass("hidden");
|
||||||
DOM.bip49unavailable.removeClass("hidden");
|
DOM.bip49unavailable.removeClass("hidden");
|
||||||
|
DOM.useP2wpkhNestedInP2sh.prop("disabled", true);
|
||||||
|
DOM.useP2wpkhNestedInP2sh.prop("checked", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
var networks = [
|
var networks = [
|
||||||
{
|
{
|
||||||
name: "BCH - Bitcoin Cash",
|
name: "BCH - Bitcoin Cash",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(145);
|
setHdCoin(145);
|
||||||
@@ -1199,7 +1218,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "BTC - Bitcoin",
|
name: "BTC - Bitcoin",
|
||||||
bip49available: true,
|
p2wpkhNestedInP2shAvailable: true,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(0);
|
setHdCoin(0);
|
||||||
@@ -1207,7 +1226,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "BTC - Bitcoin Testnet",
|
name: "BTC - Bitcoin Testnet",
|
||||||
bip49available: true,
|
p2wpkhNestedInP2shAvailable: true,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.testnet;
|
network = bitcoinjs.bitcoin.networks.testnet;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -1215,7 +1234,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "CLAM - Clams",
|
name: "CLAM - Clams",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.clam;
|
network = bitcoinjs.bitcoin.networks.clam;
|
||||||
setHdCoin(23);
|
setHdCoin(23);
|
||||||
@@ -1223,7 +1242,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "CRW - Crown",
|
name: "CRW - Crown",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.crown;
|
network = bitcoinjs.bitcoin.networks.crown;
|
||||||
setHdCoin(72);
|
setHdCoin(72);
|
||||||
@@ -1231,7 +1250,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "DASH - Dash",
|
name: "DASH - Dash",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.dash;
|
network = bitcoinjs.bitcoin.networks.dash;
|
||||||
setHdCoin(5);
|
setHdCoin(5);
|
||||||
@@ -1239,7 +1258,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "DASH - Dash Testnet",
|
name: "DASH - Dash Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.dashtn;
|
network = bitcoinjs.bitcoin.networks.dashtn;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -1247,7 +1266,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "DOGE - Dogecoin",
|
name: "DOGE - Dogecoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.dogecoin;
|
network = bitcoinjs.bitcoin.networks.dogecoin;
|
||||||
setHdCoin(3);
|
setHdCoin(3);
|
||||||
@@ -1255,7 +1274,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ETH - Ethereum",
|
name: "ETH - Ethereum",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(60);
|
setHdCoin(60);
|
||||||
@@ -1263,7 +1282,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "GAME - GameCredits",
|
name: "GAME - GameCredits",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.game;
|
network = bitcoinjs.bitcoin.networks.game;
|
||||||
setHdCoin(101);
|
setHdCoin(101);
|
||||||
@@ -1271,7 +1290,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "JBS - Jumbucks",
|
name: "JBS - Jumbucks",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.jumbucks;
|
network = bitcoinjs.bitcoin.networks.jumbucks;
|
||||||
setHdCoin(26);
|
setHdCoin(26);
|
||||||
@@ -1279,7 +1298,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "LTC - Litecoin",
|
name: "LTC - Litecoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.litecoin;
|
network = bitcoinjs.bitcoin.networks.litecoin;
|
||||||
setHdCoin(2);
|
setHdCoin(2);
|
||||||
@@ -1288,7 +1307,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MAZA - Maza",
|
name: "MAZA - Maza",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.maza;
|
network = bitcoinjs.bitcoin.networks.maza;
|
||||||
setHdCoin(13);
|
setHdCoin(13);
|
||||||
@@ -1297,7 +1316,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
name: "NMC - Namecoin",
|
name: "NMC - Namecoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.namecoin;
|
network = bitcoinjs.bitcoin.networks.namecoin;
|
||||||
setHdCoin(7);
|
setHdCoin(7);
|
||||||
@@ -1305,7 +1324,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "PIVX - PIVX",
|
name: "PIVX - PIVX",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.pivx;
|
network = bitcoinjs.bitcoin.networks.pivx;
|
||||||
setHdCoin(119);
|
setHdCoin(119);
|
||||||
@@ -1313,7 +1332,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "PIVX - PIVX Testnet",
|
name: "PIVX - PIVX Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.pivxtestnet;
|
network = bitcoinjs.bitcoin.networks.pivxtestnet;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -1321,7 +1340,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "PPC - Peercoin",
|
name: "PPC - Peercoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.peercoin;
|
network = bitcoinjs.bitcoin.networks.peercoin;
|
||||||
setHdCoin(6);
|
setHdCoin(6);
|
||||||
@@ -1329,7 +1348,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SDC - ShadowCash",
|
name: "SDC - ShadowCash",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.shadow;
|
network = bitcoinjs.bitcoin.networks.shadow;
|
||||||
setHdCoin(35);
|
setHdCoin(35);
|
||||||
@@ -1337,7 +1356,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SDC - ShadowCash Testnet",
|
name: "SDC - ShadowCash Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.shadowtn;
|
network = bitcoinjs.bitcoin.networks.shadowtn;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -1345,7 +1364,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SLM - Slimcoin",
|
name: "SLM - Slimcoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.slimcoin;
|
network = bitcoinjs.bitcoin.networks.slimcoin;
|
||||||
setHdCoin(63);
|
setHdCoin(63);
|
||||||
@@ -1353,7 +1372,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SLM - Slimcoin Testnet",
|
name: "SLM - Slimcoin Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.slimcointn;
|
network = bitcoinjs.bitcoin.networks.slimcointn;
|
||||||
setHdCoin(111);
|
setHdCoin(111);
|
||||||
@@ -1361,7 +1380,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "VIA - Viacoin",
|
name: "VIA - Viacoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.viacoin;
|
network = bitcoinjs.bitcoin.networks.viacoin;
|
||||||
setHdCoin(14);
|
setHdCoin(14);
|
||||||
@@ -1369,7 +1388,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "VIA - Viacoin Testnet",
|
name: "VIA - Viacoin Testnet",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.viacointestnet;
|
network = bitcoinjs.bitcoin.networks.viacointestnet;
|
||||||
setHdCoin(1);
|
setHdCoin(1);
|
||||||
@@ -1377,7 +1396,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "XMY - Myriadcoin",
|
name: "XMY - Myriadcoin",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.myriadcoin;
|
network = bitcoinjs.bitcoin.networks.myriadcoin;
|
||||||
setHdCoin(90);
|
setHdCoin(90);
|
||||||
@@ -1385,7 +1404,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "XRP - Ripple",
|
name: "XRP - Ripple",
|
||||||
bip49available: false,
|
p2wpkhNestedInP2shAvailable: false,
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
network = bitcoinjs.bitcoin.networks.bitcoin;
|
network = bitcoinjs.bitcoin.networks.bitcoin;
|
||||||
setHdCoin(144);
|
setHdCoin(144);
|
||||||
|
|||||||
2
src/js/jquery.qrcode.min.js
vendored
2
src/js/jquery.qrcode.min.js
vendored
@@ -23,6 +23,6 @@ this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(
|
|||||||
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
||||||
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
||||||
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
||||||
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
correctLevel:3,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||||
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
||||||
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
|
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o
|
|||||||
|
|
||||||
},{}]},{},[4])(4)
|
},{}]},{},[4])(4)
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=zxcvbn.js.map
|
|
||||||
|
|||||||
77
tests.js
77
tests.js
@@ -4267,6 +4267,83 @@ page.open(url, function(status) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// BIP32 tab can use P2WPKH Nested In P2SH
|
||||||
|
// github issue 91 part 2
|
||||||
|
// https://github.com/iancoleman/bip39/issues/91
|
||||||
|
// generate new addresses from xpub?
|
||||||
|
function() {
|
||||||
|
page.open(url, function(status) {
|
||||||
|
// set the xpub and coin and select bip32 tab with p2wpkh addresses
|
||||||
|
page.evaluate(function() {
|
||||||
|
// use p2wpkh addresses
|
||||||
|
$(".p2wpkh-nested-in-p2sh").prop("checked", true);
|
||||||
|
// use bip32 tab
|
||||||
|
$("#bip32-tab a").click();
|
||||||
|
// use testnet
|
||||||
|
$(".network option[selected]").removeAttr("selected");
|
||||||
|
$(".network option").filter(function() {
|
||||||
|
return $(this).html() == "BTC - Bitcoin Testnet";
|
||||||
|
}).prop("selected", true);
|
||||||
|
$(".network").trigger("change");
|
||||||
|
// Set root xpub to BIP49 official test vector account 0
|
||||||
|
$(".root-key").val("tpubDD7tXK8KeQ3YY83yWq755fHY2JW8Ha8Q765tknUM5rSvjPcGWfUppDFMpQ1ScziKfW3ZNtZvAD7M3u7bSs7HofjTD3KP3YxPK7X6hwV8Rk2");
|
||||||
|
$(".root-key").trigger("input");
|
||||||
|
});
|
||||||
|
// check the address is generated correctly
|
||||||
|
waitForGenerate(function() {
|
||||||
|
var expected = "2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2";
|
||||||
|
var actual = page.evaluate(function() {
|
||||||
|
return $(".address:first").text();
|
||||||
|
});
|
||||||
|
if (actual != expected) {
|
||||||
|
console.log("BIP32 tab cannot generate P2WPKH Nested In P2SH addresses");
|
||||||
|
console.log("Expected: " + expected);
|
||||||
|
console.log("Actual: " + actual);
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// github issue 99
|
||||||
|
// https://github.com/iancoleman/bip39/issues/99#issuecomment-327094159
|
||||||
|
// "warn me emphatically when they have detected invalid input" to the entropy field
|
||||||
|
// A warning is shown when entropy is filtered and discarded
|
||||||
|
function() {
|
||||||
|
page.open(url, function(status) {
|
||||||
|
// use entropy
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".use-entropy").prop("checked", true).trigger("change");
|
||||||
|
$(".entropy").val("00000000 00000000 00000000 00000000").trigger("input");
|
||||||
|
});
|
||||||
|
// check the filter warning does not show
|
||||||
|
waitForGenerate(function() {
|
||||||
|
var warningIsHidden = page.evaluate(function() {
|
||||||
|
return $(".entropy-container .filter-warning").hasClass("hidden");
|
||||||
|
});
|
||||||
|
if (!warningIsHidden) {
|
||||||
|
console.log("Entropy filter warning is showing when it should not");
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".entropy").val("10000000 zxcvbn 00000000 00000000 00000000").trigger("input");
|
||||||
|
});
|
||||||
|
// check the filter warning shows
|
||||||
|
waitForEntropyFeedback(function() {
|
||||||
|
var warningIsHidden = page.evaluate(function() {
|
||||||
|
return $(".entropy-container .filter-warning").hasClass("hidden");
|
||||||
|
});
|
||||||
|
if (warningIsHidden) {
|
||||||
|
console.log("Entropy filter warning is not showing when it should");
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// If you wish to add more tests, do so here...
|
// If you wish to add more tests, do so here...
|
||||||
|
|
||||||
// Here is a blank test template
|
// Here is a blank test template
|
||||||
|
|||||||
Reference in New Issue
Block a user