]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Merge pull request #92 from jonspock/master
authoriancoleman <coleman.ian@gmail.com>
Tue, 22 Aug 2017 23:30:43 +0000 (09:30 +1000)
committerGitHub <noreply@github.com>
Tue, 22 Aug 2017 23:30:43 +0000 (09:30 +1000)
Add maza coin, update PIVX in bip39-standalone.html

1  2 
bip39-standalone.html
src/js/index.js

diff --combined bip39-standalone.html
index 8c2c6a4ed4b21f80a215f85965bad5b503fed824,c828bdcfcb4d2f6e42baa4388dc5324e0750d8a6..f1837776d0a20a1931591c2ad6d2d92050c8a8b1
          <div class="container">
  
              <h1 class="text-center">Mnemonic Code Converter</h1>
 -            <p class="version">v0.2.1</p>
 +            <p class="version">v0.2.2</p>
              <hr>
              <div class="row">
                  <div class="col-md-12">
@@@ -22160,6 -22160,17 +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: {
@@@ -46261,10 -46272,6 +46272,10 @@@ window.Entropy = new (function() 
  
      function delayedPhraseChanged() {
          hideValidationError();
 +        seed = null;
 +        bip32RootKey = null;
 +        bip32ExtendedKey = null;
 +        clearAddressesList();
          showPending();
          if (phraseChangeTimeoutEvent != null) {
              clearTimeout(phraseChangeTimeoutEvent);
  
      function phraseChanged() {
          showPending();
 -        hideValidationError();
          setMnemonicLanguage();
          // Get the mnemonic phrase
          var phrase = DOM.phrase.val();
          var passphrase = DOM.passphrase.val();
          calcBip32RootKeyFromSeed(phrase, passphrase);
          calcForDerivationPath();
 -        hidePending();
      }
  
      function delayedEntropyChanged() {
      }
  
      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;
              displayBip49Info();
          }
          displayBip32Info();
 -        hidePending();
      }
  
      function generateClicked() {
                  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;
                      address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
                  }
                  addAddressToList(indexText, address, pubkey, privkey);
 +                if (isLast) {
 +                    hidePending();
 +                }
              }, 50)
          }
  
                  setHdCoin(2);
              },
          },
+         {
+             name: "MAZA - Maza",
+             bip49available: false,
+             onSelect: function() {
+                 network = bitcoinjs.bitcoin.networks.maza;
+                 setHdCoin(13);
+             },
+         },
          {
              name: "NMC - Namecoin",
              bip49available: false,
diff --combined src/js/index.js
index 678d52b25d1aaca4d7292b50c24c1873cf2ae839,79f4e4ccb4dbb48e200a403c124b7d5970db20eb..3a5a0ef3fecc7f4d804bc84bc118832c28f20527
  
      function delayedPhraseChanged() {
          hideValidationError();
 +        seed = null;
 +        bip32RootKey = null;
 +        bip32ExtendedKey = null;
 +        clearAddressesList();
          showPending();
          if (phraseChangeTimeoutEvent != null) {
              clearTimeout(phraseChangeTimeoutEvent);
  
      function phraseChanged() {
          showPending();
 -        hideValidationError();
          setMnemonicLanguage();
          // Get the mnemonic phrase
          var phrase = DOM.phrase.val();
          var passphrase = DOM.passphrase.val();
          calcBip32RootKeyFromSeed(phrase, passphrase);
          calcForDerivationPath();
 -        hidePending();
      }
  
      function delayedEntropyChanged() {
      }
  
      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;
              displayBip49Info();
          }
          displayBip32Info();
 -        hidePending();
      }
  
      function generateClicked() {
                  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;
                      address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
                  }
                  addAddressToList(indexText, address, pubkey, privkey);
 +                if (isLast) {
 +                    hidePending();
 +                }
              }, 50)
          }
  
                  setHdCoin(2);
              },
          },
+         {
+             name: "MAZA - Maza",
+             bip49available: false,
+             onSelect: function() {
+                 network = bitcoinjs.bitcoin.networks.maza;
+                 setHdCoin(13);
+             },
+         },
          {
              name: "NMC - Namecoin",
              bip49available: false,