aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/css/app.css3
-rw-r--r--src/index.html177
-rw-r--r--src/js/index.js228
-rw-r--r--src/js/segwit-parameters.js14
4 files changed, 217 insertions, 205 deletions
diff --git a/src/css/app.css b/src/css/app.css
index 71109ef..576b7d7 100644
--- a/src/css/app.css
+++ b/src/css/app.css
@@ -103,3 +103,6 @@ body {
103 overflow-x: scroll; 103 overflow-x: scroll;
104 font-family: monospace; 104 font-family: monospace;
105} 105}
106.visual-privacy .private-data {
107 display: none;
108}
diff --git a/src/index.html b/src/index.html
index a53a20b..0720867 100644
--- a/src/index.html
+++ b/src/index.html
@@ -15,7 +15,7 @@
15 <div class="container"> 15 <div class="container">
16 16
17 <h1 class="text-center">Mnemonic Code Converter</h1> 17 <h1 class="text-center">Mnemonic Code Converter</h1>
18 <p class="version">v0.3.6</p> 18 <p class="version">v0.3.7</p>
19 <hr> 19 <hr>
20 <div class="row"> 20 <div class="row">
21 <div class="col-md-12"> 21 <div class="col-md-12">
@@ -69,7 +69,7 @@
69 <div class="form-group"> 69 <div class="form-group">
70 <label for="entropy" class="col-sm-2 control-label">Entropy</label> 70 <label for="entropy" class="col-sm-2 control-label">Entropy</label>
71 <div class="col-sm-7"> 71 <div class="col-sm-7">
72 <textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards"></textarea> 72 <textarea id="entropy" rows="2" class="entropy private-data form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards"></textarea>
73 <div class="row filter-warning text-danger hidden"> 73 <div class="row filter-warning text-danger hidden">
74 <p class="col-sm-12"> 74 <p class="col-sm-12">
75 <strong> 75 <strong>
@@ -96,19 +96,19 @@
96 <div class="bits col-sm-3 form-control-static"></div> 96 <div class="bits col-sm-3 form-control-static"></div>
97 </div> 97 </div>
98 <label class="col-sm-3 control-label">Filtered Entropy</label> 98 <label class="col-sm-3 control-label">Filtered Entropy</label>
99 <div class="filtered col-sm-9 form-control-static"></div> 99 <div class="filtered private-data col-sm-9 form-control-static"></div>
100 <label class="col-sm-3 control-label">Raw Binary</label> 100 <label class="col-sm-3 control-label">Raw Binary</label>
101 <div class="binary col-sm-9 form-control-static"></div> 101 <div class="binary private-data col-sm-9 form-control-static"></div>
102 <label class="col-sm-3 control-label">Binary Checksum</label> 102 <label class="col-sm-3 control-label">Binary Checksum</label>
103 <div class="checksum col-sm-9 form-control-static">&nbsp;</div> 103 <div class="checksum private-data col-sm-9 form-control-static">&nbsp;</div>
104 <label class="col-sm-3 control-label">Word Indexes</label> 104 <label class="col-sm-3 control-label">Word Indexes</label>
105 <div class="word-indexes col-sm-9 form-control-static">&nbsp;</div> 105 <div class="word-indexes private-data col-sm-9 form-control-static">&nbsp;</div>
106 <label class="col-sm-3 control-label">Mnemonic Length</label> 106 <label class="col-sm-3 control-label">Mnemonic Length</label>
107 <div class="col-sm-9"> 107 <div class="col-sm-9">
108 <select class="mnemonic-length form-control"> 108 <select class="mnemonic-length form-control">
109 <option value="raw" selected>Use Raw Entropy (3 words per 32 bits)</option> 109 <option value="raw" selected>Use Raw Entropy (3 words per 32 bits)</option>
110 <option value="12">12 <span>Words</span></option> 110 <option value="12">12 <span>Words</span></option>
111 <option value="15">15 <span>Words</option> 111 <option value="15">15 <span>Words</span></option>
112 <option value="18">18 <span>Words</span></option> 112 <option value="18">18 <span>Words</span></option>
113 <option value="21">21 <span>Words</span></option> 113 <option value="21">21 <span>Words</span></option>
114 <option value="24">24 <span>Words</span></option> 114 <option value="24">24 <span>Words</span></option>
@@ -143,6 +143,15 @@
143 </div> 143 </div>
144 </div> 144 </div>
145 <div class="form-group"> 145 <div class="form-group">
146 <div class="col-sm-2"></div>
147 <div class="col-sm-10 checkbox">
148 <label>
149 <input type="checkbox" class="privacy-screen-toggle">
150 <span>Hide all private info</span>
151 </label>
152 </div>
153 </div>
154 <div class="form-group">
146 <label class="col-sm-2 control-label">Mnemonic Language</label> 155 <label class="col-sm-2 control-label">Mnemonic Language</label>
147 <div class="col-sm-10 languages"> 156 <div class="col-sm-10 languages">
148 <div class="form-control no-border"> 157 <div class="form-control no-border">
@@ -160,19 +169,19 @@
160 <div class="form-group"> 169 <div class="form-group">
161 <label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label> 170 <label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label>
162 <div class="col-sm-10"> 171 <div class="col-sm-10">
163 <textarea id="phrase" class="phrase form-control" data-show-qr></textarea> 172 <textarea id="phrase" class="phrase private-data form-control" data-show-qr></textarea>
164 </div> 173 </div>
165 </div> 174 </div>
166 <div class="form-group"> 175 <div class="form-group">
167 <label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label> 176 <label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label>
168 <div class="col-sm-10"> 177 <div class="col-sm-10">
169 <textarea id="passphrase" class="passphrase form-control"></textarea> 178 <textarea id="passphrase" class="passphrase private-data form-control"></textarea>
170 </div> 179 </div>
171 </div> 180 </div>
172 <div class="form-group"> 181 <div class="form-group">
173 <label for="seed" class="col-sm-2 control-label">BIP39 Seed</label> 182 <label for="seed" class="col-sm-2 control-label">BIP39 Seed</label>
174 <div class="col-sm-10"> 183 <div class="col-sm-10">
175 <textarea id="seed" class="seed form-control" readonly="readonly" data-show-qr></textarea> 184 <textarea id="seed" class="seed private-data form-control" readonly="readonly" data-show-qr></textarea>
176 </div> 185 </div>
177 </div> 186 </div>
178 <div class="form-group"> 187 <div class="form-group">
@@ -186,7 +195,7 @@
186 <div class="form-group"> 195 <div class="form-group">
187 <label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label> 196 <label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label>
188 <div class="col-sm-10"> 197 <div class="col-sm-10">
189 <textarea id="root-key" class="root-key form-control" data-show-qr></textarea> 198 <textarea id="root-key" class="root-key private-data form-control" data-show-qr></textarea>
190 </div> 199 </div>
191 </div> 200 </div>
192 <div class="form-group litecoin-ltub-container hidden"> 201 <div class="form-group litecoin-ltub-container hidden">
@@ -279,7 +288,7 @@
279 <span>Account Extended Private Key</span> 288 <span>Account Extended Private Key</span>
280 </label> 289 </label>
281 <div class="col-sm-10"> 290 <div class="col-sm-10">
282 <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> 291 <textarea id="account-xprv" type="text" class="account-xprv private-data form-control" readonly data-show-qr></textarea>
283 </div> 292 </div>
284 </div> 293 </div>
285 <div class="form-group"> 294 <div class="form-group">
@@ -439,7 +448,7 @@
439 <span>Account Extended Private Key</span> 448 <span>Account Extended Private Key</span>
440 </label> 449 </label>
441 <div class="col-sm-10"> 450 <div class="col-sm-10">
442 <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> 451 <textarea id="account-xprv" type="text" class="account-xprv private-data form-control" readonly data-show-qr></textarea>
443 </div> 452 </div>
444 </div> 453 </div>
445 <div class="form-group"> 454 <div class="form-group">
@@ -506,79 +515,89 @@
506 <div id="bip84" class="tab-pane"> 515 <div id="bip84" class="tab-pane">
507 <form class="form-horizontal" role="form"> 516 <form class="form-horizontal" role="form">
508 <br> 517 <br>
509 <div class="col-sm-2"></div> 518 <div class="unavailable hidden">
510 <div class="col-sm-10"> 519 <div class="form-group">
511 <p> 520 <div class="col-sm-2"></div>
512 For more info see the 521 <div class="col-sm-10">
513 <a href="https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki" target="_blank">BIP84 spec</a>. 522 <p>BIP84 is unavailable for this coin.</p>
514 </p> 523 </div>
515 </div>
516 <div class="form-group">
517 <label for="purpose" class="col-sm-2 control-label">
518 Purpose
519 </label>
520 <div class="col-sm-10">
521 <input id="purpose" type="text" class="purpose form-control" value="84" readonly>
522 </div> 524 </div>
523 </div> 525 </div>
524 <div class="form-group"> 526 <div class="available">
525 <label for="coin" class="col-sm-2 control-label"> 527 <div class="col-sm-2"></div>
526 Coin
527 </label>
528 <div class="col-sm-10"> 528 <div class="col-sm-10">
529 <input id="coin" type="text" class="coin form-control" value="0" readonly> 529 <p>
530 For more info see the
531 <a href="https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki" target="_blank">BIP84 spec</a>.
532 </p>
530 </div> 533 </div>
531 </div> 534 <div class="form-group">
532 <div class="form-group"> 535 <label for="purpose" class="col-sm-2 control-label">
533 <label for="account" class="col-sm-2 control-label"> 536 Purpose
534 Account 537 </label>
535 </label> 538 <div class="col-sm-10">
536 <div class="col-sm-10"> 539 <input id="purpose" type="text" class="purpose form-control" value="84" readonly>
537 <input id="account" type="text" class="account form-control" value="0"> 540 </div>
538 </div> 541 </div>
539 </div> 542 <div class="form-group">
540 <div class="form-group"> 543 <label for="coin" class="col-sm-2 control-label">
541 <label for="change" class="col-sm-2 control-label"> 544 Coin
542 External / Internal 545 </label>
543 </label> 546 <div class="col-sm-10">
544 <div class="col-sm-10"> 547 <input id="coin" type="text" class="coin form-control" value="0" readonly>
545 <input id="change" type="text" class="change form-control" value="0"> 548 </div>
546 </div> 549 </div>
547 </div> 550 <div class="form-group">
548 <div class="form-group"> 551 <label for="account" class="col-sm-2 control-label">
549 <label class="col-sm-2 control-label"> 552 Account
550 </label> 553 </label>
551 <div class="col-sm-10"> 554 <div class="col-sm-10">
552 <p>The account extended keys can be used for importing to most BIP84 compatible wallets.</p> 555 <input id="account" type="text" class="account form-control" value="0">
556 </div>
553 </div> 557 </div>
554 </div> 558 <div class="form-group">
555 <div class="form-group"> 559 <label for="change" class="col-sm-2 control-label">
556 <label for="account-xprv" class="col-sm-2 control-label"> 560 External / Internal
557 <span>Account Extended Private Key</span> 561 </label>
558 </label> 562 <div class="col-sm-10">
559 <div class="col-sm-10"> 563 <input id="change" type="text" class="change form-control" value="0">
560 <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> 564 </div>
561 </div> 565 </div>
562 </div> 566 <div class="form-group">
563 <div class="form-group"> 567 <label class="col-sm-2 control-label">
564 <label for="account-xpub" class="col-sm-2 control-label"> 568 </label>
565 <span>Account Extended Public Key</span> 569 <div class="col-sm-10">
566 </label> 570 <p>The account extended keys can be used for importing to most BIP84 compatible wallets.</p>
567 <div class="col-sm-10"> 571 </div>
568 <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea>
569 </div> 572 </div>
570 </div> 573 <div class="form-group">
571 <div class="form-group"> 574 <label for="account-xprv" class="col-sm-2 control-label">
572 <label class="col-sm-2 control-label"> 575 <span>Account Extended Private Key</span>
573 </label> 576 </label>
574 <div class="col-sm-10"> 577 <div class="col-sm-10">
575 <p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> 578 <textarea id="account-xprv" type="text" class="account-xprv private-data form-control" readonly data-show-qr></textarea>
579 </div>
576 </div> 580 </div>
577 </div> 581 <div class="form-group">
578 <div class="form-group"> 582 <label for="account-xpub" class="col-sm-2 control-label">
579 <label for="bip84-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> 583 <span>Account Extended Public Key</span>
580 <div class="col-sm-10"> 584 </label>
581 <input id="bip84-path" type="text" class="path form-control" value="m/84'/0'/0'/0" readonly="readonly"> 585 <div class="col-sm-10">
586 <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea>
587 </div>
588 </div>
589 <div class="form-group">
590 <label class="col-sm-2 control-label">
591 </label>
592 <div class="col-sm-10">
593 <p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p>
594 </div>
595 </div>
596 <div class="form-group">
597 <label for="bip84-path" class="col-sm-2 control-label">BIP32 Derivation Path</label>
598 <div class="col-sm-10">
599 <input id="bip84-path" type="text" class="path form-control" value="m/84'/0'/0'/0" readonly="readonly">
600 </div>
582 </div> 601 </div>
583 </div> 602 </div>
584 </form> 603 </form>
@@ -588,7 +607,7 @@
588 <div class="form-group"> 607 <div class="form-group">
589 <label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Private Key</label> 608 <label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Private Key</label>
590 <div class="col-sm-10"> 609 <div class="col-sm-10">
591 <textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly" data-show-qr></textarea> 610 <textarea id="extended-priv-key" class="extended-priv-key private-data form-control" readonly="readonly" data-show-qr></textarea>
592 </div> 611 </div>
593 </div> 612 </div>
594 <div class="form-group"> 613 <div class="form-group">
@@ -634,7 +653,7 @@
634 <input type="checkbox" class="use-bip38"> 653 <input type="checkbox" class="use-bip38">
635 <span>Encrypt private keys using BIP38 and this password:</span> 654 <span>Encrypt private keys using BIP38 and this password:</span>
636 </label> 655 </label>
637 <input class="bip38-password"> 656 <input class="bip38-password private-data">
638 <span>Enabling BIP38 means each key will take several minutes to generate.</span> 657 <span>Enabling BIP38 means each key will take several minutes to generate.</span>
639 </div> 658 </div>
640 </div> 659 </div>
@@ -899,7 +918,7 @@
899 <td class="index"><span></span></td> 918 <td class="index"><span></span></td>
900 <td class="address"><span data-show-qr></span></td> 919 <td class="address"><span data-show-qr></span></td>
901 <td class="pubkey"><span data-show-qr></span></td> 920 <td class="pubkey"><span data-show-qr></span></td>
902 <td class="privkey"><span data-show-qr></span></td> 921 <td class="privkey private-data"><span data-show-qr></span></td>
903 </tr> 922 </tr>
904 </script> 923 </script>
905 <script src="js/polyfill.es6.js"></script> 924 <script src="js/polyfill.es6.js"></script>
diff --git a/src/js/index.js b/src/js/index.js
index 7d04a05..371cea9 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -23,6 +23,7 @@
23 var generationProcesses = []; 23 var generationProcesses = [];
24 24
25 var DOM = {}; 25 var DOM = {};
26 DOM.privacyScreenToggle = $(".privacy-screen-toggle");
26 DOM.network = $(".network"); 27 DOM.network = $(".network");
27 DOM.bip32Client = $("#bip32-client"); 28 DOM.bip32Client = $("#bip32-client");
28 DOM.phraseNetwork = $("#network-phrase"); 29 DOM.phraseNetwork = $("#network-phrase");
@@ -77,6 +78,8 @@
77 DOM.bip49accountXprv = $("#bip49 .account-xprv"); 78 DOM.bip49accountXprv = $("#bip49 .account-xprv");
78 DOM.bip49accountXpub = $("#bip49 .account-xpub"); 79 DOM.bip49accountXpub = $("#bip49 .account-xpub");
79 DOM.bip49change = $("#bip49 .change"); 80 DOM.bip49change = $("#bip49 .change");
81 DOM.bip84unavailable = $("#bip84 .unavailable");
82 DOM.bip84available = $("#bip84 .available");
80 DOM.bip84path = $("#bip84-path"); 83 DOM.bip84path = $("#bip84-path");
81 DOM.bip84purpose = $("#bip84 .purpose"); 84 DOM.bip84purpose = $("#bip84 .purpose");
82 DOM.bip84coin = $("#bip84 .coin"); 85 DOM.bip84coin = $("#bip84 .coin");
@@ -116,6 +119,7 @@
116 119
117 function init() { 120 function init() {
118 // Events 121 // Events
122 DOM.privacyScreenToggle.on("change", privacyScreenToggled);
119 DOM.generatedStrength.on("change", generatedStrengthChanged); 123 DOM.generatedStrength.on("change", generatedStrengthChanged);
120 DOM.network.on("change", networkChanged); 124 DOM.network.on("change", networkChanged);
121 DOM.bip32Client.on("change", bip32ClientChanged); 125 DOM.bip32Client.on("change", bip32ClientChanged);
@@ -176,13 +180,7 @@
176 var networkIndex = e.target.value; 180 var networkIndex = e.target.value;
177 var network = networks[networkIndex]; 181 var network = networks[networkIndex];
178 network.onSelect(); 182 network.onSelect();
179 if (network.segwitAvailable) { 183 adjustNetworkForSegwit();
180 adjustNetworkForSegwit();
181 showSegwitAvailable();
182 }
183 else {
184 showSegwitUnavailable();
185 }
186 if (seed != null) { 184 if (seed != null) {
187 phraseChanged(); 185 phraseChanged();
188 } 186 }
@@ -372,8 +370,11 @@
372 showPending(); 370 showPending();
373 // Don't show segwit if it's selected but network doesn't support it 371 // Don't show segwit if it's selected but network doesn't support it
374 if (segwitSelected() && !networkHasSegwit()) { 372 if (segwitSelected() && !networkHasSegwit()) {
373 showSegwitUnavailable();
374 hidePending();
375 return; 375 return;
376 } 376 }
377 showSegwitAvailable();
377 // Get the derivation path 378 // Get the derivation path
378 var derivationPath = getDerivationPath(); 379 var derivationPath = getDerivationPath();
379 var errorText = findDerivationPathErrors(derivationPath); 380 var errorText = findDerivationPathErrors(derivationPath);
@@ -448,6 +449,17 @@
448 $("td.privkey span").toggleClass("invisible"); 449 $("td.privkey span").toggleClass("invisible");
449 } 450 }
450 451
452 function privacyScreenToggled() {
453 // private-data contains elements added to DOM at runtime
454 // so catch all by adding visual privacy class to the root of the DOM
455 if (DOM.privacyScreenToggle.prop("checked")) {
456 $("body").addClass("visual-privacy");
457 }
458 else {
459 $("body").removeClass("visual-privacy");
460 }
461 }
462
451 // Private methods 463 // Private methods
452 464
453 function generateRandomPhrase() { 465 function generateRandomPhrase() {
@@ -479,6 +491,37 @@
479 } 491 }
480 492
481 function calcBip32RootKeyFromBase58(rootKeyBase58) { 493 function calcBip32RootKeyFromBase58(rootKeyBase58) {
494 // try parsing with various segwit network params since this extended
495 // key may be from any one of them.
496 if (networkHasSegwit()) {
497 var n = network;
498 if ("baseNetwork" in n) {
499 n = bitcoinjs.bitcoin.networks[n.baseNetwork];
500 }
501 // try parsing using base network params
502 try {
503 bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, n);
504 return;
505 }
506 catch (e) {}
507 // try parsing using p2wpkh params
508 if ("p2wpkh" in n) {
509 try {
510 bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, n.p2wpkh);
511 return;
512 }
513 catch (e) {}
514 }
515 // try parsing using p2wpkh-in-p2sh network params
516 if ("p2wpkhInP2sh" in n) {
517 try {
518 bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, n.p2wpkhInP2sh);
519 return;
520 }
521 catch (e) {}
522 }
523 }
524 // try the network params as currently specified
482 bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); 525 bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network);
483 } 526 }
484 527
@@ -552,6 +595,37 @@
552 } 595 }
553 596
554 function validateRootKey(rootKeyBase58) { 597 function validateRootKey(rootKeyBase58) {
598 // try various segwit network params since this extended key may be from
599 // any one of them.
600 if (networkHasSegwit()) {
601 var n = network;
602 if ("baseNetwork" in n) {
603 n = bitcoinjs.bitcoin.networks[n.baseNetwork];
604 }
605 // try parsing using base network params
606 try {
607 bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, n);
608 return "";
609 }
610 catch (e) {}
611 // try parsing using p2wpkh params
612 if ("p2wpkh" in n) {
613 try {
614 bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, n.p2wpkh);
615 return "";
616 }
617 catch (e) {}
618 }
619 // try parsing using p2wpkh-in-p2sh network params
620 if ("p2wpkhInP2sh" in n) {
621 try {
622 bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, n.p2wpkhInP2sh);
623 return "";
624 }
625 catch (e) {}
626 }
627 }
628 // try the network params as currently specified
555 try { 629 try {
556 bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); 630 bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network);
557 } 631 }
@@ -813,7 +887,7 @@
813 var keyPair = key.keyPair; 887 var keyPair = key.keyPair;
814 var useUncompressed = useBip38; 888 var useUncompressed = useBip38;
815 if (useUncompressed) { 889 if (useUncompressed) {
816 keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { compressed: false }); 890 keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false });
817 } 891 }
818 // get address 892 // get address
819 var address = keyPair.getAddress().toString(); 893 var address = keyPair.getAddress().toString();
@@ -821,7 +895,7 @@
821 var hasPrivkey = !key.isNeutered(); 895 var hasPrivkey = !key.isNeutered();
822 var privkey = "NA"; 896 var privkey = "NA";
823 if (hasPrivkey) { 897 if (hasPrivkey) {
824 privkey = keyPair.toWIF(network); 898 privkey = keyPair.toWIF();
825 // BIP38 encode private key if required 899 // BIP38 encode private key if required
826 if (useBip38) { 900 if (useBip38) {
827 privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { 901 privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) {
@@ -1398,7 +1472,20 @@
1398 } 1472 }
1399 1473
1400 function networkHasSegwit() { 1474 function networkHasSegwit() {
1401 return networks[DOM.network.val()].segwitAvailable; 1475 var n = network;
1476 if ("baseNetwork" in network) {
1477 n = bitcoinjs.bitcoin.networks[network.baseNetwork];
1478 }
1479 // check if only p2wpkh params are required
1480 if (p2wpkhSelected()) {
1481 return "p2wpkh" in n;
1482 }
1483 // check if only p2wpkh-in-p2sh params are required
1484 else if (p2wpkhInP2shSelected()) {
1485 return "p2wpkhInP2sh" in n;
1486 }
1487 // require both if it's unclear which params are required
1488 return "p2wpkh" in n && "p2wpkhInP2sh" in n;
1402 } 1489 }
1403 1490
1404 function bip49TabSelected() { 1491 function bip49TabSelected() {
@@ -1422,6 +1509,8 @@
1422 function showSegwitAvailable() { 1509 function showSegwitAvailable() {
1423 DOM.bip49unavailable.addClass("hidden"); 1510 DOM.bip49unavailable.addClass("hidden");
1424 DOM.bip49available.removeClass("hidden"); 1511 DOM.bip49available.removeClass("hidden");
1512 DOM.bip84unavailable.addClass("hidden");
1513 DOM.bip84available.removeClass("hidden");
1425 DOM.bip141unavailable.addClass("hidden"); 1514 DOM.bip141unavailable.addClass("hidden");
1426 DOM.bip141available.removeClass("hidden"); 1515 DOM.bip141available.removeClass("hidden");
1427 } 1516 }
@@ -1429,6 +1518,8 @@
1429 function showSegwitUnavailable() { 1518 function showSegwitUnavailable() {
1430 DOM.bip49available.addClass("hidden"); 1519 DOM.bip49available.addClass("hidden");
1431 DOM.bip49unavailable.removeClass("hidden"); 1520 DOM.bip49unavailable.removeClass("hidden");
1521 DOM.bip84available.addClass("hidden");
1522 DOM.bip84unavailable.removeClass("hidden");
1432 DOM.bip141available.addClass("hidden"); 1523 DOM.bip141available.addClass("hidden");
1433 DOM.bip141unavailable.removeClass("hidden"); 1524 DOM.bip141unavailable.removeClass("hidden");
1434 } 1525 }
@@ -1543,7 +1634,6 @@
1543 var networks = [ 1634 var networks = [
1544 { 1635 {
1545 name: "AC - Asiacoin", 1636 name: "AC - Asiacoin",
1546 segwitAvailable: false,
1547 onSelect: function() { 1637 onSelect: function() {
1548 network = bitcoinjs.bitcoin.networks.asiacoin; 1638 network = bitcoinjs.bitcoin.networks.asiacoin;
1549 setHdCoin(51); 1639 setHdCoin(51);
@@ -1551,7 +1641,6 @@
1551 }, 1641 },
1552 { 1642 {
1553 name: "ACC - Adcoin", 1643 name: "ACC - Adcoin",
1554 segwitAvailable: true,
1555 onSelect: function() { 1644 onSelect: function() {
1556 network = bitcoinjs.bitcoin.networks.adcoin; 1645 network = bitcoinjs.bitcoin.networks.adcoin;
1557 setHdCoin(161); 1646 setHdCoin(161);
@@ -1559,7 +1648,6 @@
1559 }, 1648 },
1560 { 1649 {
1561 name: "AUR - Auroracoin", 1650 name: "AUR - Auroracoin",
1562 segwitAvailable: false,
1563 onSelect: function() { 1651 onSelect: function() {
1564 network = bitcoinjs.bitcoin.networks.auroracoin; 1652 network = bitcoinjs.bitcoin.networks.auroracoin;
1565 setHdCoin(85); 1653 setHdCoin(85);
@@ -1567,7 +1655,6 @@
1567 }, 1655 },
1568 { 1656 {
1569 name: "AXE - Axe", 1657 name: "AXE - Axe",
1570 segwitAvailable: false,
1571 onSelect: function() { 1658 onSelect: function() {
1572 network = bitcoinjs.bitcoin.networks.axe; 1659 network = bitcoinjs.bitcoin.networks.axe;
1573 setHdCoin(4242); 1660 setHdCoin(4242);
@@ -1575,7 +1662,6 @@
1575 }, 1662 },
1576 { 1663 {
1577 name: "BCA - Bitcoin Atom", 1664 name: "BCA - Bitcoin Atom",
1578 segwitAvailable: true,
1579 onSelect: function() { 1665 onSelect: function() {
1580 network = bitcoinjs.bitcoin.networks.atom; 1666 network = bitcoinjs.bitcoin.networks.atom;
1581 setHdCoin(185); 1667 setHdCoin(185);
@@ -1583,7 +1669,6 @@
1583 }, 1669 },
1584 { 1670 {
1585 name: "BCH - Bitcoin Cash", 1671 name: "BCH - Bitcoin Cash",
1586 segwitAvailable: false,
1587 onSelect: function() { 1672 onSelect: function() {
1588 DOM.bitcoinCashAddressTypeContainer.removeClass("hidden"); 1673 DOM.bitcoinCashAddressTypeContainer.removeClass("hidden");
1589 setHdCoin(145); 1674 setHdCoin(145);
@@ -1591,7 +1676,6 @@
1591 }, 1676 },
1592 { 1677 {
1593 name: "BEET - Beetlecoin", 1678 name: "BEET - Beetlecoin",
1594 segwitAvailable: false,
1595 onSelect: function() { 1679 onSelect: function() {
1596 network = bitcoinjs.bitcoin.networks.beetlecoin; 1680 network = bitcoinjs.bitcoin.networks.beetlecoin;
1597 setHdCoin(800); 1681 setHdCoin(800);
@@ -1599,7 +1683,6 @@
1599 }, 1683 },
1600 { 1684 {
1601 name: "BELA - Belacoin", 1685 name: "BELA - Belacoin",
1602 segwitAvailable: false,
1603 onSelect: function() { 1686 onSelect: function() {
1604 network = bitcoinjs.bitcoin.networks.belacoin; 1687 network = bitcoinjs.bitcoin.networks.belacoin;
1605 setHdCoin(73); 1688 setHdCoin(73);
@@ -1607,7 +1690,6 @@
1607 }, 1690 },
1608 { 1691 {
1609 name: "BLK - BlackCoin", 1692 name: "BLK - BlackCoin",
1610 segwitAvailable: false,
1611 onSelect: function() { 1693 onSelect: function() {
1612 network = bitcoinjs.bitcoin.networks.blackcoin; 1694 network = bitcoinjs.bitcoin.networks.blackcoin;
1613 setHdCoin(10); 1695 setHdCoin(10);
@@ -1615,7 +1697,6 @@
1615 }, 1697 },
1616 { 1698 {
1617 name: "BRIT - Britcoin", 1699 name: "BRIT - Britcoin",
1618 segwitAvailable: false,
1619 onSelect: function() { 1700 onSelect: function() {
1620 network = bitcoinjs.bitcoin.networks.britcoin; 1701 network = bitcoinjs.bitcoin.networks.britcoin;
1621 setHdCoin(70); 1702 setHdCoin(70);
@@ -1623,7 +1704,6 @@
1623 }, 1704 },
1624 { 1705 {
1625 name: "BSD - Bitsend", 1706 name: "BSD - Bitsend",
1626 segwitAvailable: true,
1627 onSelect: function() { 1707 onSelect: function() {
1628 network = bitcoinjs.bitcoin.networks.bitsend; 1708 network = bitcoinjs.bitcoin.networks.bitsend;
1629 setHdCoin(91); 1709 setHdCoin(91);
@@ -1631,7 +1711,6 @@
1631 }, 1711 },
1632 { 1712 {
1633 name: "BTA - Bata", 1713 name: "BTA - Bata",
1634 segwitAvailable: false,
1635 onSelect: function() { 1714 onSelect: function() {
1636 network = bitcoinjs.bitcoin.networks.bata; 1715 network = bitcoinjs.bitcoin.networks.bata;
1637 setHdCoin(89); 1716 setHdCoin(89);
@@ -1639,7 +1718,6 @@
1639 }, 1718 },
1640 { 1719 {
1641 name: "BTC - Bitcoin", 1720 name: "BTC - Bitcoin",
1642 segwitAvailable: true,
1643 onSelect: function() { 1721 onSelect: function() {
1644 network = bitcoinjs.bitcoin.networks.bitcoin; 1722 network = bitcoinjs.bitcoin.networks.bitcoin;
1645 setHdCoin(0); 1723 setHdCoin(0);
@@ -1647,7 +1725,6 @@
1647 }, 1725 },
1648 { 1726 {
1649 name: "BTC - Bitcoin Testnet", 1727 name: "BTC - Bitcoin Testnet",
1650 segwitAvailable: true,
1651 onSelect: function() { 1728 onSelect: function() {
1652 network = bitcoinjs.bitcoin.networks.testnet; 1729 network = bitcoinjs.bitcoin.networks.testnet;
1653 setHdCoin(1); 1730 setHdCoin(1);
@@ -1655,7 +1732,6 @@
1655 }, 1732 },
1656 { 1733 {
1657 name: "BTCP - Bitcoin Private", 1734 name: "BTCP - Bitcoin Private",
1658 segwitAvailable: true,
1659 onSelect: function() { 1735 onSelect: function() {
1660 network = bitcoinjs.bitcoin.networks.bitcoinprivate; 1736 network = bitcoinjs.bitcoin.networks.bitcoinprivate;
1661 setHdCoin(183); 1737 setHdCoin(183);
@@ -1663,7 +1739,6 @@
1663 }, 1739 },
1664 { 1740 {
1665 name: "BTCZ - Bitcoinz", 1741 name: "BTCZ - Bitcoinz",
1666 segwitAvailable: false,
1667 onSelect: function() { 1742 onSelect: function() {
1668 network = bitcoinjs.bitcoin.networks.bitcoinz; 1743 network = bitcoinjs.bitcoin.networks.bitcoinz;
1669 setHdCoin(177); 1744 setHdCoin(177);
@@ -1671,7 +1746,6 @@
1671 }, 1746 },
1672 { 1747 {
1673 name: "BTG - Bitcoin Gold", 1748 name: "BTG - Bitcoin Gold",
1674 segwitAvailable: true,
1675 onSelect: function() { 1749 onSelect: function() {
1676 network = bitcoinjs.bitcoin.networks.bgold; 1750 network = bitcoinjs.bitcoin.networks.bgold;
1677 setHdCoin(156); 1751 setHdCoin(156);
@@ -1679,7 +1753,6 @@
1679 }, 1753 },
1680 { 1754 {
1681 name: "BTX - Bitcore", 1755 name: "BTX - Bitcore",
1682 segwitAvailable: true,
1683 onSelect: function() { 1756 onSelect: function() {
1684 network = bitcoinjs.bitcoin.networks.bitcore; 1757 network = bitcoinjs.bitcoin.networks.bitcore;
1685 setHdCoin(160); 1758 setHdCoin(160);
@@ -1687,7 +1760,6 @@
1687 }, 1760 },
1688 { 1761 {
1689 name: "CCN - Cannacoin", 1762 name: "CCN - Cannacoin",
1690 segwitAvailable: false,
1691 onSelect: function() { 1763 onSelect: function() {
1692 network = bitcoinjs.bitcoin.networks.cannacoin; 1764 network = bitcoinjs.bitcoin.networks.cannacoin;
1693 setHdCoin(19); 1765 setHdCoin(19);
@@ -1695,7 +1767,6 @@
1695 }, 1767 },
1696 { 1768 {
1697 name: "CDN - Canadaecoin", 1769 name: "CDN - Canadaecoin",
1698 segwitAvailable: false,
1699 onSelect: function() { 1770 onSelect: function() {
1700 network = bitcoinjs.bitcoin.networks.canadaecoin; 1771 network = bitcoinjs.bitcoin.networks.canadaecoin;
1701 setHdCoin(34); 1772 setHdCoin(34);
@@ -1703,7 +1774,6 @@
1703 }, 1774 },
1704 { 1775 {
1705 name: "CLAM - Clams", 1776 name: "CLAM - Clams",
1706 segwitAvailable: false,
1707 onSelect: function() { 1777 onSelect: function() {
1708 network = bitcoinjs.bitcoin.networks.clam; 1778 network = bitcoinjs.bitcoin.networks.clam;
1709 setHdCoin(23); 1779 setHdCoin(23);
@@ -1719,7 +1789,6 @@
1719 }, 1789 },
1720 { 1790 {
1721 name: "CLUB - Clubcoin", 1791 name: "CLUB - Clubcoin",
1722 segwitAvailable: false,
1723 onSelect: function() { 1792 onSelect: function() {
1724 network = bitcoinjs.bitcoin.networks.clubcoin; 1793 network = bitcoinjs.bitcoin.networks.clubcoin;
1725 setHdCoin(79); 1794 setHdCoin(79);
@@ -1727,7 +1796,6 @@
1727 }, 1796 },
1728 { 1797 {
1729 name: "CMP - Compcoin", 1798 name: "CMP - Compcoin",
1730 segwitAvailable: false,
1731 onSelect: function() { 1799 onSelect: function() {
1732 network = bitcoinjs.bitcoin.networks.compcoin; 1800 network = bitcoinjs.bitcoin.networks.compcoin;
1733 setHdCoin(71); 1801 setHdCoin(71);
@@ -1735,7 +1803,6 @@
1735 }, 1803 },
1736 { 1804 {
1737 name: "CRAVE - Crave", 1805 name: "CRAVE - Crave",
1738 segwitAvailable: false,
1739 onSelect: function() { 1806 onSelect: function() {
1740 network = bitcoinjs.bitcoin.networks.crave; 1807 network = bitcoinjs.bitcoin.networks.crave;
1741 setHdCoin(186); 1808 setHdCoin(186);
@@ -1743,7 +1810,6 @@
1743 }, 1810 },
1744 { 1811 {
1745 name: "CRW - Crown", 1812 name: "CRW - Crown",
1746 segwitAvailable: false,
1747 onSelect: function() { 1813 onSelect: function() {
1748 network = bitcoinjs.bitcoin.networks.crown; 1814 network = bitcoinjs.bitcoin.networks.crown;
1749 setHdCoin(72); 1815 setHdCoin(72);
@@ -1751,7 +1817,6 @@
1751 }, 1817 },
1752 { 1818 {
1753 name: "DASH - Dash", 1819 name: "DASH - Dash",
1754 segwitAvailable: false,
1755 onSelect: function() { 1820 onSelect: function() {
1756 network = bitcoinjs.bitcoin.networks.dash; 1821 network = bitcoinjs.bitcoin.networks.dash;
1757 setHdCoin(5); 1822 setHdCoin(5);
@@ -1759,7 +1824,6 @@
1759 }, 1824 },
1760 { 1825 {
1761 name: "DASH - Dash Testnet", 1826 name: "DASH - Dash Testnet",
1762 segwitAvailable: false,
1763 onSelect: function() { 1827 onSelect: function() {
1764 network = bitcoinjs.bitcoin.networks.dashtn; 1828 network = bitcoinjs.bitcoin.networks.dashtn;
1765 setHdCoin(1); 1829 setHdCoin(1);
@@ -1767,7 +1831,6 @@
1767 }, 1831 },
1768 { 1832 {
1769 name: "DFC - Defcoin", 1833 name: "DFC - Defcoin",
1770 segwitAvailable: false,
1771 onSelect: function() { 1834 onSelect: function() {
1772 network = bitcoinjs.bitcoin.networks.defcoin; 1835 network = bitcoinjs.bitcoin.networks.defcoin;
1773 setHdCoin(1337); 1836 setHdCoin(1337);
@@ -1775,7 +1838,6 @@
1775 }, 1838 },
1776 { 1839 {
1777 name: "DGB - Digibyte", 1840 name: "DGB - Digibyte",
1778 segwitAvailable: true,
1779 onSelect: function() { 1841 onSelect: function() {
1780 network = bitcoinjs.bitcoin.networks.digibyte; 1842 network = bitcoinjs.bitcoin.networks.digibyte;
1781 setHdCoin(20); 1843 setHdCoin(20);
@@ -1783,7 +1845,6 @@
1783 }, 1845 },
1784 { 1846 {
1785 name: "DGC - Digitalcoin", 1847 name: "DGC - Digitalcoin",
1786 segwitAvailable: false,
1787 onSelect: function() { 1848 onSelect: function() {
1788 network = bitcoinjs.bitcoin.networks.digitalcoin; 1849 network = bitcoinjs.bitcoin.networks.digitalcoin;
1789 setHdCoin(18); 1850 setHdCoin(18);
@@ -1791,7 +1852,6 @@
1791 }, 1852 },
1792 { 1853 {
1793 name: "DMD - Diamond", 1854 name: "DMD - Diamond",
1794 segwitAvailable: false,
1795 onSelect: function() { 1855 onSelect: function() {
1796 network = bitcoinjs.bitcoin.networks.diamond; 1856 network = bitcoinjs.bitcoin.networks.diamond;
1797 setHdCoin(152); 1857 setHdCoin(152);
@@ -1799,7 +1859,6 @@
1799 }, 1859 },
1800 { 1860 {
1801 name: "DNR - Denarius", 1861 name: "DNR - Denarius",
1802 segwitAvailable: false,
1803 onSelect: function() { 1862 onSelect: function() {
1804 network = bitcoinjs.bitcoin.networks.denarius; 1863 network = bitcoinjs.bitcoin.networks.denarius;
1805 setHdCoin(116); 1864 setHdCoin(116);
@@ -1807,7 +1866,6 @@
1807 }, 1866 },
1808 { 1867 {
1809 name: "DOGE - Dogecoin", 1868 name: "DOGE - Dogecoin",
1810 segwitAvailable: false,
1811 onSelect: function() { 1869 onSelect: function() {
1812 network = bitcoinjs.bitcoin.networks.dogecoin; 1870 network = bitcoinjs.bitcoin.networks.dogecoin;
1813 setHdCoin(3); 1871 setHdCoin(3);
@@ -1815,7 +1873,6 @@
1815 }, 1873 },
1816 { 1874 {
1817 name: "ECN - Ecoin", 1875 name: "ECN - Ecoin",
1818 segwitAvailable: false,
1819 onSelect: function() { 1876 onSelect: function() {
1820 network = bitcoinjs.bitcoin.networks.ecoin; 1877 network = bitcoinjs.bitcoin.networks.ecoin;
1821 setHdCoin(115); 1878 setHdCoin(115);
@@ -1823,7 +1880,6 @@
1823 }, 1880 },
1824 { 1881 {
1825 name: "EDRC - Edrcoin", 1882 name: "EDRC - Edrcoin",
1826 segwitAvailable: false,
1827 onSelect: function() { 1883 onSelect: function() {
1828 network = bitcoinjs.bitcoin.networks.edrcoin; 1884 network = bitcoinjs.bitcoin.networks.edrcoin;
1829 setHdCoin(56); 1885 setHdCoin(56);
@@ -1831,7 +1887,6 @@
1831 }, 1887 },
1832 { 1888 {
1833 name: "EFL - Egulden", 1889 name: "EFL - Egulden",
1834 segwitAvailable: true,
1835 onSelect: function() { 1890 onSelect: function() {
1836 network = bitcoinjs.bitcoin.networks.egulden; 1891 network = bitcoinjs.bitcoin.networks.egulden;
1837 setHdCoin(78); 1892 setHdCoin(78);
@@ -1839,7 +1894,6 @@
1839 }, 1894 },
1840 { 1895 {
1841 name: "EMC2 - Einsteinium", 1896 name: "EMC2 - Einsteinium",
1842 segwitAvailable: false,
1843 onSelect: function() { 1897 onSelect: function() {
1844 network = bitcoinjs.bitcoin.networks.einsteinium; 1898 network = bitcoinjs.bitcoin.networks.einsteinium;
1845 setHdCoin(41); 1899 setHdCoin(41);
@@ -1847,7 +1901,6 @@
1847 }, 1901 },
1848 { 1902 {
1849 name: "ERC - Europecoin", 1903 name: "ERC - Europecoin",
1850 segwitAvailable: false,
1851 onSelect: function() { 1904 onSelect: function() {
1852 network = bitcoinjs.bitcoin.networks.europecoin; 1905 network = bitcoinjs.bitcoin.networks.europecoin;
1853 setHdCoin(151); 1906 setHdCoin(151);
@@ -1863,7 +1916,6 @@
1863 }, 1916 },
1864 { 1917 {
1865 name: "ETH - Ethereum", 1918 name: "ETH - Ethereum",
1866 segwitAvailable: false,
1867 onSelect: function() { 1919 onSelect: function() {
1868 network = bitcoinjs.bitcoin.networks.bitcoin; 1920 network = bitcoinjs.bitcoin.networks.bitcoin;
1869 setHdCoin(60); 1921 setHdCoin(60);
@@ -1871,7 +1923,6 @@
1871 }, 1923 },
1872 { 1924 {
1873 name: "EXCL - Exclusivecoin", 1925 name: "EXCL - Exclusivecoin",
1874 segwitAvailable: false,
1875 onSelect: function() { 1926 onSelect: function() {
1876 network = bitcoinjs.bitcoin.networks.exclusivecoin; 1927 network = bitcoinjs.bitcoin.networks.exclusivecoin;
1877 setHdCoin(190); 1928 setHdCoin(190);
@@ -1887,7 +1938,6 @@
1887 }, 1938 },
1888 { 1939 {
1889 name: "FJC - Fujicoin", 1940 name: "FJC - Fujicoin",
1890 segwitAvailable: true,
1891 onSelect: function() { 1941 onSelect: function() {
1892 network = bitcoinjs.bitcoin.networks.fujicoin; 1942 network = bitcoinjs.bitcoin.networks.fujicoin;
1893 setHdCoin(75); 1943 setHdCoin(75);
@@ -1895,7 +1945,6 @@
1895 }, 1945 },
1896 { 1946 {
1897 name: "FLASH - Flashcoin", 1947 name: "FLASH - Flashcoin",
1898 segwitAvailable: false,
1899 onSelect: function() { 1948 onSelect: function() {
1900 network = bitcoinjs.bitcoin.networks.flashcoin; 1949 network = bitcoinjs.bitcoin.networks.flashcoin;
1901 setHdCoin(120); 1950 setHdCoin(120);
@@ -1903,7 +1952,6 @@
1903 }, 1952 },
1904 { 1953 {
1905 name: "FRST - Firstcoin", 1954 name: "FRST - Firstcoin",
1906 segwitAvailable: false,
1907 onSelect: function() { 1955 onSelect: function() {
1908 network = bitcoinjs.bitcoin.networks.firstcoin; 1956 network = bitcoinjs.bitcoin.networks.firstcoin;
1909 setHdCoin(167); 1957 setHdCoin(167);
@@ -1911,7 +1959,6 @@
1911 }, 1959 },
1912 { 1960 {
1913 name: "FTC - Feathercoin", 1961 name: "FTC - Feathercoin",
1914 segwitAvailable: true,
1915 onSelect: function() { 1962 onSelect: function() {
1916 network = bitcoinjs.bitcoin.networks.feathercoin; 1963 network = bitcoinjs.bitcoin.networks.feathercoin;
1917 setHdCoin(8); 1964 setHdCoin(8);
@@ -1919,7 +1966,6 @@
1919 }, 1966 },
1920 { 1967 {
1921 name: "GAME - GameCredits", 1968 name: "GAME - GameCredits",
1922 segwitAvailable: false,
1923 onSelect: function() { 1969 onSelect: function() {
1924 network = bitcoinjs.bitcoin.networks.game; 1970 network = bitcoinjs.bitcoin.networks.game;
1925 setHdCoin(101); 1971 setHdCoin(101);
@@ -1927,7 +1973,6 @@
1927 }, 1973 },
1928 { 1974 {
1929 name: "GBX - Gobyte", 1975 name: "GBX - Gobyte",
1930 segwitAvailable: false,
1931 onSelect: function() { 1976 onSelect: function() {
1932 network = bitcoinjs.bitcoin.networks.gobyte; 1977 network = bitcoinjs.bitcoin.networks.gobyte;
1933 setHdCoin(176); 1978 setHdCoin(176);
@@ -1935,7 +1980,6 @@
1935 }, 1980 },
1936 { 1981 {
1937 name: "GCR - GCRCoin", 1982 name: "GCR - GCRCoin",
1938 segwitAvailable: false,
1939 onSelect: function() { 1983 onSelect: function() {
1940 network = bitcoinjs.bitcoin.networks.gcr; 1984 network = bitcoinjs.bitcoin.networks.gcr;
1941 setHdCoin(79); 1985 setHdCoin(79);
@@ -1943,7 +1987,6 @@
1943 }, 1987 },
1944 { 1988 {
1945 name: "GRC - Gridcoin", 1989 name: "GRC - Gridcoin",
1946 segwitAvailable: false,
1947 onSelect: function() { 1990 onSelect: function() {
1948 network = bitcoinjs.bitcoin.networks.gridcoin; 1991 network = bitcoinjs.bitcoin.networks.gridcoin;
1949 setHdCoin(84); 1992 setHdCoin(84);
@@ -1951,7 +1994,6 @@
1951 }, 1994 },
1952 { 1995 {
1953 name: "HNC - Helleniccoin", 1996 name: "HNC - Helleniccoin",
1954 segwitAvailable: false,
1955 onSelect: function() { 1997 onSelect: function() {
1956 network = bitcoinjs.bitcoin.networks.helleniccoin; 1998 network = bitcoinjs.bitcoin.networks.helleniccoin;
1957 setHdCoin(168); 1999 setHdCoin(168);
@@ -1959,7 +2001,6 @@
1959 }, 2001 },
1960 { 2002 {
1961 name: "INSN - Insane", 2003 name: "INSN - Insane",
1962 segwitAvailable: false,
1963 onSelect: function() { 2004 onSelect: function() {
1964 network = bitcoinjs.bitcoin.networks.insane; 2005 network = bitcoinjs.bitcoin.networks.insane;
1965 setHdCoin(68); 2006 setHdCoin(68);
@@ -1967,7 +2008,6 @@
1967 }, 2008 },
1968 { 2009 {
1969 name: "IOP - Iop", 2010 name: "IOP - Iop",
1970 segwitAvailable: true,
1971 onSelect: function() { 2011 onSelect: function() {
1972 network = bitcoinjs.bitcoin.networks.iop; 2012 network = bitcoinjs.bitcoin.networks.iop;
1973 setHdCoin(66); 2013 setHdCoin(66);
@@ -1975,7 +2015,6 @@
1975 }, 2015 },
1976 { 2016 {
1977 name: "IXC - Ixcoin", 2017 name: "IXC - Ixcoin",
1978 segwitAvailable: false,
1979 onSelect: function() { 2018 onSelect: function() {
1980 network = bitcoinjs.bitcoin.networks.ixcoin; 2019 network = bitcoinjs.bitcoin.networks.ixcoin;
1981 setHdCoin(86); 2020 setHdCoin(86);
@@ -1983,7 +2022,6 @@
1983 }, 2022 },
1984 { 2023 {
1985 name: "JBS - Jumbucks", 2024 name: "JBS - Jumbucks",
1986 segwitAvailable: false,
1987 onSelect: function() { 2025 onSelect: function() {
1988 network = bitcoinjs.bitcoin.networks.jumbucks; 2026 network = bitcoinjs.bitcoin.networks.jumbucks;
1989 setHdCoin(26); 2027 setHdCoin(26);
@@ -2007,7 +2045,6 @@
2007 }, 2045 },
2008 { 2046 {
2009 name: "LBC - Library Credits", 2047 name: "LBC - Library Credits",
2010 segwitAvailable: false,
2011 onSelect: function() { 2048 onSelect: function() {
2012 network = bitcoinjs.bitcoin.networks.lbry; 2049 network = bitcoinjs.bitcoin.networks.lbry;
2013 setHdCoin(140); 2050 setHdCoin(140);
@@ -2015,7 +2052,6 @@
2015 }, 2052 },
2016 { 2053 {
2017 name: "LCC - Litecoincash", 2054 name: "LCC - Litecoincash",
2018 segwitAvailable: true,
2019 onSelect: function() { 2055 onSelect: function() {
2020 network = bitcoinjs.bitcoin.networks.litecoincash; 2056 network = bitcoinjs.bitcoin.networks.litecoincash;
2021 setHdCoin(192); 2057 setHdCoin(192);
@@ -2023,7 +2059,6 @@
2023 }, 2059 },
2024 { 2060 {
2025 name: "LDCN - Landcoin", 2061 name: "LDCN - Landcoin",
2026 segwitAvailable: false,
2027 onSelect: function() { 2062 onSelect: function() {
2028 network = bitcoinjs.bitcoin.networks.landcoin; 2063 network = bitcoinjs.bitcoin.networks.landcoin;
2029 setHdCoin(63); 2064 setHdCoin(63);
@@ -2031,7 +2066,6 @@
2031 }, 2066 },
2032 { 2067 {
2033 name: "LINX - Linx", 2068 name: "LINX - Linx",
2034 segwitAvailable: false,
2035 onSelect: function() { 2069 onSelect: function() {
2036 network = bitcoinjs.bitcoin.networks.linx; 2070 network = bitcoinjs.bitcoin.networks.linx;
2037 setHdCoin(114); 2071 setHdCoin(114);
@@ -2039,7 +2073,6 @@
2039 }, 2073 },
2040 { 2074 {
2041 name: "LTC - Litecoin", 2075 name: "LTC - Litecoin",
2042 segwitAvailable: true,
2043 onSelect: function() { 2076 onSelect: function() {
2044 network = bitcoinjs.bitcoin.networks.litecoin; 2077 network = bitcoinjs.bitcoin.networks.litecoin;
2045 setHdCoin(2); 2078 setHdCoin(2);
@@ -2048,7 +2081,6 @@
2048 }, 2081 },
2049 { 2082 {
2050 name: "LYNX - Lynx", 2083 name: "LYNX - Lynx",
2051 segwitAvailable: false,
2052 onSelect: function() { 2084 onSelect: function() {
2053 network = bitcoinjs.bitcoin.networks.lynx; 2085 network = bitcoinjs.bitcoin.networks.lynx;
2054 setHdCoin(191); 2086 setHdCoin(191);
@@ -2056,7 +2088,6 @@
2056 }, 2088 },
2057 { 2089 {
2058 name: "MAZA - Maza", 2090 name: "MAZA - Maza",
2059 segwitAvailable: false,
2060 onSelect: function() { 2091 onSelect: function() {
2061 network = bitcoinjs.bitcoin.networks.maza; 2092 network = bitcoinjs.bitcoin.networks.maza;
2062 setHdCoin(13); 2093 setHdCoin(13);
@@ -2072,7 +2103,6 @@
2072 }, 2103 },
2073 { 2104 {
2074 name: "MNX - Minexcoin", 2105 name: "MNX - Minexcoin",
2075 segwitAvailable: true,
2076 onSelect: function() { 2106 onSelect: function() {
2077 network = bitcoinjs.bitcoin.networks.minexcoin; 2107 network = bitcoinjs.bitcoin.networks.minexcoin;
2078 setHdCoin(182); 2108 setHdCoin(182);
@@ -2080,7 +2110,6 @@
2080 }, 2110 },
2081 { 2111 {
2082 name: "MONA - Monacoin", 2112 name: "MONA - Monacoin",
2083 segwitAvailable: true,
2084 onSelect: function() { 2113 onSelect: function() {
2085 network = bitcoinjs.bitcoin.networks.monacoin, 2114 network = bitcoinjs.bitcoin.networks.monacoin,
2086 setHdCoin(22); 2115 setHdCoin(22);
@@ -2096,7 +2125,6 @@
2096 }, 2125 },
2097 { 2126 {
2098 name: "NAV - Navcoin", 2127 name: "NAV - Navcoin",
2099 segwitAvailable: true,
2100 onSelect: function() { 2128 onSelect: function() {
2101 network = bitcoinjs.bitcoin.networks.navcoin; 2129 network = bitcoinjs.bitcoin.networks.navcoin;
2102 setHdCoin(130); 2130 setHdCoin(130);
@@ -2104,7 +2132,6 @@
2104 }, 2132 },
2105 { 2133 {
2106 name: "NEBL - Neblio", 2134 name: "NEBL - Neblio",
2107 segwitAvailable: false,
2108 onSelect: function() { 2135 onSelect: function() {
2109 network = bitcoinjs.bitcoin.networks.neblio; 2136 network = bitcoinjs.bitcoin.networks.neblio;
2110 setHdCoin(146); 2137 setHdCoin(146);
@@ -2112,7 +2139,6 @@
2112 }, 2139 },
2113 { 2140 {
2114 name: "NEOS - Neoscoin", 2141 name: "NEOS - Neoscoin",
2115 segwitAvailable: false,
2116 onSelect: function() { 2142 onSelect: function() {
2117 network = bitcoinjs.bitcoin.networks.neoscoin; 2143 network = bitcoinjs.bitcoin.networks.neoscoin;
2118 setHdCoin(25); 2144 setHdCoin(25);
@@ -2120,7 +2146,6 @@
2120 }, 2146 },
2121 { 2147 {
2122 name: "NLG - Gulden", 2148 name: "NLG - Gulden",
2123 segwitAvailable: false,
2124 onSelect: function() { 2149 onSelect: function() {
2125 network = bitcoinjs.bitcoin.networks.gulden; 2150 network = bitcoinjs.bitcoin.networks.gulden;
2126 setHdCoin(87); 2151 setHdCoin(87);
@@ -2128,7 +2153,6 @@
2128 }, 2153 },
2129 { 2154 {
2130 name: "NMC - Namecoin", 2155 name: "NMC - Namecoin",
2131 segwitAvailable: false,
2132 onSelect: function() { 2156 onSelect: function() {
2133 network = bitcoinjs.bitcoin.networks.namecoin; 2157 network = bitcoinjs.bitcoin.networks.namecoin;
2134 setHdCoin(7); 2158 setHdCoin(7);
@@ -2136,7 +2160,6 @@
2136 }, 2160 },
2137 { 2161 {
2138 name: "NRG - Energi", 2162 name: "NRG - Energi",
2139 segwitAvailable: false,
2140 onSelect: function() { 2163 onSelect: function() {
2141 network = bitcoinjs.bitcoin.networks.energi; 2164 network = bitcoinjs.bitcoin.networks.energi;
2142 setHdCoin(204); 2165 setHdCoin(204);
@@ -2144,7 +2167,6 @@
2144 }, 2167 },
2145 { 2168 {
2146 name: "NRO - Neurocoin", 2169 name: "NRO - Neurocoin",
2147 segwitAvailable: false,
2148 onSelect: function() { 2170 onSelect: function() {
2149 network = bitcoinjs.bitcoin.networks.neurocoin; 2171 network = bitcoinjs.bitcoin.networks.neurocoin;
2150 setHdCoin(110); 2172 setHdCoin(110);
@@ -2152,7 +2174,6 @@
2152 }, 2174 },
2153 { 2175 {
2154 name: "NSR - Nushares", 2176 name: "NSR - Nushares",
2155 segwitAvailable: false,
2156 onSelect: function() { 2177 onSelect: function() {
2157 network = bitcoinjs.bitcoin.networks.nushares; 2178 network = bitcoinjs.bitcoin.networks.nushares;
2158 setHdCoin(11); 2179 setHdCoin(11);
@@ -2160,7 +2181,6 @@
2160 }, 2181 },
2161 { 2182 {
2162 name: "NYC - Newyorkc", 2183 name: "NYC - Newyorkc",
2163 segwitAvailable: false,
2164 onSelect: function() { 2184 onSelect: function() {
2165 network = bitcoinjs.bitcoin.networks.newyorkc; 2185 network = bitcoinjs.bitcoin.networks.newyorkc;
2166 setHdCoin(179); 2186 setHdCoin(179);
@@ -2168,7 +2188,6 @@
2168 }, 2188 },
2169 { 2189 {
2170 name: "NVC - Novacoin", 2190 name: "NVC - Novacoin",
2171 segwitAvailable: false,
2172 onSelect: function() { 2191 onSelect: function() {
2173 network = bitcoinjs.bitcoin.networks.novacoin; 2192 network = bitcoinjs.bitcoin.networks.novacoin;
2174 setHdCoin(50); 2193 setHdCoin(50);
@@ -2176,7 +2195,6 @@
2176 }, 2195 },
2177 { 2196 {
2178 name: "OK - Okcash", 2197 name: "OK - Okcash",
2179 segwitAvailable: false,
2180 onSelect: function() { 2198 onSelect: function() {
2181 network = bitcoinjs.bitcoin.networks.okcash; 2199 network = bitcoinjs.bitcoin.networks.okcash;
2182 setHdCoin(69); 2200 setHdCoin(69);
@@ -2184,7 +2202,6 @@
2184 }, 2202 },
2185 { 2203 {
2186 name: "OMNI - Omnicore", 2204 name: "OMNI - Omnicore",
2187 segwitAvailable: true,
2188 onSelect: function() { 2205 onSelect: function() {
2189 network = bitcoinjs.bitcoin.networks.omnicore; 2206 network = bitcoinjs.bitcoin.networks.omnicore;
2190 setHdCoin(200); 2207 setHdCoin(200);
@@ -2192,7 +2209,6 @@
2192 }, 2209 },
2193 { 2210 {
2194 name: "ONX - Onixcoin", 2211 name: "ONX - Onixcoin",
2195 segwitAvailable: false,
2196 onSelect: function() { 2212 onSelect: function() {
2197 network = bitcoinjs.bitcoin.networks.onixcoin; 2213 network = bitcoinjs.bitcoin.networks.onixcoin;
2198 setHdCoin(174); 2214 setHdCoin(174);
@@ -2200,7 +2216,6 @@
2200 }, 2216 },
2201 { 2217 {
2202 name: "PINK - Pinkcoin", 2218 name: "PINK - Pinkcoin",
2203 segwitAvailable: false,
2204 onSelect: function() { 2219 onSelect: function() {
2205 network = bitcoinjs.bitcoin.networks.pinkcoin; 2220 network = bitcoinjs.bitcoin.networks.pinkcoin;
2206 setHdCoin(117); 2221 setHdCoin(117);
@@ -2216,7 +2231,6 @@
2216 }, 2231 },
2217 { 2232 {
2218 name: "PIVX - PIVX", 2233 name: "PIVX - PIVX",
2219 segwitAvailable: false,
2220 onSelect: function() { 2234 onSelect: function() {
2221 network = bitcoinjs.bitcoin.networks.pivx; 2235 network = bitcoinjs.bitcoin.networks.pivx;
2222 setHdCoin(119); 2236 setHdCoin(119);
@@ -2224,7 +2238,6 @@
2224 }, 2238 },
2225 { 2239 {
2226 name: "PIVX - PIVX Testnet", 2240 name: "PIVX - PIVX Testnet",
2227 segwitAvailable: false,
2228 onSelect: function() { 2241 onSelect: function() {
2229 network = bitcoinjs.bitcoin.networks.pivxtestnet; 2242 network = bitcoinjs.bitcoin.networks.pivxtestnet;
2230 setHdCoin(1); 2243 setHdCoin(1);
@@ -2240,7 +2253,6 @@
2240 }, 2253 },
2241 { 2254 {
2242 name: "POSW - POSWcoin", 2255 name: "POSW - POSWcoin",
2243 segwitAvailable: false,
2244 onSelect: function() { 2256 onSelect: function() {
2245 network = bitcoinjs.bitcoin.networks.poswcoin; 2257 network = bitcoinjs.bitcoin.networks.poswcoin;
2246 setHdCoin(47); 2258 setHdCoin(47);
@@ -2248,7 +2260,6 @@
2248 }, 2260 },
2249 { 2261 {
2250 name: "POT - Potcoin", 2262 name: "POT - Potcoin",
2251 segwitAvailable: false,
2252 onSelect: function() { 2263 onSelect: function() {
2253 network = bitcoinjs.bitcoin.networks.potcoin; 2264 network = bitcoinjs.bitcoin.networks.potcoin;
2254 setHdCoin(81); 2265 setHdCoin(81);
@@ -2256,7 +2267,6 @@
2256 }, 2267 },
2257 { 2268 {
2258 name: "PPC - Peercoin", 2269 name: "PPC - Peercoin",
2259 segwitAvailable: false,
2260 onSelect: function() { 2270 onSelect: function() {
2261 network = bitcoinjs.bitcoin.networks.peercoin; 2271 network = bitcoinjs.bitcoin.networks.peercoin;
2262 setHdCoin(6); 2272 setHdCoin(6);
@@ -2264,7 +2274,6 @@
2264 }, 2274 },
2265 { 2275 {
2266 name: "PSB - Pesobit", 2276 name: "PSB - Pesobit",
2267 segwitAvailable: false,
2268 onSelect: function() { 2277 onSelect: function() {
2269 network = bitcoinjs.bitcoin.networks.pesobit; 2278 network = bitcoinjs.bitcoin.networks.pesobit;
2270 setHdCoin(62); 2279 setHdCoin(62);
@@ -2272,7 +2281,6 @@
2272 }, 2281 },
2273 { 2282 {
2274 name: "PUT - Putincoin", 2283 name: "PUT - Putincoin",
2275 segwitAvailable: false,
2276 onSelect: function() { 2284 onSelect: function() {
2277 network = bitcoinjs.bitcoin.networks.putincoin; 2285 network = bitcoinjs.bitcoin.networks.putincoin;
2278 setHdCoin(122); 2286 setHdCoin(122);
@@ -2280,7 +2288,6 @@
2280 }, 2288 },
2281 { 2289 {
2282 name: "RBY - Rubycoin", 2290 name: "RBY - Rubycoin",
2283 segwitAvailable: false,
2284 onSelect: function() { 2291 onSelect: function() {
2285 network = bitcoinjs.bitcoin.networks.rubycoin; 2292 network = bitcoinjs.bitcoin.networks.rubycoin;
2286 setHdCoin(16); 2293 setHdCoin(16);
@@ -2288,15 +2295,13 @@
2288 }, 2295 },
2289 { 2296 {
2290 name: "RDD - Reddcoin", 2297 name: "RDD - Reddcoin",
2291 segwitAvailable: false,
2292 onSelect: function() { 2298 onSelect: function() {
2293 network = bitcoinjs.bitcoin.networks.reddoin; 2299 network = bitcoinjs.bitcoin.networks.reddcoin;
2294 setHdCoin(4); 2300 setHdCoin(4);
2295 }, 2301 },
2296 }, 2302 },
2297 { 2303 {
2298 name: "RVR - RevolutionVR", 2304 name: "RVR - RevolutionVR",
2299 segwitAvailable: false,
2300 onSelect: function() { 2305 onSelect: function() {
2301 network = bitcoinjs.bitcoin.networks.revolutionvr; 2306 network = bitcoinjs.bitcoin.networks.revolutionvr;
2302 setHdCoin(129); 2307 setHdCoin(129);
@@ -2304,7 +2309,6 @@
2304 }, 2309 },
2305 { 2310 {
2306 name: "SDC - ShadowCash", 2311 name: "SDC - ShadowCash",
2307 segwitAvailable: false,
2308 onSelect: function() { 2312 onSelect: function() {
2309 network = bitcoinjs.bitcoin.networks.shadow; 2313 network = bitcoinjs.bitcoin.networks.shadow;
2310 setHdCoin(35); 2314 setHdCoin(35);
@@ -2312,7 +2316,6 @@
2312 }, 2316 },
2313 { 2317 {
2314 name: "SDC - ShadowCash Testnet", 2318 name: "SDC - ShadowCash Testnet",
2315 segwitAvailable: false,
2316 onSelect: function() { 2319 onSelect: function() {
2317 network = bitcoinjs.bitcoin.networks.shadowtn; 2320 network = bitcoinjs.bitcoin.networks.shadowtn;
2318 setHdCoin(1); 2321 setHdCoin(1);
@@ -2320,7 +2323,6 @@
2320 }, 2323 },
2321 { 2324 {
2322 name: "SLM - Slimcoin", 2325 name: "SLM - Slimcoin",
2323 segwitAvailable: false,
2324 onSelect: function() { 2326 onSelect: function() {
2325 network = bitcoinjs.bitcoin.networks.slimcoin; 2327 network = bitcoinjs.bitcoin.networks.slimcoin;
2326 setHdCoin(63); 2328 setHdCoin(63);
@@ -2328,7 +2330,6 @@
2328 }, 2330 },
2329 { 2331 {
2330 name: "SLM - Slimcoin Testnet", 2332 name: "SLM - Slimcoin Testnet",
2331 segwitAvailable: false,
2332 onSelect: function() { 2333 onSelect: function() {
2333 network = bitcoinjs.bitcoin.networks.slimcointn; 2334 network = bitcoinjs.bitcoin.networks.slimcointn;
2334 setHdCoin(111); 2335 setHdCoin(111);
@@ -2336,7 +2337,6 @@
2336 }, 2337 },
2337 { 2338 {
2338 name: "SLR - Solarcoin", 2339 name: "SLR - Solarcoin",
2339 segwitAvailable: false,
2340 onSelect: function() { 2340 onSelect: function() {
2341 network = bitcoinjs.bitcoin.networks.solarcoin; 2341 network = bitcoinjs.bitcoin.networks.solarcoin;
2342 setHdCoin(58); 2342 setHdCoin(58);
@@ -2344,7 +2344,6 @@
2344 }, 2344 },
2345 { 2345 {
2346 name: "SMLY - Smileycoin", 2346 name: "SMLY - Smileycoin",
2347 segwitAvailable: false,
2348 onSelect: function() { 2347 onSelect: function() {
2349 network = bitcoinjs.bitcoin.networks.smileycoin; 2348 network = bitcoinjs.bitcoin.networks.smileycoin;
2350 setHdCoin(59); 2349 setHdCoin(59);
@@ -2352,7 +2351,6 @@
2352 }, 2351 },
2353 { 2352 {
2354 name: "STRAT - Stratis", 2353 name: "STRAT - Stratis",
2355 segwitAvailable: false,
2356 onSelect: function() { 2354 onSelect: function() {
2357 network = bitcoinjs.bitcoin.networks.stratis; 2355 network = bitcoinjs.bitcoin.networks.stratis;
2358 setHdCoin(105); 2356 setHdCoin(105);
@@ -2360,7 +2358,6 @@
2360 }, 2358 },
2361 { 2359 {
2362 name: "SYS - Syscoin", 2360 name: "SYS - Syscoin",
2363 segwitAvailable: true,
2364 onSelect: function() { 2361 onSelect: function() {
2365 network = bitcoinjs.bitcoin.networks.syscoin; 2362 network = bitcoinjs.bitcoin.networks.syscoin;
2366 setHdCoin(57); 2363 setHdCoin(57);
@@ -2368,7 +2365,6 @@
2368 }, 2365 },
2369 { 2366 {
2370 name: "THC - Hempcoin", 2367 name: "THC - Hempcoin",
2371 segwitAvailable: false,
2372 onSelect: function() { 2368 onSelect: function() {
2373 network = bitcoinjs.bitcoin.networks.hempcoin; 2369 network = bitcoinjs.bitcoin.networks.hempcoin;
2374 setHdCoin(113); 2370 setHdCoin(113);
@@ -2376,7 +2372,6 @@
2376 }, 2372 },
2377 { 2373 {
2378 name: "TOA - Toa", 2374 name: "TOA - Toa",
2379 segwitAvailable: false,
2380 onSelect: function() { 2375 onSelect: function() {
2381 network = bitcoinjs.bitcoin.networks.toa; 2376 network = bitcoinjs.bitcoin.networks.toa;
2382 setHdCoin(159); 2377 setHdCoin(159);
@@ -2384,7 +2379,6 @@
2384 }, 2379 },
2385 { 2380 {
2386 name: "USC - Ultimatesecurecash", 2381 name: "USC - Ultimatesecurecash",
2387 segwitAvailable: false,
2388 onSelect: function() { 2382 onSelect: function() {
2389 network = bitcoinjs.bitcoin.networks.ultimatesecurecash; 2383 network = bitcoinjs.bitcoin.networks.ultimatesecurecash;
2390 setHdCoin(112); 2384 setHdCoin(112);
@@ -2392,7 +2386,6 @@
2392 }, 2386 },
2393 { 2387 {
2394 name: "USNBT - NuBits", 2388 name: "USNBT - NuBits",
2395 segwitAvailable: false,
2396 onSelect: function() { 2389 onSelect: function() {
2397 network = bitcoinjs.bitcoin.networks.nubits; 2390 network = bitcoinjs.bitcoin.networks.nubits;
2398 setHdCoin(12); 2391 setHdCoin(12);
@@ -2400,7 +2393,6 @@
2400 }, 2393 },
2401 { 2394 {
2402 name: "UNO - Unobtanium", 2395 name: "UNO - Unobtanium",
2403 segwitAvailable: false,
2404 onSelect: function() { 2396 onSelect: function() {
2405 network = bitcoinjs.bitcoin.networks.unobtanium; 2397 network = bitcoinjs.bitcoin.networks.unobtanium;
2406 setHdCoin(92); 2398 setHdCoin(92);
@@ -2408,7 +2400,6 @@
2408 }, 2400 },
2409 { 2401 {
2410 name: "VASH - Vpncoin", 2402 name: "VASH - Vpncoin",
2411 segwitAvailable: false,
2412 onSelect: function() { 2403 onSelect: function() {
2413 network = bitcoinjs.bitcoin.networks.vpncoin; 2404 network = bitcoinjs.bitcoin.networks.vpncoin;
2414 setHdCoin(33); 2405 setHdCoin(33);
@@ -2416,7 +2407,6 @@
2416 }, 2407 },
2417 { 2408 {
2418 name: "VIA - Viacoin", 2409 name: "VIA - Viacoin",
2419 segwitAvailable: false,
2420 onSelect: function() { 2410 onSelect: function() {
2421 network = bitcoinjs.bitcoin.networks.viacoin; 2411 network = bitcoinjs.bitcoin.networks.viacoin;
2422 setHdCoin(14); 2412 setHdCoin(14);
@@ -2424,7 +2414,6 @@
2424 }, 2414 },
2425 { 2415 {
2426 name: "VIA - Viacoin Testnet", 2416 name: "VIA - Viacoin Testnet",
2427 segwitAvailable: false,
2428 onSelect: function() { 2417 onSelect: function() {
2429 network = bitcoinjs.bitcoin.networks.viacointestnet; 2418 network = bitcoinjs.bitcoin.networks.viacointestnet;
2430 setHdCoin(1); 2419 setHdCoin(1);
@@ -2432,7 +2421,6 @@
2432 }, 2421 },
2433 { 2422 {
2434 name: "VIVO - Vivo", 2423 name: "VIVO - Vivo",
2435 segwitAvailable: false,
2436 onSelect: function() { 2424 onSelect: function() {
2437 network = bitcoinjs.bitcoin.networks.vivo; 2425 network = bitcoinjs.bitcoin.networks.vivo;
2438 setHdCoin(166); 2426 setHdCoin(166);
@@ -2440,7 +2428,6 @@
2440 }, 2428 },
2441 { 2429 {
2442 name: "VTC - Vertcoin", 2430 name: "VTC - Vertcoin",
2443 segwitAvailable: true,
2444 onSelect: function() { 2431 onSelect: function() {
2445 network = bitcoinjs.bitcoin.networks.vertcoin; 2432 network = bitcoinjs.bitcoin.networks.vertcoin;
2446 setHdCoin(28); 2433 setHdCoin(28);
@@ -2448,7 +2435,6 @@
2448 }, 2435 },
2449 { 2436 {
2450 name: "WC - Wincoin", 2437 name: "WC - Wincoin",
2451 segwitAvailable: false,
2452 onSelect: function() { 2438 onSelect: function() {
2453 network = bitcoinjs.bitcoin.networks.wincoin; 2439 network = bitcoinjs.bitcoin.networks.wincoin;
2454 setHdCoin(181); 2440 setHdCoin(181);
@@ -2456,7 +2442,6 @@
2456 }, 2442 },
2457 { 2443 {
2458 name: "XBC - Bitcoinplus", 2444 name: "XBC - Bitcoinplus",
2459 segwitAvailable: false,
2460 onSelect: function() { 2445 onSelect: function() {
2461 network = bitcoinjs.bitcoin.networks.bitcoinplus; 2446 network = bitcoinjs.bitcoin.networks.bitcoinplus;
2462 setHdCoin(65); 2447 setHdCoin(65);
@@ -2464,7 +2449,6 @@
2464 }, 2449 },
2465 { 2450 {
2466 name: "XMY - Myriadcoin", 2451 name: "XMY - Myriadcoin",
2467 segwitAvailable: false,
2468 onSelect: function() { 2452 onSelect: function() {
2469 network = bitcoinjs.bitcoin.networks.myriadcoin; 2453 network = bitcoinjs.bitcoin.networks.myriadcoin;
2470 setHdCoin(90); 2454 setHdCoin(90);
@@ -2472,7 +2456,6 @@
2472 }, 2456 },
2473 { 2457 {
2474 name: "XRP - Ripple", 2458 name: "XRP - Ripple",
2475 segwitAvailable: false,
2476 onSelect: function() { 2459 onSelect: function() {
2477 network = bitcoinjs.bitcoin.networks.bitcoin; 2460 network = bitcoinjs.bitcoin.networks.bitcoin;
2478 setHdCoin(144); 2461 setHdCoin(144);
@@ -2480,7 +2463,6 @@
2480 }, 2463 },
2481 { 2464 {
2482 name: "XVC - Vcash", 2465 name: "XVC - Vcash",
2483 segwitAvailable: false,
2484 onSelect: function() { 2466 onSelect: function() {
2485 network = bitcoinjs.bitcoin.networks.vcash; 2467 network = bitcoinjs.bitcoin.networks.vcash;
2486 setHdCoin(127); 2468 setHdCoin(127);
@@ -2488,7 +2470,6 @@
2488 }, 2470 },
2489 { 2471 {
2490 name: "XVG - Verge", 2472 name: "XVG - Verge",
2491 segwitAvailable: false,
2492 onSelect: function() { 2473 onSelect: function() {
2493 network = bitcoinjs.bitcoin.networks.verge; 2474 network = bitcoinjs.bitcoin.networks.verge;
2494 setHdCoin(77); 2475 setHdCoin(77);
@@ -2504,7 +2485,6 @@
2504 }, 2485 },
2505 { 2486 {
2506 name: "XWC - Whitecoin", 2487 name: "XWC - Whitecoin",
2507 segwitAvailable: false,
2508 onSelect: function() { 2488 onSelect: function() {
2509 network = bitcoinjs.bitcoin.networks.whitecoin; 2489 network = bitcoinjs.bitcoin.networks.whitecoin;
2510 setHdCoin(155); 2490 setHdCoin(155);
@@ -2512,7 +2492,6 @@
2512 }, 2492 },
2513 { 2493 {
2514 name: "XZC - Zcoin", 2494 name: "XZC - Zcoin",
2515 segwitAvailable: true,
2516 onSelect: function() { 2495 onSelect: function() {
2517 network = bitcoinjs.bitcoin.networks.zcoin; 2496 network = bitcoinjs.bitcoin.networks.zcoin;
2518 setHdCoin(136); 2497 setHdCoin(136);
@@ -2520,7 +2499,6 @@
2520 }, 2499 },
2521 { 2500 {
2522 name: "ZCL - Zclassic", 2501 name: "ZCL - Zclassic",
2523 segwitAvailable: false,
2524 onSelect: function() { 2502 onSelect: function() {
2525 network = bitcoinjs.bitcoin.networks.zclassic; 2503 network = bitcoinjs.bitcoin.networks.zclassic;
2526 setHdCoin(147); 2504 setHdCoin(147);
@@ -2528,7 +2506,6 @@
2528 }, 2506 },
2529 { 2507 {
2530 name: "ZEC - Zcash", 2508 name: "ZEC - Zcash",
2531 segwitAvailable: false,
2532 onSelect: function() { 2509 onSelect: function() {
2533 network = bitcoinjs.bitcoin.networks.zcash; 2510 network = bitcoinjs.bitcoin.networks.zcash;
2534 setHdCoin(133); 2511 setHdCoin(133);
@@ -2536,7 +2513,6 @@
2536 }, 2513 },
2537 { 2514 {
2538 name: "ZEN - Zencash", 2515 name: "ZEN - Zencash",
2539 segwitAvailable: false,
2540 onSelect: function() { 2516 onSelect: function() {
2541 network = bitcoinjs.bitcoin.networks.zencash; 2517 network = bitcoinjs.bitcoin.networks.zencash;
2542 setHdCoin(121); 2518 setHdCoin(121);
diff --git a/src/js/segwit-parameters.js b/src/js/segwit-parameters.js
index f8b0347..b4530d5 100644
--- a/src/js/segwit-parameters.js
+++ b/src/js/segwit-parameters.js
@@ -56,9 +56,23 @@ bitcoinjs.bitcoin.networks.testnet.p2wpkhInP2sh = {
56 wif: 0xef 56 wif: 0xef
57}; 57};
58 58
59bitcoinjs.bitcoin.networks.litecoin.p2wpkh = {
60 baseNetwork: "litecoin",
61 messagePrefix: '\x19Litecoin Signed Message:\n',
62 bech32: 'ltc',
63 bip32: {
64 public: 0x04b24746,
65 private: 0x04b2430c
66 },
67 pubKeyHash: 0x30,
68 scriptHash: 0x32,
69 wif: 0xb0
70};
71
59bitcoinjs.bitcoin.networks.litecoin.p2wpkhInP2sh = { 72bitcoinjs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
60 baseNetwork: "litecoin", 73 baseNetwork: "litecoin",
61 messagePrefix: '\x19Litecoin Signed Message:\n', 74 messagePrefix: '\x19Litecoin Signed Message:\n',
75 bech32: 'ltc',
62 bip32: { 76 bip32: {
63 public: 0x01b26ef6, 77 public: 0x01b26ef6,
64 private: 0x01b26792 78 private: 0x01b26792