]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - src/js/index.js
added Thought network spec
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / src / js / index.js
index f3302a64bfee229566ff574b82f474ad6db82773..0ecb735af3d7742563b950eca76180eafda515f4 100644 (file)
     }
 
     function validateRootKey(rootKeyBase58) {
-        if(isGRS()) 
+        if(isGRS())
             return validateRootKeyGRS(rootKeyBase58);
-            
+
         // try various segwit network params since this extended key may be from
         // any one of them.
         if (networkHasSegwit()) {
                     privkey = keyPair.toWIF();
                     // BIP38 encode private key if required
                     if (useBip38) {
-                        if(isGRS())  
+                        if(isGRS())
                             privkey = groestlcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) {
                                 console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index);
                             }, null, networks[DOM.network.val()].name.includes("Testnet"));
                         else if (isP2wpkhInP2sh) {
                             address = groestlcoinjs.address.fromOutputScript(scriptpubkey, network)
                         }
-                    } 
+                    }
                     //non-segwit addresses are handled by using groestlcoinjs for bip32RootKey
                 }
 
                 setHdCoin(113);
             },
         },
+        {
+            name: "THT - Thought",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.thought;
+                setHdCoin(1618);
+            },
+        },
         {
             name: "TOA - Toa",
             onSelect: function() {