]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - bip39-standalone.html
Merge pull request #120 from fujicoin/add-fujicoin
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / bip39-standalone.html
index 8c2c6a4ed4b21f80a215f85965bad5b503fed824..b17cea630f1bc8d242933aff0dc52cd9da8d4518 100644 (file)
         <div class="container">
 
             <h1 class="text-center">Mnemonic Code Converter</h1>
-            <p class="version">v0.2.2</p>
+            <p class="version">v0.2.6</p>
             <hr>
             <div class="row">
                 <div class="col-md-12">
                             <div class="form-group">
                                 <label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
                                 <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">
                                         <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>
                                 <textarea id="root-key" class="root-key form-control" data-show-qr></textarea>
                             </div>
                         </div>
+                        <div class="form-group litecoin-ltub-container hidden">
+                            <label for="litecoin-use-ltub" class="col-sm-2 control-label" data-translate>Prefixes</label>
+                            <div class="col-sm-10 checkbox">
+                                <label>
+                                    <input type="checkbox" id="litecoin-use-ltub" class="litecoin-use-ltub">
+                                    Use <code>Ltpv / Ltub</code> instead of <code>xprv / xpub</code>
+                                </label>
+                            </div>
+                        </div>
                     </form>
                 </div>
             </div>
                                         <span data-translate>Use hardened addresses</span>
                                     </label>
                                 </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">
                                     <label for="core-path" class="col-sm-2 control-label" data-translate>Bitcoin Core</label>
                                     <div class="col-sm-10">
                         Read more at the
                         <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
                     </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>
                     <p>
                         <span data-translate-html>
@@ -7271,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,
 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,
-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",
 d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
 </script>
@@ -16926,6 +16954,16 @@ module.exports = {
     wif: 0xef
   },
   litecoin: {
+    messagePrefix: '\x19Litecoin Signed Message:\n',
+    bip32: {
+      public: 0x0488b21e,
+      private: 0x0488ade4,
+    },
+    pubKeyHash: 0x30,
+    scriptHash: 0x32,
+    wif: 0xb0
+  },
+  litecoinLtub: {
     messagePrefix: '\x19Litecoin Signed Message:\n',
     bip32: {
       public: 0x019da462,
@@ -22104,126 +22142,138 @@ module.exports = {
 
 }).call(this,require("buffer").Buffer)
 },{"bs58check":80,"buffer":4}]},{},[33])(33)
-});</script>
+});
+</script>
         <script>bitcoinjs.bitcoin.networks.shadow = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0xEE80286A,
     private: 0xEE8031E8
   },
   pubKeyHash: 0x3f,
   scriptHash: 0x7d,
-  wif: 0xbf,
+  wif: 0xbf
 };
 
 bitcoinjs.bitcoin.networks.shadowtn = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x76C0FDFB,
     private: 0x76C1077A
   },
   pubKeyHash: 0x7f,
   scriptHash: 0xc4,
-  wif: 0xff,
+  wif: 0xff
 };
 
 bitcoinjs.bitcoin.networks.clam = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0xa8c26d64,
     private: 0xa8c17826
   },
   pubKeyHash: 0x89,
   scriptHash: 0x00, // TODO set this correctly
-  wif: 0x85,
+  wif: 0x85
 };
 
 bitcoinjs.bitcoin.networks.crown = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x0488b21e,
     private: 0x0488ade4
   },
   pubKeyHash: 0x00,
   scriptHash: 0x05,
-  wif: 0x80,
+  wif: 0x80
 };
 
 bitcoinjs.bitcoin.networks.dash = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x0488b21e,
     private: 0x0488ade4
   },
   pubKeyHash: 0x4c,
   scriptHash: 0x10,
-  wif: 0xcc,
+  wif: 0xcc
+};
+
+bitcoinjs.bitcoin.networks.maza = {
+  messagePrefix: 'unused',
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488ade4
+  },
+  pubKeyHash: 0x32,
+  scriptHash: 0x09,
+  wif: 0xe0
 };
 
 bitcoinjs.bitcoin.networks.dashtn = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x043587cf,
     private: 0x04358394
   },
   pubKeyHash: 0x8c,
   scriptHash: 0x13,
