]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - bip39-standalone.html
Merge pull request #92 from jonspock/master
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / bip39-standalone.html
index ea27a1f4603f2550a9814c1f7d5b60765bb172d0..f1837776d0a20a1931591c2ad6d2d92050c8a8b1 100644 (file)
         <div class="container">
 
             <h1 class="text-center">Mnemonic Code Converter</h1>
-            <p class="version">v0.2.0</p>
+            <p class="version">v0.2.2</p>
             <hr>
             <div class="row">
                 <div class="col-md-12">
@@ -22160,6 +22160,17 @@ bitcoinjs.bitcoin.networks.dash = {
   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",
   bip32: {
@@ -22291,6 +22302,39 @@ bitcoinjs.bitcoin.networks.zetacoin = {
   scriptHash: 0x09,
   wif: 0xe0,
 }
+
+bitcoinjs.bitcoin.networks.myriadcoin = {
+  messagePrefix: "unused",
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488ade4
+  },
+  pubKeyHash: 0x32,
+  scriptHash: 0x00, // TODO set this correctly
+  wif: 0xb2,
+};
+
+bitcoinjs.bitcoin.networks.pivx = {
+  messagePrefix: "unused",
+  bip32: {
+    public: 0x022d2533,
+    private: 0x0221312b
+  },
+  pubKeyHash: 0x1e,
+  scriptHash: 0x0d,
+  wif: 0xd4,
+};
+
+bitcoinjs.bitcoin.networks.pivxtestnet = {
+  messagePrefix: "unused",
+  bip32: {
+    public: 0x3a8061a0,
+    private: 0x3a805837
+  },
+  pubKeyHash: 0x8b,
+  scriptHash: 0x13,
+  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){
 (function (global){
@@ -46228,6 +46272,10 @@ window.Entropy = new (function() {
 
     function delayedPhraseChanged() {
         hideValidationError();
+        seed = null;
+        bip32RootKey = null;
+        bip32ExtendedKey = null;
+        clearAddressesList();
         showPending();
         if (phraseChangeTimeoutEvent != null) {
             clearTimeout(phraseChangeTimeoutEvent);
@@ -46237,7 +46285,6 @@ window.Entropy = new (function() {
 
     function phraseChanged() {
         showPending();
-        hideValidationError();
         setMnemonicLanguage();
         // Get the mnemonic phrase
         var phrase = DOM.phrase.val();
@@ -46250,7 +46297,6 @@ window.Entropy = new (function() {
         var passphrase = DOM.passphrase.val();
         calcBip32RootKeyFromSeed(phrase, passphrase);
         calcForDerivationPath();
-        hidePending();
     }
 
     function delayedEntropyChanged() {
@@ -46326,10 +46372,9 @@ window.Entropy = new (function() {
     }
 
     function calcForDerivationPath() {
-        showPending();
         clearDerivedKeys();
         clearAddressesList();
-        hideValidationError();
+        showPending();
         // Don't show bip49 if it's selected but network doesn't support it
         if (bip49TabSelected() && !networkHasBip49()) {
             return;
@@ -46349,7 +46394,6 @@ window.Entropy = new (function() {
             displayBip49Info();
         }
         displayBip32Info();
-        hidePending();
     }
 
     function generateClicked() {
@@ -46656,17 +46700,19 @@ window.Entropy = new (function() {
                 for (var i=0; i<rows.length; i++) {
                     rows[i].shouldGenerate = false;
                 }
+                hidePending();
             }
 
             for (var i=0; i<total; i++) {
                 var index = i + start;
-                rows.push(new TableRow(index));
+                var isLast = i == total - 1;
+                rows.push(new TableRow(index, isLast));
             }
 
         })());
     }
 
-    function TableRow(index) {
+    function TableRow(index, isLast) {
 
         var self = this;
         this.shouldGenerate = true;
@@ -46728,6 +46774,9 @@ window.Entropy = new (function() {
                     address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
                 }
                 addAddressToList(indexText, address, pubkey, privkey);
+                if (isLast) {
+                    hidePending();
+                }
             }, 50)
         }
 
@@ -46871,6 +46920,9 @@ window.Entropy = new (function() {
             var option = $("<option>");
             option.attr("value", i);
             option.text(network.name);
+            if (network.name == "BTC - Bitcoin") {
+                option.prop("selected", true);
+            }
             DOM.phraseNetwork.append(option);
         }
     }
@@ -47216,6 +47268,14 @@ window.Entropy = new (function() {
     }
 
     var networks = [
+        {
+            name: "BCH - Bitcoin Cash",
+            bip49available: false,
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.bitcoin;
+                setHdCoin(145);
+            },
+        },
         {
             name: "BTC - Bitcoin",
             bip49available: true,
@@ -47304,6 +47364,15 @@ window.Entropy = new (function() {
                 setHdCoin(2);
             },
         },
+        {
+            name: "MAZA - Maza",
+            bip49available: false,
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.maza;
+                setHdCoin(13);
+            },
+        },
+
         {
             name: "NMC - Namecoin",
             bip49available: false,
@@ -47312,6 +47381,22 @@ window.Entropy = new (function() {
                 setHdCoin(7);
             },
         },
+        {
+            name: "PIVX - PIVX",
+            bip49available: false,
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.pivx;
+                setHdCoin(119);
+            },
+        },
+        {
+            name: "PIVX - PIVX Testnet",
+            bip49available: false,
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.pivxtestnet;
+                setHdCoin(1);
+            },
+        },
         {
             name: "PPC - Peercoin",
             bip49available: false,
@@ -47368,6 +47453,14 @@ window.Entropy = new (function() {
                 setHdCoin(1);
             },
         },
+        {
+            name: "XMY - Myriadcoin",
+            bip49available: false,
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.myriadcoin;
+                setHdCoin(90);
+            },
+        },
         {
             name: "XRP - Ripple",
             bip49available: false,