diff options
Diffstat (limited to 'src/js/index.js')
-rw-r--r-- | src/js/index.js | 1090 |
1 files changed, 1019 insertions, 71 deletions
diff --git a/src/js/index.js b/src/js/index.js index b887a67..690fff7 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"); |
@@ -38,7 +39,9 @@ | |||
38 | DOM.entropyWordCount = DOM.entropyContainer.find(".word-count"); | 39 | DOM.entropyWordCount = DOM.entropyContainer.find(".word-count"); |
39 | DOM.entropyBinary = DOM.entropyContainer.find(".binary"); | 40 | DOM.entropyBinary = DOM.entropyContainer.find(".binary"); |
40 | DOM.entropyWordIndexes = DOM.entropyContainer.find(".word-indexes"); | 41 | DOM.entropyWordIndexes = DOM.entropyContainer.find(".word-indexes"); |
42 | DOM.entropyChecksum = DOM.entropyContainer.find(".checksum"); | ||
41 | DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length"); | 43 | DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length"); |
44 | DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning"); | ||
42 | DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); | 45 | DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); |
43 | DOM.phrase = $(".phrase"); | 46 | DOM.phrase = $(".phrase"); |
44 | DOM.passphrase = $(".passphrase"); | 47 | DOM.passphrase = $(".passphrase"); |
@@ -75,6 +78,8 @@ | |||
75 | DOM.bip49accountXprv = $("#bip49 .account-xprv"); | 78 | DOM.bip49accountXprv = $("#bip49 .account-xprv"); |
76 | DOM.bip49accountXpub = $("#bip49 .account-xpub"); | 79 | DOM.bip49accountXpub = $("#bip49 .account-xpub"); |
77 | DOM.bip49change = $("#bip49 .change"); | 80 | DOM.bip49change = $("#bip49 .change"); |
81 | DOM.bip84unavailable = $("#bip84 .unavailable"); | ||
82 | DOM.bip84available = $("#bip84 .available"); | ||
78 | DOM.bip84path = $("#bip84-path"); | 83 | DOM.bip84path = $("#bip84-path"); |
79 | DOM.bip84purpose = $("#bip84 .purpose"); | 84 | DOM.bip84purpose = $("#bip84 .purpose"); |
80 | DOM.bip84coin = $("#bip84 .coin"); | 85 | DOM.bip84coin = $("#bip84 .coin"); |
@@ -87,9 +92,12 @@ | |||
87 | DOM.bip141path = $("#bip141-path"); | 92 | DOM.bip141path = $("#bip141-path"); |
88 | DOM.bip141semantics = $(".bip141-semantics"); | 93 | DOM.bip141semantics = $(".bip141-semantics"); |
89 | DOM.generatedStrength = $(".generate-container .strength"); | 94 | DOM.generatedStrength = $(".generate-container .strength"); |
95 | DOM.generatedStrengthWarning = $(".generate-container .warning"); | ||
90 | DOM.hardenedAddresses = $(".hardened-addresses"); | 96 | DOM.hardenedAddresses = $(".hardened-addresses"); |
91 | DOM.useBitpayAddressesContainer = $(".use-bitpay-addresses-container"); | 97 | DOM.bitcoinCashAddressTypeContainer = $(".bch-addr-type-container"); |
92 | DOM.useBitpayAddresses = $(".use-bitpay-addresses"); | 98 | DOM.bitcoinCashAddressType = $("[name=bch-addr-type]") |
99 | DOM.useBip38 = $(".use-bip38"); | ||
100 | DOM.bip38Password = $(".bip38-password"); | ||
93 | DOM.addresses = $(".addresses"); | 101 | DOM.addresses = $(".addresses"); |
94 | DOM.csvTab = $("#csv-tab a"); | 102 | DOM.csvTab = $("#csv-tab a"); |
95 | DOM.csv = $(".csv"); | 103 | DOM.csv = $(".csv"); |
@@ -111,6 +119,8 @@ | |||
111 | 119 | ||
112 | function init() { | 120 | function init() { |
113 | // Events | 121 | // Events |
122 | DOM.privacyScreenToggle.on("change", privacyScreenToggled); | ||
123 | DOM.generatedStrength.on("change", generatedStrengthChanged); | ||
114 | DOM.network.on("change", networkChanged); | 124 | DOM.network.on("change", networkChanged); |
115 | DOM.bip32Client.on("change", bip32ClientChanged); | 125 | DOM.bip32Client.on("change", bip32ClientChanged); |
116 | DOM.useEntropy.on("change", setEntropyVisibility); | 126 | DOM.useEntropy.on("change", setEntropyVisibility); |
@@ -133,13 +143,15 @@ | |||
133 | DOM.bip141semantics.on("change", tabChanged); | 143 | DOM.bip141semantics.on("change", tabChanged); |
134 | DOM.tab.on("shown.bs.tab", tabChanged); | 144 | DOM.tab.on("shown.bs.tab", tabChanged); |
135 | DOM.hardenedAddresses.on("change", calcForDerivationPath); | 145 | DOM.hardenedAddresses.on("change", calcForDerivationPath); |
146 | DOM.useBip38.on("change", calcForDerivationPath); | ||
147 | DOM.bip38Password.on("change", calcForDerivationPath); | ||
136 | DOM.indexToggle.on("click", toggleIndexes); | 148 | DOM.indexToggle.on("click", toggleIndexes); |
137 | DOM.addressToggle.on("click", toggleAddresses); | 149 | DOM.addressToggle.on("click", toggleAddresses); |
138 | DOM.publicKeyToggle.on("click", togglePublicKeys); | 150 | DOM.publicKeyToggle.on("click", togglePublicKeys); |
139 | DOM.privateKeyToggle.on("click", togglePrivateKeys); | 151 | DOM.privateKeyToggle.on("click", togglePrivateKeys); |
140 | DOM.csvTab.on("click", updateCsv); | 152 | DOM.csvTab.on("click", updateCsv); |
141 | DOM.languages.on("click", languageChanged); | 153 | DOM.languages.on("click", languageChanged); |
142 | DOM.useBitpayAddresses.on("change", useBitpayAddressesChange); | 154 | DOM.bitcoinCashAddressType.on("change", bitcoinCashAddressTypeChange); |
143 | setQrEvents(DOM.showQrEls); | 155 | setQrEvents(DOM.showQrEls); |
144 | disableForms(); | 156 | disableForms(); |
145 | hidePending(); | 157 | hidePending(); |
@@ -150,21 +162,25 @@ | |||
150 | 162 | ||
151 | // Event handlers | 163 | // Event handlers |
152 | 164 | ||
165 | function generatedStrengthChanged() { | ||
166 | var strength = parseInt(DOM.generatedStrength.val()); | ||
167 | if (strength < 12) { | ||
168 | DOM.generatedStrengthWarning.removeClass("hidden"); | ||
169 | } | ||
170 | else { | ||
171 | DOM.generatedStrengthWarning.addClass("hidden"); | ||
172 | } | ||
173 | } | ||
174 | |||
153 | function networkChanged(e) { | 175 | function networkChanged(e) { |
154 | clearDerivedKeys(); | 176 | clearDerivedKeys(); |
155 | clearAddressesList(); | 177 | clearAddressesList(); |
156 | DOM.litecoinLtubContainer.addClass("hidden"); | 178 | DOM.litecoinLtubContainer.addClass("hidden"); |
157 | DOM.useBitpayAddressesContainer.addClass("hidden"); | 179 | DOM.bitcoinCashAddressTypeContainer.addClass("hidden"); |
158 | var networkIndex = e.target.value; | 180 | var networkIndex = e.target.value; |
159 | var network = networks[networkIndex]; | 181 | var network = networks[networkIndex]; |
160 | network.onSelect(); | 182 | network.onSelect(); |
161 | if (network.segwitAvailable) { | 183 | adjustNetworkForSegwit(); |
162 | adjustNetworkForSegwit(); | ||
163 | showSegwitAvailable(); | ||
164 | } | ||
165 | else { | ||
166 | showSegwitUnavailable(); | ||
167 | } | ||
168 | if (seed != null) { | 184 | if (seed != null) { |
169 | phraseChanged(); | 185 | phraseChanged(); |
170 | } | 186 | } |
@@ -354,8 +370,11 @@ | |||
354 | showPending(); | 370 | showPending(); |
355 | // 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 |
356 | if (segwitSelected() && !networkHasSegwit()) { | 372 | if (segwitSelected() && !networkHasSegwit()) { |
373 | showSegwitUnavailable(); | ||
374 | hidePending(); | ||
357 | return; | 375 | return; |
358 | } | 376 | } |
377 | showSegwitAvailable(); | ||
359 | // Get the derivation path | 378 | // Get the derivation path |
360 | var derivationPath = getDerivationPath(); | 379 | var derivationPath = getDerivationPath(); |
361 | var errorText = findDerivationPathErrors(derivationPath); | 380 | var errorText = findDerivationPathErrors(derivationPath); |
@@ -406,8 +425,7 @@ | |||
406 | }, 50); | 425 | }, 50); |
407 | } | 426 | } |
408 | 427 | ||
409 | function useBitpayAddressesChange() { | 428 | function bitcoinCashAddressTypeChange() { |
410 | setBitcoinCashNetworkValues(); | ||
411 | phraseChanged(); | 429 | phraseChanged(); |
412 | } | 430 | } |
413 | 431 | ||
@@ -431,6 +449,17 @@ | |||
431 | $("td.privkey span").toggleClass("invisible"); | 449 | $("td.privkey span").toggleClass("invisible"); |
432 | } | 450 | } |
433 | 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 | |||
434 | // Private methods | 463 | // Private methods |
435 | 464 | ||
436 | function generateRandomPhrase() { | 465 | function generateRandomPhrase() { |
@@ -462,6 +491,37 @@ | |||
462 | } | 491 | } |
463 | 492 | ||
464 | 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 | ||
465 | bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); | 525 | bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); |
466 | } | 526 | } |
467 | 527 | ||
@@ -535,6 +595,37 @@ | |||
535 | } | 595 | } |
536 | 596 | ||
537 | 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 | ||
538 | try { | 629 | try { |
539 | bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); | 630 | bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); |
540 | } | 631 | } |
@@ -723,7 +814,8 @@ | |||
723 | DOM.extendedPubKey.val(extendedPubKey); | 814 | DOM.extendedPubKey.val(extendedPubKey); |
724 | // Display the addresses and privkeys | 815 | // Display the addresses and privkeys |
725 | clearAddressesList(); | 816 | clearAddressesList(); |
726 | displayAddresses(0, 20); | 817 | var initialAddressCount = parseInt(DOM.rowsToAdd.val()); |
818 | displayAddresses(0, initialAddressCount); | ||
727 | } | 819 | } |
728 | 820 | ||
729 | function displayAddresses(start, total) { | 821 | function displayAddresses(start, total) { |
@@ -766,6 +858,8 @@ | |||
766 | var self = this; | 858 | var self = this; |
767 | this.shouldGenerate = true; | 859 | this.shouldGenerate = true; |
768 | var useHardenedAddresses = DOM.hardenedAddresses.prop("checked"); | 860 | var useHardenedAddresses = DOM.hardenedAddresses.prop("checked"); |
861 | var useBip38 = DOM.useBip38.prop("checked"); | ||
862 | var bip38password = DOM.bip38Password.val(); | ||
769 | var isSegwit = segwitSelected(); | 863 | var isSegwit = segwitSelected(); |
770 | var segwitAvailable = networkHasSegwit(); | 864 | var segwitAvailable = networkHasSegwit(); |
771 | var isP2wpkh = p2wpkhSelected(); | 865 | var isP2wpkh = p2wpkhSelected(); |
@@ -780,6 +874,7 @@ | |||
780 | if (!self.shouldGenerate) { | 874 | if (!self.shouldGenerate) { |
781 | return; | 875 | return; |
782 | } | 876 | } |
877 | // derive HDkey for this row of the table | ||
783 | var key = "NA"; | 878 | var key = "NA"; |
784 | if (useHardenedAddresses) { | 879 | if (useHardenedAddresses) { |
785 | key = bip32ExtendedKey.deriveHardened(index); | 880 | key = bip32ExtendedKey.deriveHardened(index); |
@@ -787,19 +882,43 @@ | |||
787 | else { | 882 | else { |
788 | key = bip32ExtendedKey.derive(index); | 883 | key = bip32ExtendedKey.derive(index); |
789 | } | 884 | } |
790 | var address = key.getAddress().toString(); | 885 | // bip38 requires uncompressed keys |
886 | // see https://github.com/iancoleman/bip39/issues/140#issuecomment-352164035 | ||
887 | var keyPair = key.keyPair; | ||
888 | var useUncompressed = useBip38; | ||
889 | if (useUncompressed) { | ||
890 | keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false }); | ||
891 | } | ||
892 | // get address | ||
893 | var address = keyPair.getAddress().toString(); | ||
894 | // get privkey | ||
895 | var hasPrivkey = !key.isNeutered(); | ||
791 | var privkey = "NA"; | 896 | var privkey = "NA"; |
792 | if (!key.isNeutered()) { | 897 | if (hasPrivkey) { |
793 | privkey = key.keyPair.toWIF(network); | 898 | privkey = keyPair.toWIF(); |
899 | // BIP38 encode private key if required | ||
900 | if (useBip38) { | ||
901 | privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { | ||
902 | console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index); | ||
903 | }); | ||
904 | } | ||
794 | } | 905 | } |
795 | var pubkey = key.getPublicKeyBuffer().toString('hex'); | 906 | // get pubkey |
907 | var pubkey = keyPair.getPublicKeyBuffer().toString('hex'); | ||
796 | var indexText = getDerivationPath() + "/" + index; | 908 | var indexText = getDerivationPath() + "/" + index; |
797 | if (useHardenedAddresses) { | 909 | if (useHardenedAddresses) { |
798 | indexText = indexText + "'"; | 910 | indexText = indexText + "'"; |
799 | } | 911 | } |
800 | // Ethereum values are different | 912 | // Ethereum values are different |
801 | if (networks[DOM.network.val()].name == "ETH - Ethereum") { | 913 | if ((networks[DOM.network.val()].name == "ETH - Ethereum") |
802 | var privKeyBuffer = key.keyPair.d.toBuffer(32); | 914 | || (networks[DOM.network.val()].name == "ETC - Ethereum Classic") |
915 | || (networks[DOM.network.val()].name == "PIRL - Pirl") | ||
916 | || (networks[DOM.network.val()].name == "MIX - MIX") | ||
917 | || (networks[DOM.network.val()].name == "MUSIC - Musicoin") | ||
918 | || (networks[DOM.network.val()].name == "POA - Poa") | ||
919 | || (networks[DOM.network.val()].name == "EXP - Expanse") | ||
920 | || (networks[DOM.network.val()].name == "CLO - Callisto")) { | ||
921 | var privKeyBuffer = keyPair.d.toBuffer(32); | ||
803 | privkey = privKeyBuffer.toString('hex'); | 922 | privkey = privKeyBuffer.toString('hex'); |
804 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); | 923 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); |
805 | var hexAddress = addressBuffer.toString('hex'); | 924 | var hexAddress = addressBuffer.toString('hex'); |
@@ -825,6 +944,16 @@ | |||
825 | privkey = convertRipplePriv(privkey); | 944 | privkey = convertRipplePriv(privkey); |
826 | address = convertRippleAdrr(address); | 945 | address = convertRippleAdrr(address); |
827 | } | 946 | } |
947 | // Bitcoin Cash address format may vary | ||
948 | if (networks[DOM.network.val()].name == "BCH - Bitcoin Cash") { | ||
949 | var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val(); | ||
950 | if (bchAddrType == "cashaddr") { | ||
951 | address = bchaddr.toCashAddress(address); | ||
952 | } | ||
953 | else if (bchAddrType == "bitpay") { | ||
954 | address = bchaddr.toBitpayAddress(address); | ||
955 | } | ||
956 | } | ||
828 | // Segwit addresses are different | 957 | // Segwit addresses are different |
829 | if (isSegwit) { | 958 | if (isSegwit) { |
830 | if (!segwitAvailable) { | 959 | if (!segwitAvailable) { |
@@ -1164,6 +1293,17 @@ | |||
1164 | mnemonicLength = parseInt(mnemonicLength); | 1293 | mnemonicLength = parseInt(mnemonicLength); |
1165 | var numberOfBits = 32 * mnemonicLength / 3; | 1294 | var numberOfBits = 32 * mnemonicLength / 3; |
1166 | bits = bits.substring(0, numberOfBits); | 1295 | bits = bits.substring(0, numberOfBits); |
1296 | // show warning for weak entropy override | ||
1297 | if (mnemonicLength / 3 * 32 > entropy.binaryStr.length) { | ||
1298 | DOM.entropyWeakEntropyOverrideWarning.removeClass("hidden"); | ||
1299 | } | ||
1300 | else { | ||
1301 | DOM.entropyWeakEntropyOverrideWarning.addClass("hidden"); | ||
1302 | } | ||
1303 | } | ||
1304 | else { | ||
1305 | // hide warning for weak entropy override | ||
1306 | DOM.entropyWeakEntropyOverrideWarning.addClass("hidden"); | ||
1167 | } | 1307 | } |
1168 | // Discard trailing entropy | 1308 | // Discard trailing entropy |
1169 | var bitsToUse = Math.floor(bits.length / 32) * 32; | 1309 | var bitsToUse = Math.floor(bits.length / 32) * 32; |
@@ -1182,6 +1322,8 @@ | |||
1182 | DOM.phrase.val(phrase); | 1322 | DOM.phrase.val(phrase); |
1183 | // Show the word indexes | 1323 | // Show the word indexes |
1184 | showWordIndexes(); | 1324 | showWordIndexes(); |
1325 | // Show the checksum | ||
1326 | showChecksum(); | ||
1185 | } | 1327 | } |
1186 | 1328 | ||
1187 | function clearEntropyFeedback() { | 1329 | function clearEntropyFeedback() { |
@@ -1212,13 +1354,14 @@ | |||
1212 | var entropyTypeStr = getEntropyTypeStr(entropy); | 1354 | var entropyTypeStr = getEntropyTypeStr(entropy); |
1213 | var wordCount = Math.floor(numberOfBits / 32) * 3; | 1355 | var wordCount = Math.floor(numberOfBits / 32) * 3; |
1214 | var bitsPerEvent = entropy.bitsPerEvent.toFixed(2); | 1356 | var bitsPerEvent = entropy.bitsPerEvent.toFixed(2); |
1357 | var spacedBinaryStr = addSpacesEveryElevenBits(entropy.binaryStr); | ||
1215 | DOM.entropyFiltered.html(entropy.cleanHtml); | 1358 | DOM.entropyFiltered.html(entropy.cleanHtml); |
1216 | DOM.entropyType.text(entropyTypeStr); | 1359 | DOM.entropyType.text(entropyTypeStr); |
1217 | DOM.entropyCrackTime.text(timeToCrack); | 1360 | DOM.entropyCrackTime.text(timeToCrack); |
1218 | DOM.entropyEventCount.text(entropy.base.ints.length); | 1361 | DOM.entropyEventCount.text(entropy.base.ints.length); |
1219 | DOM.entropyBits.text(numberOfBits); | 1362 | DOM.entropyBits.text(numberOfBits); |
1220 | DOM.entropyWordCount.text(wordCount); | 1363 | DOM.entropyWordCount.text(wordCount); |
1221 | DOM.entropyBinary.text(entropy.binaryStr); | 1364 | DOM.entropyBinary.text(spacedBinaryStr); |
1222 | DOM.entropyBitsPerEvent.text(bitsPerEvent); | 1365 | DOM.entropyBitsPerEvent.text(bitsPerEvent); |
1223 | // detect and warn of filtering | 1366 | // detect and warn of filtering |
1224 | var rawNoSpaces = DOM.entropy.val().replace(/\s/g, ""); | 1367 | var rawNoSpaces = DOM.entropy.val().replace(/\s/g, ""); |
@@ -1341,7 +1484,20 @@ | |||
1341 | } | 1484 | } |
1342 | 1485 | ||
1343 | function networkHasSegwit() { | 1486 | function networkHasSegwit() { |
1344 | return networks[DOM.network.val()].segwitAvailable; | 1487 | var n = network; |
1488 | if ("baseNetwork" in network) { | ||
1489 | n = bitcoinjs.bitcoin.networks[network.baseNetwork]; | ||
1490 | } | ||
1491 | // check if only p2wpkh params are required | ||
1492 | if (p2wpkhSelected()) { | ||
1493 | return "p2wpkh" in n; | ||
1494 | } | ||
1495 | // check if only p2wpkh-in-p2sh params are required | ||
1496 | else if (p2wpkhInP2shSelected()) { | ||
1497 | return "p2wpkhInP2sh" in n; | ||
1498 | } | ||
1499 | // require both if it's unclear which params are required | ||
1500 | return "p2wpkh" in n && "p2wpkhInP2sh" in n; | ||
1345 | } | 1501 | } |
1346 | 1502 | ||
1347 | function bip49TabSelected() { | 1503 | function bip49TabSelected() { |
@@ -1365,6 +1521,8 @@ | |||
1365 | function showSegwitAvailable() { | 1521 | function showSegwitAvailable() { |
1366 | DOM.bip49unavailable.addClass("hidden"); | 1522 | DOM.bip49unavailable.addClass("hidden"); |
1367 | DOM.bip49available.removeClass("hidden"); | 1523 | DOM.bip49available.removeClass("hidden"); |
1524 | DOM.bip84unavailable.addClass("hidden"); | ||
1525 | DOM.bip84available.removeClass("hidden"); | ||
1368 | DOM.bip141unavailable.addClass("hidden"); | 1526 | DOM.bip141unavailable.addClass("hidden"); |
1369 | DOM.bip141available.removeClass("hidden"); | 1527 | DOM.bip141available.removeClass("hidden"); |
1370 | } | 1528 | } |
@@ -1372,23 +1530,12 @@ | |||
1372 | function showSegwitUnavailable() { | 1530 | function showSegwitUnavailable() { |
1373 | DOM.bip49available.addClass("hidden"); | 1531 | DOM.bip49available.addClass("hidden"); |
1374 | DOM.bip49unavailable.removeClass("hidden"); | 1532 | DOM.bip49unavailable.removeClass("hidden"); |
1533 | DOM.bip84available.addClass("hidden"); | ||
1534 | DOM.bip84unavailable.removeClass("hidden"); | ||
1375 | DOM.bip141available.addClass("hidden"); | 1535 | DOM.bip141available.addClass("hidden"); |
1376 | DOM.bip141unavailable.removeClass("hidden"); | 1536 | DOM.bip141unavailable.removeClass("hidden"); |
1377 | } | 1537 | } |
1378 | 1538 | ||
1379 | function useBitpayAddresses() { | ||
1380 | return !(DOM.useBitpayAddresses.prop("checked")); | ||
1381 | } | ||
1382 | |||
1383 | function setBitcoinCashNetworkValues() { | ||
1384 | if (useBitpayAddresses()) { | ||
1385 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
1386 | } | ||
1387 | else { | ||
1388 | network = bitcoinjs.bitcoin.networks.bitcoinCashBitbpay; | ||
1389 | } | ||
1390 | } | ||
1391 | |||
1392 | function adjustNetworkForSegwit() { | 1539 | function adjustNetworkForSegwit() { |
1393 | // If segwit is selected the xpub/xprv prefixes need to be adjusted | 1540 | // If segwit is selected the xpub/xprv prefixes need to be adjusted |
1394 | // to avoid accidentally importing BIP49 xpub to BIP44 watch only | 1541 | // to avoid accidentally importing BIP49 xpub to BIP44 watch only |
@@ -1443,6 +1590,35 @@ | |||
1443 | DOM.entropyWordIndexes.text(wordIndexesStr); | 1590 | DOM.entropyWordIndexes.text(wordIndexesStr); |
1444 | } | 1591 | } |
1445 | 1592 | ||
1593 | function showChecksum() { | ||
1594 | var phrase = DOM.phrase.val(); | ||
1595 | var words = phraseToWordArray(phrase); | ||
1596 | var checksumBitlength = words.length / 3; | ||
1597 | var checksum = ""; | ||
1598 | var binaryStr = ""; | ||
1599 | var language = getLanguage(); | ||
1600 | for (var i=words.length-1; i>=0; i--) { | ||
1601 | var word = words[i]; | ||
1602 | var wordIndex = WORDLISTS[language].indexOf(word); | ||
1603 | var wordBinary = wordIndex.toString(2); | ||
1604 | while (wordBinary.length < 11) { | ||
1605 | wordBinary = "0" + wordBinary; | ||
1606 | } | ||
1607 | var binaryStr = wordBinary + binaryStr; | ||
1608 | if (binaryStr.length >= checksumBitlength) { | ||
1609 | var start = binaryStr.length - checksumBitlength; | ||
1610 | var end = binaryStr.length; | ||
1611 | checksum = binaryStr.substring(start, end); | ||
1612 | // add spaces so the last group is 11 bits, not the first | ||
1613 | checksum = checksum.split("").reverse().join("") | ||
1614 | checksum = addSpacesEveryElevenBits(checksum); | ||
1615 | checksum = checksum.split("").reverse().join("") | ||
1616 | break; | ||
1617 | } | ||
1618 | } | ||
1619 | DOM.entropyChecksum.text(checksum); | ||
1620 | } | ||
1621 | |||
1446 | function updateCsv() { | 1622 | function updateCsv() { |
1447 | var tableCsv = "path,address,public key,private key\n"; | 1623 | var tableCsv = "path,address,public key,private key\n"; |
1448 | var rows = DOM.addresses.find("tr"); | 1624 | var rows = DOM.addresses.find("tr"); |
@@ -1463,27 +1639,118 @@ | |||
1463 | DOM.csv.val(tableCsv); | 1639 | DOM.csv.val(tableCsv); |
1464 | } | 1640 | } |
1465 | 1641 | ||
1642 | function addSpacesEveryElevenBits(binaryStr) { | ||
1643 | return binaryStr.match(/.{1,11}/g).join(" "); | ||
1644 | } | ||
1645 | |||
1466 | var networks = [ | 1646 | var networks = [ |
1467 | { | 1647 | { |
1648 | name: "AC - Asiacoin", | ||
1649 | onSelect: function() { | ||
1650 | network = bitcoinjs.bitcoin.networks.asiacoin; | ||
1651 | setHdCoin(51); | ||
1652 | }, | ||
1653 | }, | ||
1654 | { | ||
1655 | name: "ACC - Adcoin", | ||
1656 | onSelect: function() { | ||
1657 | network = bitcoinjs.bitcoin.networks.adcoin; | ||
1658 | setHdCoin(161); | ||
1659 | }, | ||
1660 | }, | ||
1661 | { | ||
1662 | name: "AUR - Auroracoin", | ||
1663 | onSelect: function() { | ||
1664 | network = bitcoinjs.bitcoin.networks.auroracoin; | ||
1665 | setHdCoin(85); | ||
1666 | }, | ||
1667 | }, | ||
1668 | { | ||
1468 | name: "AXE - Axe", | 1669 | name: "AXE - Axe", |
1469 | segwitAvailable: false, | ||
1470 | onSelect: function() { | 1670 | onSelect: function() { |
1471 | network = bitcoinjs.bitcoin.networks.axe; | 1671 | network = bitcoinjs.bitcoin.networks.axe; |
1472 | setHdCoin(0); | 1672 | setHdCoin(4242); |
1673 | }, | ||
1674 | }, | ||
1675 | { | ||
1676 | name: "ANON - ANON", | ||
1677 | onSelect: function() { | ||
1678 | network = bitcoinjs.bitcoin.networks.anon; | ||
1679 | setHdCoin(220); | ||
1680 | }, | ||
1681 | }, | ||
1682 | { | ||
1683 | name: "BCA - Bitcoin Atom", | ||
1684 | onSelect: function() { | ||
1685 | network = bitcoinjs.bitcoin.networks.atom; | ||
1686 | setHdCoin(185); | ||
1473 | }, | 1687 | }, |
1474 | }, | 1688 | }, |
1475 | { | 1689 | { |
1476 | name: "BCH - Bitcoin Cash", | 1690 | name: "BCH - Bitcoin Cash", |
1477 | segwitAvailable: false, | ||
1478 | onSelect: function() { | 1691 | onSelect: function() { |
1479 | DOM.useBitpayAddressesContainer.removeClass("hidden"); | 1692 | DOM.bitcoinCashAddressTypeContainer.removeClass("hidden"); |
1480 | setBitcoinCashNetworkValues(); | ||
1481 | setHdCoin(145); | 1693 | setHdCoin(145); |
1482 | }, | 1694 | }, |
1483 | }, | 1695 | }, |
1484 | { | 1696 | { |
1697 | name: "BEET - Beetlecoin", | ||
1698 | onSelect: function() { | ||
1699 | network = bitcoinjs.bitcoin.networks.beetlecoin; | ||
1700 | setHdCoin(800); | ||
1701 | }, | ||
1702 | }, | ||
1703 | { | ||
1704 | name: "BELA - Belacoin", | ||
1705 | onSelect: function() { | ||
1706 | network = bitcoinjs.bitcoin.networks.belacoin; | ||
1707 | setHdCoin(73); | ||
1708 | }, | ||
1709 | }, | ||
1710 | { | ||
1711 | name: "BLK - BlackCoin", | ||
1712 | onSelect: function() { | ||
1713 | network = bitcoinjs.bitcoin.networks.blackcoin; | ||
1714 | setHdCoin(10); | ||
1715 | }, | ||
1716 | }, | ||
1717 | { | ||
1718 | name: "BND - Blocknode", | ||
1719 | onSelect: function() { | ||
1720 | network = bitcoinjs.bitcoin.networks.blocknode; | ||
1721 | setHdCoin(2941); | ||
1722 | }, | ||
1723 | }, | ||
1724 | { | ||
1725 | name: "tBND - Blocknode Testnet", | ||
1726 | onSelect: function() { | ||
1727 | network = bitcoinjs.bitcoin.networks.blocknode_testnet; | ||
1728 | setHdCoin(1); | ||
1729 | }, | ||
1730 | }, | ||
1731 | { | ||
1732 | name: "BRIT - Britcoin", | ||
1733 | onSelect: function() { | ||
1734 | network = bitcoinjs.bitcoin.networks.britcoin; | ||
1735 | setHdCoin(70); | ||
1736 | }, | ||
1737 | }, | ||
1738 | { | ||
1739 | name: "BSD - Bitsend", | ||
1740 | onSelect: function() { | ||
1741 | network = bitcoinjs.bitcoin.networks.bitsend; | ||
1742 | setHdCoin(91); | ||
1743 | }, | ||
1744 | }, | ||
1745 | { | ||
1746 | name: "BTA - Bata", | ||
1747 | onSelect: function() { | ||
1748 | network = bitcoinjs.bitcoin.networks.bata; | ||
1749 | setHdCoin(89); | ||
1750 | }, | ||
1751 | }, | ||
1752 | { | ||
1485 | name: "BTC - Bitcoin", | 1753 | name: "BTC - Bitcoin", |
1486 | segwitAvailable: true, | ||
1487 | onSelect: function() { | 1754 | onSelect: function() { |
1488 | network = bitcoinjs.bitcoin.networks.bitcoin; | 1755 | network = bitcoinjs.bitcoin.networks.bitcoin; |
1489 | setHdCoin(0); | 1756 | setHdCoin(0); |
@@ -1491,39 +1758,119 @@ | |||
1491 | }, | 1758 | }, |
1492 | { | 1759 | { |
1493 | name: "BTC - Bitcoin Testnet", | 1760 | name: "BTC - Bitcoin Testnet", |
1494 | segwitAvailable: true, | ||
1495 | onSelect: function() { | 1761 | onSelect: function() { |
1496 | network = bitcoinjs.bitcoin.networks.testnet; | 1762 | network = bitcoinjs.bitcoin.networks.testnet; |
1497 | setHdCoin(1); | 1763 | setHdCoin(1); |
1498 | }, | 1764 | }, |
1499 | }, | 1765 | }, |
1766 | { | ||
1767 | name: "BITG - Bitcoin Green", | ||
1768 | onSelect: function() { | ||
1769 | network = bitcoinjs.bitcoin.networks.bitcoingreen; | ||
1770 | setHdCoin(222); | ||
1771 | }, | ||
1772 | }, | ||
1773 | { | ||
1774 | name: "BTCP - Bitcoin Private", | ||
1775 | onSelect: function() { | ||
1776 | network = bitcoinjs.bitcoin.networks.bitcoinprivate; | ||
1777 | setHdCoin(183); | ||
1778 | }, | ||
1779 | }, | ||
1780 | { | ||
1781 | name: "BTCZ - Bitcoinz", | ||
1782 | onSelect: function() { | ||
1783 | network = bitcoinjs.bitcoin.networks.bitcoinz; | ||
1784 | setHdCoin(177); | ||
1785 | }, | ||
1786 | }, | ||
1787 | { | ||
1788 | name: "BTDX - BitCloud", | ||
1789 | onSelect: function() { | ||
1790 | network = bitcoinjs.bitcoin.networks.bitcloud; | ||
1791 | setHdCoin(218); | ||
1792 | }, | ||
1793 | }, | ||
1500 | { | 1794 | { |
1501 | name: "BTG - Bitcoin Gold", | 1795 | name: "BTG - Bitcoin Gold", |
1502 | segwitAvailable: true, | ||
1503 | onSelect: function() { | 1796 | onSelect: function() { |
1504 | network = bitcoinjs.bitcoin.networks.bgold; | 1797 | network = bitcoinjs.bitcoin.networks.bgold; |
1505 | setHdCoin(0); | 1798 | setHdCoin(156); |
1799 | }, | ||
1800 | }, | ||
1801 | { | ||
1802 | name: "BTX - Bitcore", | ||
1803 | onSelect: function() { | ||
1804 | network = bitcoinjs.bitcoin.networks.bitcore; | ||
1805 | setHdCoin(160); | ||
1806 | }, | ||
1807 | }, | ||
1808 | { | ||
1809 | name: "CCN - Cannacoin", | ||
1810 | onSelect: function() { | ||
1811 | network = bitcoinjs.bitcoin.networks.cannacoin; | ||
1812 | setHdCoin(19); | ||
1813 | }, | ||
1814 | }, | ||
1815 | { | ||
1816 | name: "CESC - Cryptoescudo", | ||
1817 | onSelect: function() { | ||
1818 | network = bitcoinjs.bitcoin.networks.cannacoin; | ||
1819 | setHdCoin(111); | ||
1820 | }, | ||
1821 | }, | ||
1822 | { | ||
1823 | name: "CDN - Canadaecoin", | ||
1824 | onSelect: function() { | ||
1825 | network = bitcoinjs.bitcoin.networks.canadaecoin; | ||
1826 | setHdCoin(34); | ||
1506 | }, | 1827 | }, |
1507 | }, | 1828 | }, |
1508 | { | 1829 | { |
1509 | name: "CLAM - Clams", | 1830 | name: "CLAM - Clams", |
1510 | segwitAvailable: false, | ||
1511 | onSelect: function() { | 1831 | onSelect: function() { |
1512 | network = bitcoinjs.bitcoin.networks.clam; | 1832 | network = bitcoinjs.bitcoin.networks.clam; |
1513 | setHdCoin(23); | 1833 | setHdCoin(23); |
1514 | }, | 1834 | }, |
1515 | }, | 1835 | }, |
1516 | { | 1836 | { |
1517 | name: "CRW - Crown", | 1837 | name: "CLO - Callisto", |
1518 | segwitAvailable: false, | 1838 | segwitAvailable: false, |
1519 | onSelect: function() { | 1839 | onSelect: function() { |
1840 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
1841 | setHdCoin(820); | ||
1842 | }, | ||
1843 | }, | ||
1844 | { | ||
1845 | name: "CLUB - Clubcoin", | ||
1846 | onSelect: function() { | ||
1847 | network = bitcoinjs.bitcoin.networks.clubcoin; | ||
1848 | setHdCoin(79); | ||
1849 | }, | ||
1850 | }, | ||
1851 | { | ||
1852 | name: "CMP - Compcoin", | ||
1853 | onSelect: function() { | ||
1854 | network = bitcoinjs.bitcoin.networks.compcoin; | ||
1855 | setHdCoin(71); | ||
1856 | }, | ||
1857 | }, | ||
1858 | { | ||
1859 | name: "CRAVE - Crave", | ||
1860 | onSelect: function() { | ||
1861 | network = bitcoinjs.bitcoin.networks.crave; | ||
1862 | setHdCoin(186); | ||
1863 | }, | ||
1864 | }, | ||
1865 | { | ||
1866 | name: "CRW - Crown", | ||
1867 | onSelect: function() { | ||
1520 | network = bitcoinjs.bitcoin.networks.crown; | 1868 | network = bitcoinjs.bitcoin.networks.crown; |
1521 | setHdCoin(72); | 1869 | setHdCoin(72); |
1522 | }, | 1870 | }, |
1523 | }, | 1871 | }, |
1524 | { | 1872 | { |
1525 | name: "DASH - Dash", | 1873 | name: "DASH - Dash", |
1526 | segwitAvailable: false, | ||
1527 | onSelect: function() { | 1874 | onSelect: function() { |
1528 | network = bitcoinjs.bitcoin.networks.dash; | 1875 | network = bitcoinjs.bitcoin.networks.dash; |
1529 | setHdCoin(5); | 1876 | setHdCoin(5); |
@@ -1531,47 +1878,218 @@ | |||
1531 | }, | 1878 | }, |
1532 | { | 1879 | { |
1533 | name: "DASH - Dash Testnet", | 1880 | name: "DASH - Dash Testnet", |
1534 | segwitAvailable: false, | ||
1535 | onSelect: function() { | 1881 | onSelect: function() { |
1536 | network = bitcoinjs.bitcoin.networks.dashtn; | 1882 | network = bitcoinjs.bitcoin.networks.dashtn; |
1537 | setHdCoin(1); | 1883 | setHdCoin(1); |
1538 | }, | 1884 | }, |
1539 | }, | 1885 | }, |
1540 | { | 1886 | { |
1887 | name: "DFC - Defcoin", | ||
1888 | onSelect: function() { | ||
1889 | network = bitcoinjs.bitcoin.networks.defcoin; | ||
1890 | setHdCoin(1337); | ||
1891 | }, | ||
1892 | }, | ||
1893 | { | ||
1894 | name: "DGB - Digibyte", | ||
1895 | onSelect: function() { | ||
1896 | network = bitcoinjs.bitcoin.networks.digibyte; | ||
1897 | setHdCoin(20); | ||
1898 | }, | ||
1899 | }, | ||
1900 | { | ||
1901 | name: "DGC - Digitalcoin", | ||
1902 | onSelect: function() { | ||
1903 | network = bitcoinjs.bitcoin.networks.digitalcoin; | ||
1904 | setHdCoin(18); | ||
1905 | }, | ||
1906 | }, | ||
1907 | { | ||
1908 | name: "DMD - Diamond", | ||
1909 | onSelect: function() { | ||
1910 | network = bitcoinjs.bitcoin.networks.diamond; | ||
1911 | setHdCoin(152); | ||
1912 | }, | ||
1913 | }, | ||
1914 | { | ||
1915 | name: "DNR - Denarius", | ||
1916 | onSelect: function() { | ||
1917 | network = bitcoinjs.bitcoin.networks.denarius; | ||
1918 | setHdCoin(116); | ||
1919 | }, | ||
1920 | }, | ||
1921 | { | ||
1541 | name: "DOGE - Dogecoin", | 1922 | name: "DOGE - Dogecoin", |
1542 | segwitAvailable: false, | ||
1543 | onSelect: function() { | 1923 | onSelect: function() { |
1544 | network = bitcoinjs.bitcoin.networks.dogecoin; | 1924 | network = bitcoinjs.bitcoin.networks.dogecoin; |
1545 | setHdCoin(3); | 1925 | setHdCoin(3); |
1546 | }, | 1926 | }, |
1547 | }, | 1927 | }, |
1548 | { | 1928 | { |
1549 | name: "ETH - Ethereum", | 1929 | name: "ECN - Ecoin", |
1930 | onSelect: function() { | ||
1931 | network = bitcoinjs.bitcoin.networks.ecoin; | ||
1932 | setHdCoin(115); | ||
1933 | }, | ||
1934 | }, | ||
1935 | { | ||
1936 | name: "EDRC - Edrcoin", | ||
1937 | onSelect: function() { | ||
1938 | network = bitcoinjs.bitcoin.networks.edrcoin; | ||
1939 | setHdCoin(56); | ||
1940 | }, | ||
1941 | }, | ||
1942 | { | ||
1943 | name: "EFL - Egulden", | ||
1944 | onSelect: function() { | ||
1945 | network = bitcoinjs.bitcoin.networks.egulden; | ||
1946 | setHdCoin(78); | ||
1947 | }, | ||
1948 | }, | ||
1949 | { | ||
1950 | name: "EMC2 - Einsteinium", | ||
1951 | onSelect: function() { | ||
1952 | network = bitcoinjs.bitcoin.networks.einsteinium; | ||
1953 | setHdCoin(41); | ||
1954 | }, | ||
1955 | }, | ||
1956 | { | ||
1957 | name: "ERC - Europecoin", | ||
1958 | onSelect: function() { | ||
1959 | network = bitcoinjs.bitcoin.networks.europecoin; | ||
1960 | setHdCoin(151); | ||
1961 | }, | ||
1962 | }, | ||
1963 | { | ||
1964 | name: "ETC - Ethereum Classic", | ||
1550 | segwitAvailable: false, | 1965 | segwitAvailable: false, |
1551 | onSelect: function() { | 1966 | onSelect: function() { |
1552 | network = bitcoinjs.bitcoin.networks.bitcoin; | 1967 | network = bitcoinjs.bitcoin.networks.bitcoin; |
1968 | setHdCoin(61); | ||
1969 | }, | ||
1970 | }, | ||
1971 | { | ||
1972 | name: "ETH - Ethereum", | ||
1973 | onSelect: function() { | ||
1974 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
1553 | setHdCoin(60); | 1975 | setHdCoin(60); |
1554 | }, | 1976 | }, |
1555 | }, | 1977 | }, |
1556 | { | 1978 | { |
1557 | name: "FJC - Fujicoin", | 1979 | name: "EXCL - Exclusivecoin", |
1980 | onSelect: function() { | ||
1981 | network = bitcoinjs.bitcoin.networks.exclusivecoin; | ||
1982 | setHdCoin(190); | ||
1983 | }, | ||
1984 | }, | ||
1985 | { | ||
1986 | name: "EXCC - ExchangeCoin", | ||
1987 | onSelect: function() { | ||
1988 | network = bitcoinjs.bitcoin.networks.exchangecoin; | ||
1989 | setHdCoin(0); | ||
1990 | }, | ||
1991 | }, | ||
1992 | { | ||
1993 | name: "EXP - Expanse", | ||
1558 | segwitAvailable: false, | 1994 | segwitAvailable: false, |
1559 | onSelect: function() { | 1995 | onSelect: function() { |
1996 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
1997 | setHdCoin(40); | ||
1998 | }, | ||
1999 | }, | ||
2000 | { | ||
2001 | name: "FJC - Fujicoin", | ||
2002 | onSelect: function() { | ||
1560 | network = bitcoinjs.bitcoin.networks.fujicoin; | 2003 | network = bitcoinjs.bitcoin.networks.fujicoin; |
1561 | setHdCoin(75); | 2004 | setHdCoin(75); |
1562 | }, | 2005 | }, |
1563 | }, | 2006 | }, |
1564 | { | 2007 | { |
2008 | name: "FLASH - Flashcoin", | ||
2009 | onSelect: function() { | ||
2010 | network = bitcoinjs.bitcoin.networks.flashcoin; | ||
2011 | setHdCoin(120); | ||
2012 | }, | ||
2013 | }, | ||
2014 | { | ||
2015 | name: "FRST - Firstcoin", | ||
2016 | onSelect: function() { | ||
2017 | network = bitcoinjs.bitcoin.networks.firstcoin; | ||
2018 | setHdCoin(167); | ||
2019 | }, | ||
2020 | }, | ||
2021 | { | ||
2022 | name: "FTC - Feathercoin", | ||
2023 | onSelect: function() { | ||
2024 | network = bitcoinjs.bitcoin.networks.feathercoin; | ||
2025 | setHdCoin(8); | ||
2026 | }, | ||
2027 | }, | ||
2028 | { | ||
1565 | name: "GAME - GameCredits", | 2029 | name: "GAME - GameCredits", |
1566 | segwitAvailable: false, | ||
1567 | onSelect: function() { | 2030 | onSelect: function() { |
1568 | network = bitcoinjs.bitcoin.networks.game; | 2031 | network = bitcoinjs.bitcoin.networks.game; |
1569 | setHdCoin(101); | 2032 | setHdCoin(101); |
1570 | }, | 2033 | }, |
1571 | }, | 2034 | }, |
1572 | { | 2035 | { |
2036 | name: "GBX - Gobyte", | ||
2037 | onSelect: function() { | ||
2038 | network = bitcoinjs.bitcoin.networks.gobyte; | ||
2039 | setHdCoin(176); | ||
2040 | }, | ||
2041 | }, | ||
2042 | { | ||
2043 | name: "GCR - GCRCoin", | ||
2044 | onSelect: function() { | ||
2045 | network = bitcoinjs.bitcoin.networks.gcr; | ||
2046 | setHdCoin(79); | ||
2047 | }, | ||
2048 | }, | ||
2049 | { | ||
2050 | name: "GRC - Gridcoin", | ||
2051 | onSelect: function() { | ||
2052 | network = bitcoinjs.bitcoin.networks.gridcoin; | ||
2053 | setHdCoin(84); | ||
2054 | }, | ||
2055 | }, | ||
2056 | { | ||
2057 | name: "HNC - Helleniccoin", | ||
2058 | onSelect: function() { | ||
2059 | network = bitcoinjs.bitcoin.networks.helleniccoin; | ||
2060 | setHdCoin(168); | ||
2061 | }, | ||
2062 | }, | ||
2063 | { | ||
2064 | name: "HUSH - Hush", | ||
2065 | onSelect: function() { | ||
2066 | network = bitcoinjs.bitcoin.networks.hush; | ||
2067 | setHdCoin(197); | ||
2068 | }, | ||
2069 | }, | ||
2070 | { | ||
2071 | name: "INSN - Insane", | ||
2072 | onSelect: function() { | ||
2073 | network = bitcoinjs.bitcoin.networks.insane; | ||
2074 | setHdCoin(68); | ||
2075 | }, | ||
2076 | }, | ||
2077 | { | ||
2078 | name: "IOP - Iop", | ||
2079 | onSelect: function() { | ||
2080 | network = bitcoinjs.bitcoin.networks.iop; | ||
2081 | setHdCoin(66); | ||
2082 | }, | ||
2083 | }, | ||
2084 | { | ||
2085 | name: "IXC - Ixcoin", | ||
2086 | onSelect: function() { | ||
2087 | network = bitcoinjs.bitcoin.networks.ixcoin; | ||
2088 | setHdCoin(86); | ||
2089 | }, | ||
2090 | }, | ||
2091 | { | ||
1573 | name: "JBS - Jumbucks", | 2092 | name: "JBS - Jumbucks", |
1574 | segwitAvailable: false, | ||
1575 | onSelect: function() { | 2093 | onSelect: function() { |
1576 | network = bitcoinjs.bitcoin.networks.jumbucks; | 2094 | network = bitcoinjs.bitcoin.networks.jumbucks; |
1577 | setHdCoin(26); | 2095 | setHdCoin(26); |
@@ -1586,8 +2104,43 @@ | |||
1586 | }, | 2104 | }, |
1587 | }, | 2105 | }, |
1588 | { | 2106 | { |
2107 | name: "KOBO - Kobocoin", | ||
2108 | bip49available: false, | ||
2109 | onSelect: function() { | ||
2110 | network = bitcoinjs.bitcoin.networks.kobocoin; | ||
2111 | setHdCoin(196); | ||
2112 | }, | ||
2113 | }, | ||
2114 | { | ||
2115 | name: "LBC - Library Credits", | ||
2116 | onSelect: function() { | ||
2117 | network = bitcoinjs.bitcoin.networks.lbry; | ||
2118 | setHdCoin(140); | ||
2119 | }, | ||
2120 | }, | ||
2121 | { | ||
2122 | name: "LCC - Litecoincash", | ||
2123 | onSelect: function() { | ||
2124 | network = bitcoinjs.bitcoin.networks.litecoincash; | ||
2125 | setHdCoin(192); | ||
2126 | }, | ||
2127 | }, | ||
2128 | { | ||
2129 | name: "LDCN - Landcoin", | ||
2130 | onSelect: function() { | ||
2131 | network = bitcoinjs.bitcoin.networks.landcoin; | ||
2132 | setHdCoin(63); | ||
2133 | }, | ||
2134 | }, | ||
2135 | { | ||
2136 | name: "LINX - Linx", | ||
2137 | onSelect: function() { | ||
2138 | network = bitcoinjs.bitcoin.networks.linx; | ||
2139 | setHdCoin(114); | ||
2140 | }, | ||
2141 | }, | ||
2142 | { | ||
1589 | name: "LTC - Litecoin", | 2143 | name: "LTC - Litecoin", |
1590 | segwitAvailable: true, | ||
1591 | onSelect: function() { | 2144 | onSelect: function() { |
1592 | network = bitcoinjs.bitcoin.networks.litecoin; | 2145 | network = bitcoinjs.bitcoin.networks.litecoin; |
1593 | setHdCoin(2); | 2146 | setHdCoin(2); |
@@ -1595,64 +2148,284 @@ | |||
1595 | }, | 2148 | }, |
1596 | }, | 2149 | }, |
1597 | { | 2150 | { |
2151 | name: "LTZ - LitecoinZ", | ||
2152 | onSelect: function() { | ||
2153 | network = bitcoinjs.bitcoin.networks.litecoinz; | ||
2154 | setHdCoin(221); | ||
2155 | }, | ||
2156 | }, | ||
2157 | { | ||
2158 | name: "LYNX - Lynx", | ||
2159 | onSelect: function() { | ||
2160 | network = bitcoinjs.bitcoin.networks.lynx; | ||
2161 | setHdCoin(191); | ||
2162 | }, | ||
2163 | }, | ||
2164 | { | ||
1598 | name: "MAZA - Maza", | 2165 | name: "MAZA - Maza", |
1599 | segwitAvailable: false, | ||
1600 | onSelect: function() { | 2166 | onSelect: function() { |
1601 | network = bitcoinjs.bitcoin.networks.maza; | 2167 | network = bitcoinjs.bitcoin.networks.maza; |
1602 | setHdCoin(13); | 2168 | setHdCoin(13); |
1603 | }, | 2169 | }, |
1604 | }, | 2170 | }, |
1605 | { | 2171 | { |
2172 | name: "MEC - Megacoin", | ||
2173 | onSelect: function() { | ||
2174 | network = bitcoinjs.bitcoin.networks.megacoin; | ||
2175 | setHdCoin(217); | ||
2176 | }, | ||
2177 | }, | ||
2178 | { | ||
2179 | name: "MIX - MIX", | ||
2180 | segwitAvailable: false, | ||
2181 | onSelect: function() { | ||
2182 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2183 | setHdCoin(76); | ||
2184 | }, | ||
2185 | }, | ||
2186 | { | ||
2187 | name: "MNX - Minexcoin", | ||
2188 | onSelect: function() { | ||
2189 | network = bitcoinjs.bitcoin.networks.minexcoin; | ||
2190 | setHdCoin(182); | ||
2191 | }, | ||
2192 | }, | ||
2193 | { | ||
1606 | name: "MONA - Monacoin", | 2194 | name: "MONA - Monacoin", |
1607 | segwitAvailable: true, | ||
1608 | onSelect: function() { | 2195 | onSelect: function() { |
1609 | network = bitcoinjs.bitcoin.networks.monacoin, | 2196 | network = bitcoinjs.bitcoin.networks.monacoin, |
1610 | setHdCoin(22); | 2197 | setHdCoin(22); |
1611 | }, | 2198 | }, |
1612 | }, | 2199 | }, |
1613 | { | 2200 | { |
1614 | name: "NMC - Namecoin", | 2201 | name: "MUSIC - Musicoin", |
1615 | segwitAvailable: false, | 2202 | segwitAvailable: false, |
1616 | onSelect: function() { | 2203 | onSelect: function() { |
2204 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2205 | setHdCoin(184); | ||
2206 | }, | ||
2207 | }, | ||
2208 | { | ||
2209 | name: "NAV - Navcoin", | ||
2210 | onSelect: function() { | ||
2211 | network = bitcoinjs.bitcoin.networks.navcoin; | ||
2212 | setHdCoin(130); | ||
2213 | }, | ||
2214 | }, | ||
2215 | { | ||
2216 | name: "NEBL - Neblio", | ||
2217 | onSelect: function() { | ||
2218 | network = bitcoinjs.bitcoin.networks.neblio; | ||
2219 | setHdCoin(146); | ||
2220 | }, | ||
2221 | }, | ||
2222 | { | ||
2223 | name: "NEOS - Neoscoin", | ||
2224 | onSelect: function() { | ||
2225 | network = bitcoinjs.bitcoin.networks.neoscoin; | ||
2226 | setHdCoin(25); | ||
2227 | }, | ||
2228 | }, | ||
2229 | { | ||
2230 | name: "NLG - Gulden", | ||
2231 | onSelect: function() { | ||
2232 | network = bitcoinjs.bitcoin.networks.gulden; | ||
2233 | setHdCoin(87); | ||
2234 | }, | ||
2235 | }, | ||
2236 | { | ||
2237 | name: "NMC - Namecoin", | ||
2238 | onSelect: function() { | ||
1617 | network = bitcoinjs.bitcoin.networks.namecoin; | 2239 | network = bitcoinjs.bitcoin.networks.namecoin; |
1618 | setHdCoin(7); | 2240 | setHdCoin(7); |
1619 | }, | 2241 | }, |
1620 | }, | 2242 | }, |
1621 | { | 2243 | { |
2244 | name: "NRG - Energi", | ||
2245 | onSelect: function() { | ||
2246 | network = bitcoinjs.bitcoin.networks.energi; | ||
2247 | setHdCoin(204); | ||
2248 | }, | ||
2249 | }, | ||
2250 | { | ||
2251 | name: "NRO - Neurocoin", | ||
2252 | onSelect: function() { | ||
2253 | network = bitcoinjs.bitcoin.networks.neurocoin; | ||
2254 | setHdCoin(110); | ||
2255 | }, | ||
2256 | }, | ||
2257 | { | ||
2258 | name: "NSR - Nushares", | ||
2259 | onSelect: function() { | ||
2260 | network = bitcoinjs.bitcoin.networks.nushares; | ||
2261 | setHdCoin(11); | ||
2262 | }, | ||
2263 | }, | ||
2264 | { | ||
2265 | name: "NYC - Newyorkc", | ||
2266 | onSelect: function() { | ||
2267 | network = bitcoinjs.bitcoin.networks.newyorkc; | ||
2268 | setHdCoin(179); | ||
2269 | }, | ||
2270 | }, | ||
2271 | { | ||
2272 | name: "NVC - Novacoin", | ||
2273 | onSelect: function() { | ||
2274 | network = bitcoinjs.bitcoin.networks.novacoin; | ||
2275 | setHdCoin(50); | ||
2276 | }, | ||
2277 | }, | ||
2278 | { | ||
2279 | name: "OK - Okcash", | ||
2280 | onSelect: function() { | ||
2281 | network = bitcoinjs.bitcoin.networks.okcash; | ||
2282 | setHdCoin(69); | ||
2283 | }, | ||
2284 | }, | ||
2285 | { | ||
2286 | name: "OMNI - Omnicore", | ||
2287 | onSelect: function() { | ||
2288 | network = bitcoinjs.bitcoin.networks.omnicore; | ||
2289 | setHdCoin(200); | ||
2290 | }, | ||
2291 | }, | ||
2292 | { | ||
1622 | name: "ONX - Onixcoin", | 2293 | name: "ONX - Onixcoin", |
1623 | segwitAvailable: false, | ||
1624 | onSelect: function() { | 2294 | onSelect: function() { |
1625 | network = bitcoinjs.bitcoin.networks.onixcoin; | 2295 | network = bitcoinjs.bitcoin.networks.onixcoin; |
1626 | setHdCoin(174); | 2296 | setHdCoin(174); |
1627 | }, | 2297 | }, |
1628 | }, | 2298 | }, |
2299 | { | ||
2300 | name: "PHR - Phore", | ||
2301 | onSelect: function() { | ||
2302 | network = bitcoinjs.bitcoin.networks.phore; | ||
2303 | setHdCoin(444); | ||
2304 | }, | ||
2305 | }, | ||
1629 | { | 2306 | { |
1630 | name: "PIVX - PIVX", | 2307 | name: "PINK - Pinkcoin", |
2308 | onSelect: function() { | ||
2309 | network = bitcoinjs.bitcoin.networks.pinkcoin; | ||
2310 | setHdCoin(117); | ||
2311 | }, | ||
2312 | }, | ||
2313 | { | ||
2314 | name: "PIRL - Pirl", | ||
1631 | segwitAvailable: false, | 2315 | segwitAvailable: false, |
1632 | onSelect: function() { | 2316 | onSelect: function() { |
2317 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2318 | setHdCoin(164); | ||
2319 | }, | ||
2320 | }, | ||
2321 | { | ||
2322 | name: "PIVX - PIVX", | ||
2323 | onSelect: function() { | ||
1633 | network = bitcoinjs.bitcoin.networks.pivx; | 2324 | network = bitcoinjs.bitcoin.networks.pivx; |
1634 | setHdCoin(119); | 2325 | setHdCoin(119); |
1635 | }, | 2326 | }, |
1636 | }, | 2327 | }, |
1637 | { | 2328 | { |
1638 | name: "PIVX - PIVX Testnet", | 2329 | name: "PIVX - PIVX Testnet", |
1639 | segwitAvailable: false, | ||
1640 | onSelect: function() { | 2330 | onSelect: function() { |
1641 | network = bitcoinjs.bitcoin.networks.pivxtestnet; | 2331 | network = bitcoinjs.bitcoin.networks.pivxtestnet; |
1642 | setHdCoin(1); | 2332 | setHdCoin(1); |
1643 | }, | 2333 | }, |
1644 | }, | 2334 | }, |
1645 | { | 2335 | { |
1646 | name: "PPC - Peercoin", | 2336 | name: "POA - Poa", |
1647 | segwitAvailable: false, | 2337 | segwitAvailable: false, |
1648 | onSelect: function() { | 2338 | onSelect: function() { |
2339 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2340 | setHdCoin(178); | ||
2341 | }, | ||
2342 | }, | ||
2343 | { | ||
2344 | name: "POSW - POSWcoin", | ||
2345 | onSelect: function() { | ||
2346 | network = bitcoinjs.bitcoin.networks.poswcoin; | ||
2347 | setHdCoin(47); | ||
2348 | }, | ||
2349 | }, | ||
2350 | { | ||
2351 | name: "POT - Potcoin", | ||
2352 | onSelect: function() { | ||
2353 | network = bitcoinjs.bitcoin.networks.potcoin; | ||
2354 | setHdCoin(81); | ||
2355 | }, | ||
2356 | }, | ||
2357 | { | ||
2358 | name: "PPC - Peercoin", | ||
2359 | onSelect: function() { | ||
1649 | network = bitcoinjs.bitcoin.networks.peercoin; | 2360 | network = bitcoinjs.bitcoin.networks.peercoin; |
1650 | setHdCoin(6); | 2361 | setHdCoin(6); |
1651 | }, | 2362 | }, |
1652 | }, | 2363 | }, |
2364 | { | ||
2365 | name: "PRJ - ProjectCoin", | ||
2366 | onSelect: function() { | ||
2367 | network = bitcoinjs.bitcoin.networks.projectcoin; | ||
2368 | setHdCoin(533); | ||
2369 | }, | ||
2370 | }, | ||
2371 | { | ||
2372 | name: "PSB - Pesobit", | ||
2373 | onSelect: function() { | ||
2374 | network = bitcoinjs.bitcoin.networks.pesobit; | ||
2375 | setHdCoin(62); | ||
2376 | }, | ||
2377 | }, | ||
2378 | { | ||
2379 | name: "PUT - Putincoin", | ||
2380 | onSelect: function() { | ||
2381 | network = bitcoinjs.bitcoin.networks.putincoin; | ||
2382 | setHdCoin(122); | ||
2383 | }, | ||
2384 | }, | ||
2385 | { | ||
2386 | name: "RVN - Ravencoin", | ||
2387 | onSelect: function() { | ||
2388 | network = bitcoinjs.bitcoin.networks.ravencoin; | ||
2389 | setHdCoin(175); | ||
2390 | }, | ||
2391 | }, | ||
2392 | { | ||
2393 | name: "RBY - Rubycoin", | ||
2394 | onSelect: function() { | ||
2395 | network = bitcoinjs.bitcoin.networks.rubycoin; | ||
2396 | setHdCoin(16); | ||
2397 | }, | ||
2398 | }, | ||
2399 | { | ||
2400 | name: "RDD - Reddcoin", | ||
2401 | onSelect: function() { | ||
2402 | network = bitcoinjs.bitcoin.networks.reddcoin; | ||
2403 | setHdCoin(4); | ||
2404 | }, | ||
2405 | }, | ||
2406 | { | ||
2407 | name: "RVR - RevolutionVR", | ||
2408 | onSelect: function() { | ||
2409 | network = bitcoinjs.bitcoin.networks.revolutionvr; | ||
2410 | setHdCoin(129); | ||
2411 | }, | ||
2412 | }, | ||
2413 | { | ||
2414 | name: "SAFE - Safecoin", | ||
2415 | onSelect: function() { | ||
2416 | network = bitcoinjs.bitcoin.networks.safecoin; | ||
2417 | setHdCoin(19165); | ||
2418 | }, | ||
2419 | }, | ||
2420 | { | ||
2421 | name: "SLS - Salus", | ||
2422 | onSelect: function() { | ||
2423 | network = bitcoinjs.bitcoin.networks.salus; | ||
2424 | setHdCoin(63); | ||
2425 | }, | ||
2426 | }, | ||
1653 | { | 2427 | { |
1654 | name: "SDC - ShadowCash", | 2428 | name: "SDC - ShadowCash", |
1655 | segwitAvailable: false, | ||
1656 | onSelect: function() { | 2429 | onSelect: function() { |
1657 | network = bitcoinjs.bitcoin.networks.shadow; | 2430 | network = bitcoinjs.bitcoin.networks.shadow; |
1658 | setHdCoin(35); | 2431 | setHdCoin(35); |
@@ -1660,7 +2433,6 @@ | |||
1660 | }, | 2433 | }, |
1661 | { | 2434 | { |
1662 | name: "SDC - ShadowCash Testnet", | 2435 | name: "SDC - ShadowCash Testnet", |
1663 | segwitAvailable: false, | ||
1664 | onSelect: function() { | 2436 | onSelect: function() { |
1665 | network = bitcoinjs.bitcoin.networks.shadowtn; | 2437 | network = bitcoinjs.bitcoin.networks.shadowtn; |
1666 | setHdCoin(1); | 2438 | setHdCoin(1); |
@@ -1668,7 +2440,6 @@ | |||
1668 | }, | 2440 | }, |
1669 | { | 2441 | { |
1670 | name: "SLM - Slimcoin", | 2442 | name: "SLM - Slimcoin", |
1671 | segwitAvailable: false, | ||
1672 | onSelect: function() { | 2443 | onSelect: function() { |
1673 | network = bitcoinjs.bitcoin.networks.slimcoin; | 2444 | network = bitcoinjs.bitcoin.networks.slimcoin; |
1674 | setHdCoin(63); | 2445 | setHdCoin(63); |
@@ -1676,23 +2447,104 @@ | |||
1676 | }, | 2447 | }, |
1677 | { | 2448 | { |
1678 | name: "SLM - Slimcoin Testnet", | 2449 | name: "SLM - Slimcoin Testnet", |
1679 | segwitAvailable: false, | ||
1680 | onSelect: function() { | 2450 | onSelect: function() { |
1681 | network = bitcoinjs.bitcoin.networks.slimcointn; | 2451 | network = bitcoinjs.bitcoin.networks.slimcointn; |
1682 | setHdCoin(111); | 2452 | setHdCoin(111); |
1683 | }, | 2453 | }, |
1684 | }, | 2454 | }, |
1685 | { | 2455 | { |
2456 | name: "SLR - Solarcoin", | ||
2457 | onSelect: function() { | ||
2458 | network = bitcoinjs.bitcoin.networks.solarcoin; | ||
2459 | setHdCoin(58); | ||
2460 | }, | ||
2461 | }, | ||
2462 | { | ||
2463 | name: "SMLY - Smileycoin", | ||
2464 | onSelect: function() { | ||
2465 | network = bitcoinjs.bitcoin.networks.smileycoin; | ||
2466 | setHdCoin(59); | ||
2467 | }, | ||
2468 | }, | ||
2469 | { | ||
2470 | name: "STASH - Stash", | ||
2471 | onSelect: function() { | ||
2472 | network = bitcoinjs.bitcoin.networks.stash; | ||
2473 | setHdCoin(0xC0C0); | ||
2474 | }, | ||
2475 | }, | ||
2476 | { | ||
2477 | name: "STASH - Stash Testnet", | ||
2478 | onSelect: function() { | ||
2479 | network = bitcoinjs.bitcoin.networks.stashtn; | ||
2480 | setHdCoin(0xCAFE); | ||
2481 | }, | ||
2482 | }, | ||
2483 | { | ||
2484 | name: "STRAT - Stratis", | ||
2485 | onSelect: function() { | ||
2486 | network = bitcoinjs.bitcoin.networks.stratis; | ||
2487 | setHdCoin(105); | ||
2488 | }, | ||
2489 | }, | ||
2490 | { | ||
2491 | name: "TSTRAT - Stratis Testnet", | ||
2492 | onSelect: function() { | ||
2493 | network = bitcoinjs.bitcoin.networks.stratistest; | ||
2494 | setHdCoin(105); | ||
2495 | }, | ||
2496 | }, | ||
2497 | { | ||
2498 | name: "SYS - Syscoin", | ||
2499 | onSelect: function() { | ||
2500 | network = bitcoinjs.bitcoin.networks.syscoin; | ||
2501 | setHdCoin(57); | ||
2502 | }, | ||
2503 | }, | ||
2504 | { | ||
2505 | name: "THC - Hempcoin", | ||
2506 | onSelect: function() { | ||
2507 | network = bitcoinjs.bitcoin.networks.hempcoin; | ||
2508 | setHdCoin(113); | ||
2509 | }, | ||
2510 | }, | ||
2511 | { | ||
2512 | name: "TOA - Toa", | ||
2513 | onSelect: function() { | ||
2514 | network = bitcoinjs.bitcoin.networks.toa; | ||
2515 | setHdCoin(159); | ||
2516 | }, | ||
2517 | }, | ||
2518 | { | ||
2519 | name: "USC - Ultimatesecurecash", | ||
2520 | onSelect: function() { | ||
2521 | network = bitcoinjs.bitcoin.networks.ultimatesecurecash; | ||
2522 | setHdCoin(112); | ||
2523 | }, | ||
2524 | }, | ||
2525 | { | ||
1686 | name: "USNBT - NuBits", | 2526 | name: "USNBT - NuBits", |
1687 | segwitAvailable: false, | ||
1688 | onSelect: function() { | 2527 | onSelect: function() { |
1689 | network = bitcoinjs.bitcoin.networks.nubits; | 2528 | network = bitcoinjs.bitcoin.networks.nubits; |
1690 | setHdCoin(12); | 2529 | setHdCoin(12); |
1691 | }, | 2530 | }, |
1692 | }, | 2531 | }, |
1693 | { | 2532 | { |
2533 | name: "UNO - Unobtanium", | ||
2534 | onSelect: function() { | ||
2535 | network = bitcoinjs.bitcoin.networks.unobtanium; | ||
2536 | setHdCoin(92); | ||
2537 | }, | ||
2538 | }, | ||
2539 | { | ||
2540 | name: "VASH - Vpncoin", | ||
2541 | onSelect: function() { | ||
2542 | network = bitcoinjs.bitcoin.networks.vpncoin; | ||
2543 | setHdCoin(33); | ||
2544 | }, | ||
2545 | }, | ||
2546 | { | ||
1694 | name: "VIA - Viacoin", | 2547 | name: "VIA - Viacoin", |
1695 | segwitAvailable: false, | ||
1696 | onSelect: function() { | 2548 | onSelect: function() { |
1697 | network = bitcoinjs.bitcoin.networks.viacoin; | 2549 | network = bitcoinjs.bitcoin.networks.viacoin; |
1698 | setHdCoin(14); | 2550 | setHdCoin(14); |
@@ -1700,13 +2552,47 @@ | |||
1700 | }, | 2552 | }, |
1701 | { | 2553 | { |
1702 | name: "VIA - Viacoin Testnet", | 2554 | name: "VIA - Viacoin Testnet", |
1703 | segwitAvailable: false, | ||
1704 | onSelect: function() { | 2555 | onSelect: function() { |
1705 | network = bitcoinjs.bitcoin.networks.viacointestnet; | 2556 | network = bitcoinjs.bitcoin.networks.viacointestnet; |
1706 | setHdCoin(1); | 2557 | setHdCoin(1); |
1707 | }, | 2558 | }, |
1708 | }, | 2559 | }, |
1709 | { | 2560 | { |
2561 | name: "VIVO - Vivo", | ||
2562 | onSelect: function() { | ||
2563 | network = bitcoinjs.bitcoin.networks.vivo; | ||
2564 | setHdCoin(166); | ||
2565 | }, | ||
2566 | }, | ||
2567 | { | ||
2568 | name: "VTC - Vertcoin", | ||
2569 | onSelect: function() { | ||
2570 | network = bitcoinjs.bitcoin.networks.vertcoin; | ||
2571 | setHdCoin(28); | ||
2572 | }, | ||
2573 | }, | ||
2574 | { | ||
2575 | name: "WC - Wincoin", | ||
2576 | onSelect: function() { | ||
2577 | network = bitcoinjs.bitcoin.networks.wincoin; | ||
2578 | setHdCoin(181); | ||
2579 | }, | ||
2580 | }, | ||
2581 | { | ||
2582 | name: "XAX - Artax", | ||
2583 | onSelect: function() { | ||
2584 | network = bitcoinjs.bitcoin.networks.artax; | ||
2585 | setHdCoin(219); | ||
2586 | }, | ||
2587 | }, | ||
2588 | { | ||
2589 | name: "XBC - Bitcoinplus", | ||
2590 | onSelect: function() { | ||
2591 | network = bitcoinjs.bitcoin.networks.bitcoinplus; | ||
2592 | setHdCoin(65); | ||
2593 | }, | ||
2594 | }, | ||
2595 | { | ||
1710 | name: "XLM - Stellar", | 2596 | name: "XLM - Stellar", |
1711 | onSelect: function() { | 2597 | onSelect: function() { |
1712 | segwitAvailable: false, | 2598 | segwitAvailable: false, |
@@ -1716,7 +2602,6 @@ | |||
1716 | }, | 2602 | }, |
1717 | { | 2603 | { |
1718 | name: "XMY - Myriadcoin", | 2604 | name: "XMY - Myriadcoin", |
1719 | segwitAvailable: false, | ||
1720 | onSelect: function() { | 2605 | onSelect: function() { |
1721 | network = bitcoinjs.bitcoin.networks.myriadcoin; | 2606 | network = bitcoinjs.bitcoin.networks.myriadcoin; |
1722 | setHdCoin(90); | 2607 | setHdCoin(90); |
@@ -1724,12 +2609,68 @@ | |||
1724 | }, | 2609 | }, |
1725 | { | 2610 | { |
1726 | name: "XRP - Ripple", | 2611 | name: "XRP - Ripple", |
1727 | segwitAvailable: false, | ||
1728 | onSelect: function() { | 2612 | onSelect: function() { |
1729 | network = bitcoinjs.bitcoin.networks.bitcoin; | 2613 | network = bitcoinjs.bitcoin.networks.bitcoin; |
1730 | setHdCoin(144); | 2614 | setHdCoin(144); |
1731 | }, | 2615 | }, |
1732 | } | 2616 | }, |
2617 | { | ||
2618 | name: "XVC - Vcash", | ||
2619 | onSelect: function() { | ||
2620 | network = bitcoinjs.bitcoin.networks.vcash; | ||
2621 | setHdCoin(127); | ||
2622 | }, | ||
2623 | }, | ||
2624 | { | ||
2625 | name: "XVG - Verge", | ||
2626 | onSelect: function() { | ||
2627 | network = bitcoinjs.bitcoin.networks.verge; | ||
2628 | setHdCoin(77); | ||
2629 | }, | ||
2630 | }, | ||
2631 | { | ||
2632 | name: "XUEZ - Xuez", | ||
2633 | segwitAvailable: false, | ||
2634 | onSelect: function() { | ||
2635 | network = bitcoinjs.bitcoin.networks.xuez; | ||
2636 | setHdCoin(225); | ||
2637 | }, | ||
2638 | }, | ||
2639 | { | ||
2640 | name: "XWC - Whitecoin", | ||
2641 | onSelect: function() { | ||
2642 | network = bitcoinjs.bitcoin.networks.whitecoin; | ||
2643 | setHdCoin(155); | ||
2644 | }, | ||
2645 | }, | ||
2646 | { | ||
2647 | name: "XZC - Zcoin", | ||
2648 | onSelect: function() { | ||
2649 | network = bitcoinjs.bitcoin.networks.zcoin; | ||
2650 | setHdCoin(136); | ||
2651 | }, | ||
2652 | }, | ||
2653 | { | ||
2654 | name: "ZCL - Zclassic", | ||
2655 | onSelect: function() { | ||
2656 | network = bitcoinjs.bitcoin.networks.zclassic; | ||
2657 | setHdCoin(147); | ||
2658 | }, | ||
2659 | }, | ||
2660 | { | ||
2661 | name: "ZEC - Zcash", | ||
2662 | onSelect: function() { | ||
2663 | network = bitcoinjs.bitcoin.networks.zcash; | ||
2664 | setHdCoin(133); | ||
2665 | }, | ||
2666 | }, | ||
2667 | { | ||
2668 | name: "ZEN - Zencash", | ||
2669 | onSelect: function() { | ||
2670 | network = bitcoinjs.bitcoin.networks.zencash; | ||
2671 | setHdCoin(121); | ||
2672 | }, | ||
2673 | }, | ||
1733 | ] | 2674 | ] |
1734 | 2675 | ||
1735 | var clients = [ | 2676 | var clients = [ |
@@ -1753,6 +2694,13 @@ | |||
1753 | DOM.bip32path.val("m/0'/0"); | 2694 | DOM.bip32path.val("m/0'/0"); |
1754 | DOM.hardenedAddresses.prop('checked', false); | 2695 | DOM.hardenedAddresses.prop('checked', false); |
1755 | }, | 2696 | }, |
2697 | }, | ||
2698 | { | ||
2699 | name: "Coinomi, Ledger", | ||
2700 | onSelect: function() { | ||
2701 | DOM.bip32path.val("m/44'/"+DOM.bip44coin.val()+"'/0'"); | ||
2702 | DOM.hardenedAddresses.prop('checked', false); | ||
2703 | }, | ||
1756 | } | 2704 | } |
1757 | ] | 2705 | ] |
1758 | 2706 | ||