-  wif: 0xef,
+  wif: 0xef
 };
 
 bitcoinjs.bitcoin.networks.game = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x0488b21e,
     private: 0x0488ade4
   },
   pubKeyHash: 0x26,
   scriptHash: 0x05,
-  wif: 0xa6,
+  wif: 0xa6
 };
 
 bitcoinjs.bitcoin.networks.namecoin = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x0488b21e,
     private: 0x0488ade4
   },
   pubKeyHash: 0x34,
   scriptHash: 0x00, // TODO set this correctly
-  wif: 0x80,
+  wif: 0x80
 };
 
 bitcoinjs.bitcoin.networks.peercoin = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x0488b21e,
     private: 0x0488ade4
   },
   pubKeyHash: 0x37,
   scriptHash: 0x00, // TODO set this correctly
-  wif: 0xb7,
+  wif: 0xb7
 };
 
 bitcoinjs.bitcoin.networks.slimcoin = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0xef6adf10,
     private: 0xef69ea80
   },
   pubKeyHash: 0x3f,
   scriptHash: 0x7d,
-  wif: 0x46,
+  wif: 0x46
 };
 
 bitcoinjs.bitcoin.networks.slimcointn = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x043587CF,
     private: 0x04358394
   },
   pubKeyHash: 0x6f,
   scriptHash: 0xc4,
-  wif: 0x57,
+  wif: 0x57
 };
 
 bitcoinjs.bitcoin.networks.dogecoin = {
@@ -22234,8 +22284,8 @@ bitcoinjs.bitcoin.networks.dogecoin = {
   },
   pubKeyHash: 0x1e,
   scriptHash: 0x16,
-  wif: 0x9e,
-},
+  wif: 0x9e
+};
 
 bitcoinjs.bitcoin.networks.viacoin = {
   messagePrefix: '\x18Viacoin Signed Message:\n',
@@ -22245,8 +22295,8 @@ bitcoinjs.bitcoin.networks.viacoin = {
   },
   pubKeyHash: 0x47,
   scriptHash: 0x21,
-  wif: 0xc7,
-},
+  wif: 0xc7
+};
 
 bitcoinjs.bitcoin.networks.viacointestnet = {
   messagePrefix: '\x18Viacoin Signed Message:\n',
@@ -22256,8 +22306,8 @@ bitcoinjs.bitcoin.networks.viacointestnet = {
   },
   pubKeyHash: 0x7f,
   scriptHash: 0xc4,
-  wif: 0xff,
-},
+  wif: 0xff
+};
 
 bitcoinjs.bitcoin.networks.gamerscoin = {
   messagePrefix: '\x19Gamerscoin Signed Message:\n',
@@ -22267,8 +22317,8 @@ bitcoinjs.bitcoin.networks.gamerscoin = {
   },
   pubKeyHash: 0x26,
   scriptHash: 0x05,
-  wif: 0xA6,
-},
+  wif: 0xA6
+};
 
 bitcoinjs.bitcoin.networks.jumbucks = {
   messagePrefix: '\x19Jumbucks Signed Message:\n',
@@ -22278,8 +22328,8 @@ bitcoinjs.bitcoin.networks.jumbucks = {
   },
   pubKeyHash: 0x2b,
   scriptHash: 0x05,
-  wif: 0xab,
-},
+  wif: 0xab
+};
 
 bitcoinjs.bitcoin.networks.zetacoin = {
   messagePrefix: '\x18Zetacoin Signed Message:\n',
@@ -22289,40 +22339,40 @@ bitcoinjs.bitcoin.networks.zetacoin = {
   },
   pubKeyHash: 0x50,
   scriptHash: 0x09,
-  wif: 0xe0,
-}
+  wif: 0xe0
+};
 
 bitcoinjs.bitcoin.networks.myriadcoin = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x0488b21e,
     private: 0x0488ade4
   },
   pubKeyHash: 0x32,
   scriptHash: 0x00, // TODO set this correctly
-  wif: 0xb2,
+  wif: 0xb2
 };
 
 bitcoinjs.bitcoin.networks.pivx = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x022d2533,
     private: 0x0221312b
   },
   pubKeyHash: 0x1e,
   scriptHash: 0x0d,
-  wif: 0xd4,
+  wif: 0xd4
 };
 
 bitcoinjs.bitcoin.networks.pivxtestnet = {
-  messagePrefix: "unused",
+  messagePrefix: 'unused',
   bip32: {
     public: 0x3a8061a0,
     private: 0x3a805837
   },
   pubKeyHash: 0x8b,
   scriptHash: 0x13,
-  wif: 0xef,
+  wif: 0xef
 };
 </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){
@@ -45736,7 +45786,7 @@ var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o
 
 },{}]},{},[4])(4)
 });
-//# sourceMappingURL=zxcvbn.js.map
+
 </script>
         <script>/*
  * Detects entropy from a string.
@@ -46100,6 +46150,7 @@ window.Entropy = new (function() {
     var showPubKey = true;
     var showPrivKey = true;
     var showQr = false;
+    var litecoinUseLtub = false;
 
     var entropyChangeTimeoutEvent = null;
     var phraseChangeTimeoutEvent = null;
@@ -46123,12 +46174,15 @@ window.Entropy = new (function() {
     DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
     DOM.entropyBinary = DOM.entropyContainer.find(".binary");
     DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
+    DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
     DOM.phrase = $(".phrase");
     DOM.passphrase = $(".passphrase");
     DOM.generateContainer = $(".generate-container");
     DOM.generate = $(".generate");
     DOM.seed = $(".seed");
     DOM.rootKey = $(".root-key");
+    DOM.litecoinLtubContainer = $(".litecoin-ltub-container");
+    DOM.litecoinUseLtub = $(".litecoin-use-ltub");
     DOM.extendedPrivKey = $(".extended-priv-key");
     DOM.extendedPubKey = $(".extended-pub-key");
     DOM.bip32tab = $("#bip32-tab");
@@ -46156,6 +46210,7 @@ window.Entropy = new (function() {
     DOM.bip49change = $("#bip49 .change");
     DOM.generatedStrength = $(".generate-container .strength");
     DOM.hardenedAddresses = $(".hardened-addresses");
+    DOM.useP2wpkhNestedInP2sh = $(".p2wpkh-nested-in-p2sh");
     DOM.addresses = $(".addresses");
     DOM.rowsToAdd = $(".rows-to-add");
     DOM.more = $(".more");
@@ -46184,6 +46239,7 @@ window.Entropy = new (function() {
         DOM.generate.on("click", generateClicked);
         DOM.more.on("click", showMore);
         DOM.rootKey.on("input", delayedRootKeyChanged);
+        DOM.litecoinUseLtub.on("change", litecoinUseLtubChanged);
         DOM.bip32path.on("input", calcForDerivationPath);
         DOM.bip44account.on("input", calcForDerivationPath);
         DOM.bip44change.on("input", calcForDerivationPath);
@@ -46191,6 +46247,7 @@ window.Entropy = new (function() {
         DOM.bip49change.on("input", calcForDerivationPath);
         DOM.tab.on("shown.bs.tab", calcForDerivationPath);
         DOM.hardenedAddresses.on("change", calcForDerivationPath);
+        DOM.useP2wpkhNestedInP2sh.on("change", calcForDerivationPath);
         DOM.indexToggle.on("click", toggleIndexes);
         DOM.addressToggle.on("click", toggleAddresses);
         DOM.publicKeyToggle.on("click", togglePublicKeys);
@@ -46209,14 +46266,15 @@ window.Entropy = new (function() {
     function networkChanged(e) {
         clearDerivedKeys();
         clearAddressesList();
+        DOM.litecoinLtubContainer.addClass("hidden");
         var networkIndex = e.target.value;
         var network = networks[networkIndex];
         network.onSelect();
-        if (network.bip49available) {
-            showBip49();
+        if (network.p2wpkhNestedInP2shAvailable) {
+            showP2wpkhNestedInP2shAvailable();
         }
         else {
-            hideBip49();
+            showP2wpkhNestedInP2shUnavailable();
         }
         if (seed != null) {
             phraseChanged();
@@ -46348,7 +46406,6 @@ window.Entropy = new (function() {
     function rootKeyChanged() {
         showPending();
         hideValidationError();
-        // Validate the root key TODO
         var rootKeyBase58 = DOM.rootKey.val();
         var errorText = validateRootKey(rootKeyBase58);
         if (errorText) {
@@ -46360,6 +46417,17 @@ window.Entropy = new (function() {
         calcForDerivationPath();
     }
 
+    function litecoinUseLtubChanged() {
+        litecoinUseLtub = DOM.litecoinUseLtub.prop("checked");
+        if (litecoinUseLtub) {
+            network = bitcoinjs.bitcoin.networks.litecoinLtub;
+        }
+        else {
+            network = bitcoinjs.bitcoin.networks.litecoin;
+        }
+        phraseChanged();
+    }
+
     function calcForDerivationPath() {
         clearDerivedKeys();
         clearAddressesList();
@@ -46530,7 +46598,7 @@ window.Entropy = new (function() {
 
     function validateRootKey(rootKeyBase58) {
         try {
-            bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58);
+            bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network);
         }
         catch (e) {
             return "Invalid root key";
@@ -46618,7 +46686,9 @@ window.Entropy = new (function() {
             return "No root key";
         }
         // Check no hardened derivation path when using xpub keys
-        var hardened = path.indexOf("'") > -1;
+        var hardenedPath = path.indexOf("'") > -1;
+        var hardenedAddresses = bip32TabSelected() && DOM.hardenedAddresses.prop("checked");
+        var hardened = hardenedPath || hardenedAddresses;
         var isXpubkey = bip32RootKey.isNeutered();
         if (hardened && isXpubkey) {
             return "Hardened derivation path is invalid with xpub key";
@@ -46706,8 +46776,8 @@ window.Entropy = new (function() {
         var self = this;
         this.shouldGenerate = true;
         var useHardenedAddresses = DOM.hardenedAddresses.prop("checked");
-        var isBip49 = bip49TabSelected();
-        var bip49available = networkHasBip49();
+        var isP2wpkhNestedInP2sh = bip49TabSelected() || (bip32TabSelected() && useP2wpkhNestedInP2sh());
+        var p2wpkhNestedInP2shAvailable = networkHasBip49();
 
         function init() {
             calculateValues();
@@ -46752,8 +46822,8 @@ window.Entropy = new (function() {
                     address = convertRippleAdrr(address);
                 }
                 // BIP49 addresses are different
-                if (isBip49) {
-                    if (!bip49available) {
+                if (isP2wpkhNestedInP2sh) {
+                    if (!p2wpkhNestedInP2shAvailable) {
                         return;
                     }
                     var keyhash = bitcoinjs.bitcoin.crypto.hash160(key.getPublicKeyBuffer());
@@ -47128,6 +47198,16 @@ window.Entropy = new (function() {
         DOM.entropyWordCount.text(wordCount);
         DOM.entropyBinary.text(entropy.binaryStr);
         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) {
@@ -47233,8 +47313,12 @@ window.Entropy = new (function() {
         return DOM.bip32tab.hasClass("active");
     }
 
+    function useP2wpkhNestedInP2sh() {
+        return DOM.useP2wpkhNestedInP2sh.prop("checked");
+    }
+
     function networkHasBip49() {
-        return networks[DOM.network.val()].bip49available;
+        return networks[DOM.network.val()].p2wpkhNestedInP2shAvailable;
     }
 
     function bip49TabSelected() {
@@ -47246,20 +47330,23 @@ window.Entropy = new (function() {
         DOM.bip49coin.val(coinValue);
     }
 
-    function showBip49() {
+    function showP2wpkhNestedInP2shAvailable() {
         DOM.bip49unavailable.addClass("hidden");
         DOM.bip49available.removeClass("hidden");
+        DOM.useP2wpkhNestedInP2sh.prop("disabled", false);
     }
 
-    function hideBip49() {
+    function showP2wpkhNestedInP2shUnavailable() {
         DOM.bip49available.addClass("hidden");
         DOM.bip49unavailable.removeClass("hidden");
+        DOM.useP2wpkhNestedInP2sh.prop("disabled", true);
+        DOM.useP2wpkhNestedInP2sh.prop("checked", false);
     }
 
     var networks = [
         {
             name: "BCH - Bitcoin Cash",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.bitcoin;
                 setHdCoin(145);
@@ -47267,7 +47354,7 @@ window.Entropy = new (function() {
         },
         {
             name: "BTC - Bitcoin",
-            bip49available: true,
+            p2wpkhNestedInP2shAvailable: true,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.bitcoin;
                 setHdCoin(0);
@@ -47275,7 +47362,7 @@ window.Entropy = new (function() {
         },
         {
             name: "BTC - Bitcoin Testnet",
-            bip49available: true,
+            p2wpkhNestedInP2shAvailable: true,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.testnet;
                 setHdCoin(1);
@@ -47283,7 +47370,7 @@ window.Entropy = new (function() {
         },
         {
             name: "CLAM - Clams",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.clam;
                 setHdCoin(23);
@@ -47291,7 +47378,7 @@ window.Entropy = new (function() {
         },
         {
             name: "CRW - Crown",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.crown;
                 setHdCoin(72);
@@ -47299,7 +47386,7 @@ window.Entropy = new (function() {
         },
         {
             name: "DASH - Dash",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.dash;
                 setHdCoin(5);
@@ -47307,7 +47394,7 @@ window.Entropy = new (function() {
         },
         {
             name: "DASH - Dash Testnet",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.dashtn;
                 setHdCoin(1);
@@ -47315,7 +47402,7 @@ window.Entropy = new (function() {
         },
         {
             name: "DOGE - Dogecoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.dogecoin;
                 setHdCoin(3);
@@ -47323,7 +47410,7 @@ window.Entropy = new (function() {
         },
         {
             name: "ETH - Ethereum",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.bitcoin;
                 setHdCoin(60);
@@ -47331,7 +47418,7 @@ window.Entropy = new (function() {
         },
         {
             name: "GAME - GameCredits",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.game;
                 setHdCoin(101);
@@ -47339,7 +47426,7 @@ window.Entropy = new (function() {
         },
         {
             name: "JBS - Jumbucks",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.jumbucks;
                 setHdCoin(26);
@@ -47347,15 +47434,25 @@ window.Entropy = new (function() {
         },
         {
             name: "LTC - Litecoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.litecoin;
                 setHdCoin(2);
+                DOM.litecoinLtubContainer.removeClass("hidden");
             },
         },
+        {
+            name: "MAZA - Maza",
+            p2wpkhNestedInP2shAvailable: false,
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.maza;
+                setHdCoin(13);
+            },
+        },
+
         {
             name: "NMC - Namecoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.namecoin;
                 setHdCoin(7);
@@ -47363,7 +47460,7 @@ window.Entropy = new (function() {
         },
         {
             name: "PIVX - PIVX",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.pivx;
                 setHdCoin(119);
@@ -47371,7 +47468,7 @@ window.Entropy = new (function() {
         },
         {
             name: "PIVX - PIVX Testnet",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.pivxtestnet;
                 setHdCoin(1);
@@ -47379,7 +47476,7 @@ window.Entropy = new (function() {
         },
         {
             name: "PPC - Peercoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.peercoin;
                 setHdCoin(6);
@@ -47387,7 +47484,7 @@ window.Entropy = new (function() {
         },
         {
             name: "SDC - ShadowCash",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.shadow;
                 setHdCoin(35);
@@ -47395,7 +47492,7 @@ window.Entropy = new (function() {
         },
         {
             name: "SDC - ShadowCash Testnet",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.shadowtn;
                 setHdCoin(1);
@@ -47403,7 +47500,7 @@ window.Entropy = new (function() {
         },
         {
             name: "SLM - Slimcoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.slimcoin;
                 setHdCoin(63);
@@ -47411,7 +47508,7 @@ window.Entropy = new (function() {
         },
         {
             name: "SLM - Slimcoin Testnet",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.slimcointn;
                 setHdCoin(111);
@@ -47419,7 +47516,7 @@ window.Entropy = new (function() {
         },
         {
             name: "VIA - Viacoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.viacoin;
                 setHdCoin(14);
@@ -47427,7 +47524,7 @@ window.Entropy = new (function() {
         },
         {
             name: "VIA - Viacoin Testnet",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.viacointestnet;
                 setHdCoin(1);
@@ -47435,7 +47532,7 @@ window.Entropy = new (function() {
         },
         {
             name: "XMY - Myriadcoin",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.myriadcoin;
                 setHdCoin(90);
@@ -47443,7 +47540,7 @@ window.Entropy = new (function() {
         },
         {
             name: "XRP - Ripple",
-            bip49available: false,
+            p2wpkhNestedInP2shAvailable: false,
             onSelect: function() {
                 network = bitcoinjs.bitcoin.networks.bitcoin;
                 setHdCoin(144);