diff options
Diffstat (limited to 'src/js/index.js')
-rw-r--r-- | src/js/index.js | 454 |
1 files changed, 448 insertions, 6 deletions
diff --git a/src/js/index.js b/src/js/index.js index b5d2366..f3302a6 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -488,9 +488,16 @@ | |||
488 | function calcBip32RootKeyFromSeed(phrase, passphrase) { | 488 | function calcBip32RootKeyFromSeed(phrase, passphrase) { |
489 | seed = mnemonic.toSeed(phrase, passphrase); | 489 | seed = mnemonic.toSeed(phrase, passphrase); |
490 | bip32RootKey = bitcoinjs.bitcoin.HDNode.fromSeedHex(seed, network); | 490 | bip32RootKey = bitcoinjs.bitcoin.HDNode.fromSeedHex(seed, network); |
491 | if(isGRS()) | ||
492 | bip32RootKey = groestlcoinjs.HDNode.fromSeedHex(seed, network); | ||
493 | |||
491 | } | 494 | } |
492 | 495 | ||
493 | function calcBip32RootKeyFromBase58(rootKeyBase58) { | 496 | function calcBip32RootKeyFromBase58(rootKeyBase58) { |
497 | if(isGRS()) { | ||
498 | calcBip32RootKeyFromBase58GRS(rootKeyBase58); | ||
499 | return; | ||
500 | } | ||
494 | // try parsing with various segwit network params since this extended | 501 | // try parsing with various segwit network params since this extended |
495 | // key may be from any one of them. | 502 | // key may be from any one of them. |
496 | if (networkHasSegwit()) { | 503 | if (networkHasSegwit()) { |
@@ -525,6 +532,41 @@ | |||
525 | bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); | 532 | bip32RootKey = bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); |
526 | } | 533 | } |
527 | 534 | ||
535 | function calcBip32RootKeyFromBase58GRS(rootKeyBase58) { | ||
536 | // try parsing with various segwit network params since this extended | ||
537 | // key may be from any one of them. | ||
538 | if (networkHasSegwit()) { | ||
539 | var n = network; | ||
540 | if ("baseNetwork" in n) { | ||
541 | n = bitcoinjs.bitcoin.networks[n.baseNetwork]; | ||
542 | } | ||
543 | // try parsing using base network params | ||
544 | try { | ||
545 | bip32RootKey = groestlcoinjs.HDNode.fromBase58(rootKeyBase58, n); | ||
546 | return; | ||
547 | } | ||
548 | catch (e) {} | ||
549 | // try parsing using p2wpkh params | ||
550 | if ("p2wpkh" in n) { | ||
551 | try { | ||
552 | bip32RootKey = groestlcoinjs.HDNode.fromBase58(rootKeyBase58, n.p2wpkh); | ||
553 | return; | ||
554 | } | ||
555 | catch (e) {} | ||
556 | } | ||
557 | // try parsing using p2wpkh-in-p2sh network params | ||
558 | if ("p2wpkhInP2sh" in n) { | ||
559 | try { | ||
560 | bip32RootKey = groestlcoinjs.HDNode.fromBase58(rootKeyBase58, n.p2wpkhInP2sh); | ||
561 | return; | ||
562 | } | ||
563 | catch (e) {} | ||
564 | } | ||
565 | } | ||
566 | // try the network params as currently specified | ||
567 | bip32RootKey = groestlcoinjs.HDNode.fromBase58(rootKeyBase58, network); | ||
568 | } | ||
569 | |||
528 | function calcBip32ExtendedKey(path) { | 570 | function calcBip32ExtendedKey(path) { |
529 | // Check there's a root key to derive from | 571 | // Check there's a root key to derive from |
530 | if (!bip32RootKey) { | 572 | if (!bip32RootKey) { |
@@ -595,6 +637,9 @@ | |||
595 | } | 637 | } |
596 | 638 | ||
597 | function validateRootKey(rootKeyBase58) { | 639 | function validateRootKey(rootKeyBase58) { |
640 | if(isGRS()) | ||
641 | return validateRootKeyGRS(rootKeyBase58); | ||
642 | |||
598 | // try various segwit network params since this extended key may be from | 643 | // try various segwit network params since this extended key may be from |
599 | // any one of them. | 644 | // any one of them. |
600 | if (networkHasSegwit()) { | 645 | if (networkHasSegwit()) { |
@@ -635,6 +680,47 @@ | |||
635 | return ""; | 680 | return ""; |
636 | } | 681 | } |
637 | 682 | ||
683 | function validateRootKeyGRS(rootKeyBase58) { | ||
684 | // try various segwit network params since this extended key may be from | ||
685 | // any one of them. | ||
686 | if (networkHasSegwit()) { | ||
687 | var n = network; | ||
688 | if ("baseNetwork" in n) { | ||
689 | n = bitcoinjs.bitcoin.networks[n.baseNetwork]; | ||
690 | } | ||
691 | // try parsing using base network params | ||
692 | try { | ||
693 | groestlcoinjs.HDNode.fromBase58(rootKeyBase58, n); | ||
694 | return ""; | ||
695 | } | ||
696 | catch (e) {} | ||
697 | // try parsing using p2wpkh params | ||
698 | if ("p2wpkh" in n) { | ||
699 | try { | ||
700 | groestlcoinjs.HDNode.fromBase58(rootKeyBase58, n.p2wpkh); | ||
701 | return ""; | ||
702 | } | ||
703 | catch (e) {} | ||
704 | } | ||
705 | // try parsing using p2wpkh-in-p2sh network params | ||
706 | if ("p2wpkhInP2sh" in n) { | ||
707 | try { | ||
708 | groestlcoinjs.HDNode.fromBase58(rootKeyBase58, n.p2wpkhInP2sh); | ||
709 | return ""; | ||
710 | } | ||
711 | catch (e) {} | ||
712 | } | ||
713 | } | ||
714 | // try the network params as currently specified | ||
715 | try { | ||
716 | groestlcoinjs.HDNode.fromBase58(rootKeyBase58, network); | ||
717 | } | ||
718 | catch (e) { | ||
719 | return "Invalid root key"; | ||
720 | } | ||
721 | return ""; | ||
722 | } | ||
723 | |||
638 | function getDerivationPath() { | 724 | function getDerivationPath() { |
639 | if (bip44TabSelected()) { | 725 | if (bip44TabSelected()) { |
640 | var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44); | 726 | var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44); |
@@ -745,6 +831,10 @@ | |||
745 | return false; | 831 | return false; |
746 | } | 832 | } |
747 | 833 | ||
834 | function isGRS() { | ||
835 | return networks[DOM.network.val()].name == "GRS - Groestlcoin" || networks[DOM.network.val()].name == "GRS - Groestlcoin Testnet"; | ||
836 | } | ||
837 | |||
748 | function displayBip44Info() { | 838 | function displayBip44Info() { |
749 | // Get the derivation path for the account | 839 | // Get the derivation path for the account |
750 | var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44); | 840 | var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44); |
@@ -888,6 +978,9 @@ | |||
888 | var useUncompressed = useBip38; | 978 | var useUncompressed = useBip38; |
889 | if (useUncompressed) { | 979 | if (useUncompressed) { |
890 | keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false }); | 980 | keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false }); |
981 | if(isGRS()) | ||
982 | keyPair = new groestlcoinjs.ECPair(keyPair.d, null, { network: network, compressed: false }); | ||
983 | |||
891 | } | 984 | } |
892 | // get address | 985 | // get address |
893 | var address = keyPair.getAddress().toString(); | 986 | var address = keyPair.getAddress().toString(); |
@@ -898,9 +991,14 @@ | |||
898 | privkey = keyPair.toWIF(); | 991 | privkey = keyPair.toWIF(); |
899 | // BIP38 encode private key if required | 992 | // BIP38 encode private key if required |
900 | if (useBip38) { | 993 | if (useBip38) { |
901 | privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { | 994 | if(isGRS()) |
902 | console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index); | 995 | privkey = groestlcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { |
903 | }); | 996 | console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index); |
997 | }, null, networks[DOM.network.val()].name.includes("Testnet")); | ||
998 | else | ||
999 | privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { | ||
1000 | console.log("Progressed " + p.percent.toFixed(1) + "% for index " + index); | ||
1001 | }); | ||
904 | } | 1002 | } |
905 | } | 1003 | } |
906 | // get pubkey | 1004 | // get pubkey |
@@ -917,7 +1015,12 @@ | |||
917 | || (networks[DOM.network.val()].name == "MUSIC - Musicoin") | 1015 | || (networks[DOM.network.val()].name == "MUSIC - Musicoin") |
918 | || (networks[DOM.network.val()].name == "POA - Poa") | 1016 | || (networks[DOM.network.val()].name == "POA - Poa") |
919 | || (networks[DOM.network.val()].name == "EXP - Expanse") | 1017 | || (networks[DOM.network.val()].name == "EXP - Expanse") |
920 | || (networks[DOM.network.val()].name == "CLO - Callisto")) { | 1018 | || (networks[DOM.network.val()].name == "CLO - Callisto") |
1019 | || (networks[DOM.network.val()].name == "DXN - DEXON") | ||
1020 | || (networks[DOM.network.val()].name == "ELLA - Ellaism") | ||
1021 | || (networks[DOM.network.val()].name == "ESN - Ethersocial Network") | ||
1022 | || (networks[DOM.network.val()].name == "VET - VeChain") | ||
1023 | ) { | ||
921 | var privKeyBuffer = keyPair.d.toBuffer(32); | 1024 | var privKeyBuffer = keyPair.d.toBuffer(32); |
922 | privkey = privKeyBuffer.toString('hex'); | 1025 | privkey = privKeyBuffer.toString('hex'); |
923 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); | 1026 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); |
@@ -927,11 +1030,38 @@ | |||
927 | privkey = ethUtil.addHexPrefix(privkey); | 1030 | privkey = ethUtil.addHexPrefix(privkey); |
928 | pubkey = ethUtil.addHexPrefix(pubkey); | 1031 | pubkey = ethUtil.addHexPrefix(pubkey); |
929 | } | 1032 | } |
1033 | |||
1034 | // Stellar is different | ||
1035 | if (networks[DOM.network.val()].name == "XLM - Stellar") { | ||
1036 | var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44); | ||
1037 | var coin = parseIntNoNaN(DOM.bip44coin.val(), 0); | ||
1038 | var path = "m/"; | ||
1039 | path += purpose + "'/"; | ||
1040 | path += coin + "'/" + index + "'"; | ||
1041 | var keypair = stellarUtil.getKeypair(path, seed); | ||
1042 | indexText = path; | ||
1043 | privkey = keypair.secret(); | ||
1044 | pubkey = address = keypair.publicKey(); | ||
1045 | } | ||
1046 | if ((networks[DOM.network.val()].name == "NAS - Nebulas")) { | ||
1047 | var NasAccount = require("nebulas-account"); | ||
1048 | var privKeyBuffer = keyPair.d.toBuffer(32); | ||
1049 | var nebulasAccount = new NasAccount(); | ||
1050 | nebulasAccount.setPrivateKey(privKeyBuffer); | ||
1051 | address = nebulasAccount.getAddressString(); | ||
1052 | privkey = nebulasAccount.getPrivateKeyString(); | ||
1053 | pubkey = nebulasAccount.getPublicKeyString(); | ||
1054 | } | ||
930 | // Ripple values are different | 1055 | // Ripple values are different |
931 | if (networks[DOM.network.val()].name == "XRP - Ripple") { | 1056 | if (networks[DOM.network.val()].name == "XRP - Ripple") { |
932 | privkey = convertRipplePriv(privkey); | 1057 | privkey = convertRipplePriv(privkey); |
933 | address = convertRippleAdrr(address); | 1058 | address = convertRippleAdrr(address); |
934 | } | 1059 | } |
1060 | // CasinoCoin values are different | ||
1061 | if (networks[DOM.network.val()].name == "CSC - CasinoCoin") { | ||
1062 | privkey = convertCasinoCoinPriv(privkey); | ||
1063 | address = convertCasinoCoinAdrr(address); | ||
1064 | } | ||
935 | // Bitcoin Cash address format may vary | 1065 | // Bitcoin Cash address format may vary |
936 | if (networks[DOM.network.val()].name == "BCH - Bitcoin Cash") { | 1066 | if (networks[DOM.network.val()].name == "BCH - Bitcoin Cash") { |
937 | var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val(); | 1067 | var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val(); |
@@ -942,6 +1072,13 @@ | |||
942 | address = bchaddr.toBitpayAddress(address); | 1072 | address = bchaddr.toBitpayAddress(address); |
943 | } | 1073 | } |
944 | } | 1074 | } |
1075 | // Bitcoin Cash address format may vary | ||
1076 | if (networks[DOM.network.val()].name == "SLP - Simple Ledger Protocol") { | ||
1077 | var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val(); | ||
1078 | if (bchAddrType == "cashaddr") { | ||
1079 | address = bchaddr.toSlpAddress(address); | ||
1080 | } | ||
1081 | } | ||
945 | // Segwit addresses are different | 1082 | // Segwit addresses are different |
946 | if (isSegwit) { | 1083 | if (isSegwit) { |
947 | if (!segwitAvailable) { | 1084 | if (!segwitAvailable) { |
@@ -960,6 +1097,34 @@ | |||
960 | address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network) | 1097 | address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network) |
961 | } | 1098 | } |
962 | } | 1099 | } |
1100 | |||
1101 | if ((networks[DOM.network.val()].name == "CRW - Crown")) { | ||
1102 | address = bitcoinjs.bitcoin.networks.crown.toNewAddress(address); | ||
1103 | } | ||
1104 | |||
1105 | if (networks[DOM.network.val()].name == "EOS - EOSIO") { | ||
1106 | address = "" | ||
1107 | pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); | ||
1108 | privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); | ||
1109 | } | ||
1110 | |||
1111 | //Groestlcoin Addresses are different | ||
1112 | if(isGRS()) { | ||
1113 | |||
1114 | if (isSegwit) { | ||
1115 | if (!segwitAvailable) { | ||
1116 | return; | ||
1117 | } | ||
1118 | if (isP2wpkh) { | ||
1119 | address = groestlcoinjs.address.fromOutputScript(scriptpubkey, network) | ||
1120 | } | ||
1121 | else if (isP2wpkhInP2sh) { | ||
1122 | address = groestlcoinjs.address.fromOutputScript(scriptpubkey, network) | ||
1123 | } | ||
1124 | } | ||
1125 | //non-segwit addresses are handled by using groestlcoinjs for bip32RootKey | ||
1126 | } | ||
1127 | |||
963 | addAddressToList(indexText, address, pubkey, privkey); | 1128 | addAddressToList(indexText, address, pubkey, privkey); |
964 | if (isLast) { | 1129 | if (isLast) { |
965 | hidePending(); | 1130 | hidePending(); |
@@ -1647,6 +1812,13 @@ | |||
1647 | }, | 1812 | }, |
1648 | }, | 1813 | }, |
1649 | { | 1814 | { |
1815 | name: "ARYA - Aryacoin", | ||
1816 | onSelect: function() { | ||
1817 | network = bitcoinjs.bitcoin.networks.aryacoin; | ||
1818 | setHdCoin(357); | ||
1819 | }, | ||
1820 | }, | ||
1821 | { | ||
1650 | name: "AUR - Auroracoin", | 1822 | name: "AUR - Auroracoin", |
1651 | onSelect: function() { | 1823 | onSelect: function() { |
1652 | network = bitcoinjs.bitcoin.networks.auroracoin; | 1824 | network = bitcoinjs.bitcoin.networks.auroracoin; |
@@ -1659,6 +1831,20 @@ | |||
1659 | network = bitcoinjs.bitcoin.networks.axe; | 1831 | network = bitcoinjs.bitcoin.networks.axe; |
1660 | setHdCoin(4242); | 1832 | setHdCoin(4242); |
1661 | }, | 1833 | }, |
1834 | }, | ||
1835 | { | ||
1836 | name: "ANON - ANON", | ||
1837 | onSelect: function() { | ||
1838 | network = bitcoinjs.bitcoin.networks.anon; | ||
1839 | setHdCoin(220); | ||
1840 | }, | ||
1841 | }, | ||
1842 | { | ||
1843 | name: "BOLI - Bolivarcoin", | ||
1844 | onSelect: function() { | ||
1845 | network = bitcoinjs.bitcoin.networks.bolivarcoin; | ||
1846 | setHdCoin(278); | ||
1847 | }, | ||
1662 | }, | 1848 | }, |
1663 | { | 1849 | { |
1664 | name: "BCA - Bitcoin Atom", | 1850 | name: "BCA - Bitcoin Atom", |
@@ -1696,6 +1882,20 @@ | |||
1696 | }, | 1882 | }, |
1697 | }, | 1883 | }, |
1698 | { | 1884 | { |
1885 | name: "BND - Blocknode", | ||
1886 | onSelect: function() { | ||
1887 | network = bitcoinjs.bitcoin.networks.blocknode; | ||
1888 | setHdCoin(2941); | ||
1889 | }, | ||
1890 | }, | ||
1891 | { | ||
1892 | name: "tBND - Blocknode Testnet", | ||
1893 | onSelect: function() { | ||
1894 | network = bitcoinjs.bitcoin.networks.blocknode_testnet; | ||
1895 | setHdCoin(1); | ||
1896 | }, | ||
1897 | }, | ||
1898 | { | ||
1699 | name: "BRIT - Britcoin", | 1899 | name: "BRIT - Britcoin", |
1700 | onSelect: function() { | 1900 | onSelect: function() { |
1701 | network = bitcoinjs.bitcoin.networks.britcoin; | 1901 | network = bitcoinjs.bitcoin.networks.britcoin; |
@@ -1709,6 +1909,13 @@ | |||
1709 | setHdCoin(91); | 1909 | setHdCoin(91); |
1710 | }, | 1910 | }, |
1711 | }, | 1911 | }, |
1912 | { | ||
1913 | name: "BST - BlockStamp", | ||
1914 | onSelect: function() { | ||
1915 | network = bitcoinjs.bitcoin.networks.blockstamp; | ||
1916 | setHdCoin(254); | ||
1917 | }, | ||
1918 | }, | ||
1712 | { | 1919 | { |
1713 | name: "BTA - Bata", | 1920 | name: "BTA - Bata", |
1714 | onSelect: function() { | 1921 | onSelect: function() { |
@@ -1730,6 +1937,13 @@ | |||
1730 | setHdCoin(1); | 1937 | setHdCoin(1); |
1731 | }, | 1938 | }, |
1732 | }, | 1939 | }, |
1940 | { | ||
1941 | name: "BITG - Bitcoin Green", | ||
1942 | onSelect: function() { | ||
1943 | network = bitcoinjs.bitcoin.networks.bitcoingreen; | ||
1944 | setHdCoin(222); | ||
1945 | }, | ||
1946 | }, | ||
1733 | { | 1947 | { |
1734 | name: "BTCP - Bitcoin Private", | 1948 | name: "BTCP - Bitcoin Private", |
1735 | onSelect: function() { | 1949 | onSelect: function() { |
@@ -1738,6 +1952,13 @@ | |||
1738 | }, | 1952 | }, |
1739 | }, | 1953 | }, |
1740 | { | 1954 | { |
1955 | name: "BSV - BitcoinSV", | ||
1956 | onSelect: function() { | ||
1957 | network = bitcoinjs.bitcoin.networks.bitcoinsv; | ||
1958 | setHdCoin(236); | ||
1959 | }, | ||
1960 | }, | ||
1961 | { | ||
1741 | name: "BTCZ - Bitcoinz", | 1962 | name: "BTCZ - Bitcoinz", |
1742 | onSelect: function() { | 1963 | onSelect: function() { |
1743 | network = bitcoinjs.bitcoin.networks.bitcoinz; | 1964 | network = bitcoinjs.bitcoin.networks.bitcoinz; |
@@ -1816,6 +2037,13 @@ | |||
1816 | }, | 2037 | }, |
1817 | }, | 2038 | }, |
1818 | { | 2039 | { |
2040 | name: "CPU - CPUchain", | ||
2041 | onSelect: function() { | ||
2042 | network = bitcoinjs.bitcoin.networks.cpuchain; | ||
2043 | setHdCoin(363); | ||
2044 | }, | ||
2045 | }, | ||
2046 | { | ||
1819 | name: "CRAVE - Crave", | 2047 | name: "CRAVE - Crave", |
1820 | onSelect: function() { | 2048 | onSelect: function() { |
1821 | network = bitcoinjs.bitcoin.networks.crave; | 2049 | network = bitcoinjs.bitcoin.networks.crave; |
@@ -1823,6 +2051,13 @@ | |||
1823 | }, | 2051 | }, |
1824 | }, | 2052 | }, |
1825 | { | 2053 | { |
2054 | name: "CRW - Crown (Legacy)", | ||
2055 | onSelect: function() { | ||
2056 | network = bitcoinjs.bitcoin.networks.crown; | ||
2057 | setHdCoin(72); | ||
2058 | }, | ||
2059 | }, | ||
2060 | { | ||
1826 | name: "CRW - Crown", | 2061 | name: "CRW - Crown", |
1827 | onSelect: function() { | 2062 | onSelect: function() { |
1828 | network = bitcoinjs.bitcoin.networks.crown; | 2063 | network = bitcoinjs.bitcoin.networks.crown; |
@@ -1830,6 +2065,13 @@ | |||
1830 | }, | 2065 | }, |
1831 | }, | 2066 | }, |
1832 | { | 2067 | { |
2068 | name: "CSC - CasinoCoin", | ||
2069 | onSelect: function() { | ||
2070 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2071 | setHdCoin(359); | ||
2072 | }, | ||
2073 | }, | ||
2074 | { | ||
1833 | name: "DASH - Dash", | 2075 | name: "DASH - Dash", |
1834 | onSelect: function() { | 2076 | onSelect: function() { |
1835 | network = bitcoinjs.bitcoin.networks.dash; | 2077 | network = bitcoinjs.bitcoin.networks.dash; |
@@ -1886,6 +2128,20 @@ | |||
1886 | }, | 2128 | }, |
1887 | }, | 2129 | }, |
1888 | { | 2130 | { |
2131 | name: "DOGEt - Dogecoin Testnet", | ||
2132 | onSelect: function() { | ||
2133 | network = bitcoinjs.bitcoin.networks.dogecointestnet; | ||
2134 | setHdCoin(1); | ||
2135 | }, | ||
2136 | }, | ||
2137 | { | ||
2138 | name: "DXN - DEXON", | ||
2139 | onSelect: function() { | ||
2140 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2141 | setHdCoin(237); | ||
2142 | }, | ||
2143 | }, | ||
2144 | { | ||
1889 | name: "ECN - Ecoin", | 2145 | name: "ECN - Ecoin", |
1890 | onSelect: function() { | 2146 | onSelect: function() { |
1891 | network = bitcoinjs.bitcoin.networks.ecoin; | 2147 | network = bitcoinjs.bitcoin.networks.ecoin; |
@@ -1907,6 +2163,14 @@ | |||
1907 | }, | 2163 | }, |
1908 | }, | 2164 | }, |
1909 | { | 2165 | { |
2166 | name: "ELLA - Ellaism", | ||
2167 | segwitAvailable: false, | ||
2168 | onSelect: function() { | ||
2169 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2170 | setHdCoin(163); | ||
2171 | }, | ||
2172 | }, | ||
2173 | { | ||
1910 | name: "EMC2 - Einsteinium", | 2174 | name: "EMC2 - Einsteinium", |
1911 | onSelect: function() { | 2175 | onSelect: function() { |
1912 | network = bitcoinjs.bitcoin.networks.einsteinium; | 2176 | network = bitcoinjs.bitcoin.networks.einsteinium; |
@@ -1921,6 +2185,21 @@ | |||
1921 | }, | 2185 | }, |
1922 | }, | 2186 | }, |
1923 | { | 2187 | { |
2188 | name: "EOS - EOSIO", | ||
2189 | onSelect: function() { | ||
2190 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2191 | setHdCoin(194); | ||
2192 | }, | ||
2193 | }, | ||
2194 | { | ||
2195 | name: "ESN - Ethersocial Network", | ||
2196 | segwitAvailable: false, | ||
2197 | onSelect: function() { | ||
2198 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2199 | setHdCoin(31102); | ||
2200 | }, | ||
2201 | }, | ||
2202 | { | ||
1924 | name: "ETC - Ethereum Classic", | 2203 | name: "ETC - Ethereum Classic", |
1925 | segwitAvailable: false, | 2204 | segwitAvailable: false, |
1926 | onSelect: function() { | 2205 | onSelect: function() { |
@@ -1958,6 +2237,20 @@ | |||
1958 | }, | 2237 | }, |
1959 | }, | 2238 | }, |
1960 | { | 2239 | { |
2240 | name: "FIX - FIX", | ||
2241 | onSelect: function() { | ||
2242 | network = bitcoinjs.bitcoin.networks.fix; | ||
2243 | setHdCoin(336); | ||
2244 | }, | ||
2245 | }, | ||
2246 | { | ||
2247 | name: "FIX - FIX Testnet", | ||
2248 | onSelect: function() { | ||
2249 | network = bitcoinjs.bitcoin.networks.fixtestnet; | ||
2250 | setHdCoin(1); | ||
2251 | }, | ||
2252 | }, | ||
2253 | { | ||
1961 | name: "FJC - Fujicoin", | 2254 | name: "FJC - Fujicoin", |
1962 | onSelect: function() { | 2255 | onSelect: function() { |
1963 | network = bitcoinjs.bitcoin.networks.fujicoin; | 2256 | network = bitcoinjs.bitcoin.networks.fujicoin; |
@@ -2014,6 +2307,20 @@ | |||
2014 | }, | 2307 | }, |
2015 | }, | 2308 | }, |
2016 | { | 2309 | { |
2310 | name: "GRS - Groestlcoin", | ||
2311 | onSelect: function() { | ||
2312 | network = bitcoinjs.bitcoin.networks.groestlcoin; | ||
2313 | setHdCoin(17); | ||
2314 | }, | ||
2315 | }, | ||
2316 | { | ||
2317 | name: "GRS - Groestlcoin Testnet", | ||
2318 | onSelect: function() { | ||
2319 | network = bitcoinjs.bitcoin.networks.groestlcointestnet; | ||
2320 | setHdCoin(1); | ||
2321 | }, | ||
2322 | }, | ||
2323 | { | ||
2017 | name: "HNC - Helleniccoin", | 2324 | name: "HNC - Helleniccoin", |
2018 | onSelect: function() { | 2325 | onSelect: function() { |
2019 | network = bitcoinjs.bitcoin.networks.helleniccoin; | 2326 | network = bitcoinjs.bitcoin.networks.helleniccoin; |
@@ -2021,12 +2328,19 @@ | |||
2021 | }, | 2328 | }, |
2022 | }, | 2329 | }, |
2023 | { | 2330 | { |
2024 | name: "HUSH - Hush", | 2331 | name: "HUSH - Hush (Legacy)", |
2025 | onSelect: function() { | 2332 | onSelect: function() { |
2026 | network = bitcoinjs.bitcoin.networks.hush; | 2333 | network = bitcoinjs.bitcoin.networks.hush; |
2027 | setHdCoin(197); | 2334 | setHdCoin(197); |
2028 | }, | 2335 | }, |
2029 | }, | 2336 | }, |
2337 | { | ||
2338 | name: "HUSH - Hush3", | ||
2339 | onSelect: function() { | ||
2340 | network = bitcoinjs.bitcoin.networks.hush3; | ||
2341 | setHdCoin(197); | ||
2342 | }, | ||
2343 | }, | ||
2030 | { | 2344 | { |
2031 | name: "INSN - Insane", | 2345 | name: "INSN - Insane", |
2032 | onSelect: function() { | 2346 | onSelect: function() { |
@@ -2100,6 +2414,14 @@ | |||
2100 | }, | 2414 | }, |
2101 | }, | 2415 | }, |
2102 | { | 2416 | { |
2417 | name: "LKR - Lkrcoin", | ||
2418 | segwitAvailable: false, | ||
2419 | onSelect: function() { | ||
2420 | network = bitcoinjs.bitcoin.networks.lkrcoin; | ||
2421 | setHdCoin(557); | ||
2422 | }, | ||
2423 | }, | ||
2424 | { | ||
2103 | name: "LTC - Litecoin", | 2425 | name: "LTC - Litecoin", |
2104 | onSelect: function() { | 2426 | onSelect: function() { |
2105 | network = bitcoinjs.bitcoin.networks.litecoin; | 2427 | network = bitcoinjs.bitcoin.networks.litecoin; |
@@ -2108,6 +2430,21 @@ | |||
2108 | }, | 2430 | }, |
2109 | }, | 2431 | }, |
2110 | { | 2432 | { |
2433 | name: "LTCt - Litecoin Testnet", | ||
2434 | onSelect: function() { | ||
2435 | network = bitcoinjs.bitcoin.networks.litecointestnet; | ||
2436 | setHdCoin(1); | ||
2437 | DOM.litecoinLtubContainer.removeClass("hidden"); | ||
2438 | }, | ||
2439 | }, | ||
2440 | { | ||
2441 | name: "LTZ - LitecoinZ", | ||
2442 | onSelect: function() { | ||
2443 | network = bitcoinjs.bitcoin.networks.litecoinz; | ||
2444 | setHdCoin(221); | ||
2445 | }, | ||
2446 | }, | ||
2447 | { | ||
2111 | name: "LYNX - Lynx", | 2448 | name: "LYNX - Lynx", |
2112 | onSelect: function() { | 2449 | onSelect: function() { |
2113 | network = bitcoinjs.bitcoin.networks.lynx; | 2450 | network = bitcoinjs.bitcoin.networks.lynx; |
@@ -2151,6 +2488,13 @@ | |||
2151 | }, | 2488 | }, |
2152 | }, | 2489 | }, |
2153 | { | 2490 | { |
2491 | name: "MONK - Monkey Project", | ||
2492 | onSelect: function() { | ||
2493 | network = bitcoinjs.bitcoin.networks.monkeyproject, | ||
2494 | setHdCoin(214); | ||
2495 | }, | ||
2496 | }, | ||
2497 | { | ||
2154 | name: "MUSIC - Musicoin", | 2498 | name: "MUSIC - Musicoin", |
2155 | segwitAvailable: false, | 2499 | segwitAvailable: false, |
2156 | onSelect: function() { | 2500 | onSelect: function() { |
@@ -2166,6 +2510,13 @@ | |||
2166 | }, | 2510 | }, |
2167 | }, | 2511 | }, |
2168 | { | 2512 | { |
2513 | name: "NAS - Nebulas", | ||
2514 | onSelect: function() { | ||
2515 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2516 | setHdCoin(2718); | ||
2517 | }, | ||
2518 | }, | ||
2519 | { | ||
2169 | name: "NEBL - Neblio", | 2520 | name: "NEBL - Neblio", |
2170 | onSelect: function() { | 2521 | onSelect: function() { |
2171 | network = bitcoinjs.bitcoin.networks.neblio; | 2522 | network = bitcoinjs.bitcoin.networks.neblio; |
@@ -2180,6 +2531,13 @@ | |||
2180 | }, | 2531 | }, |
2181 | }, | 2532 | }, |
2182 | { | 2533 | { |
2534 | name: "NIX - NIX Platform", | ||
2535 | onSelect: function() { | ||
2536 | network = bitcoinjs.bitcoin.networks.nix; | ||
2537 | setHdCoin(400); | ||
2538 | }, | ||
2539 | }, | ||
2540 | { | ||
2183 | name: "NLG - Gulden", | 2541 | name: "NLG - Gulden", |
2184 | onSelect: function() { | 2542 | onSelect: function() { |
2185 | network = bitcoinjs.bitcoin.networks.gulden; | 2543 | network = bitcoinjs.bitcoin.networks.gulden; |
@@ -2243,12 +2601,26 @@ | |||
2243 | }, | 2601 | }, |
2244 | }, | 2602 | }, |
2245 | { | 2603 | { |
2604 | name: "ONION - DeepOnion", | ||
2605 | onSelect: function() { | ||
2606 | network = bitcoinjs.bitcoin.networks.deeponion; | ||
2607 | setHdCoin(305); | ||
2608 | }, | ||
2609 | }, | ||
2610 | { | ||
2246 | name: "ONX - Onixcoin", | 2611 | name: "ONX - Onixcoin", |
2247 | onSelect: function() { | 2612 | onSelect: function() { |
2248 | network = bitcoinjs.bitcoin.networks.onixcoin; | 2613 | network = bitcoinjs.bitcoin.networks.onixcoin; |
2249 | setHdCoin(174); | 2614 | setHdCoin(174); |
2250 | }, | 2615 | }, |
2251 | }, | 2616 | }, |
2617 | { | ||
2618 | name: "PHR - Phore", | ||
2619 | onSelect: function() { | ||
2620 | network = bitcoinjs.bitcoin.networks.phore; | ||
2621 | setHdCoin(444); | ||
2622 | }, | ||
2623 | }, | ||
2252 | { | 2624 | { |
2253 | name: "PINK - Pinkcoin", | 2625 | name: "PINK - Pinkcoin", |
2254 | onSelect: function() { | 2626 | onSelect: function() { |
@@ -2307,6 +2679,13 @@ | |||
2307 | setHdCoin(6); | 2679 | setHdCoin(6); |
2308 | }, | 2680 | }, |
2309 | }, | 2681 | }, |
2682 | { | ||
2683 | name: "PRJ - ProjectCoin", | ||
2684 | onSelect: function() { | ||
2685 | network = bitcoinjs.bitcoin.networks.projectcoin; | ||
2686 | setHdCoin(533); | ||
2687 | }, | ||
2688 | }, | ||
2310 | { | 2689 | { |
2311 | name: "PSB - Pesobit", | 2690 | name: "PSB - Pesobit", |
2312 | onSelect: function() { | 2691 | onSelect: function() { |
@@ -2322,6 +2701,20 @@ | |||
2322 | }, | 2701 | }, |
2323 | }, | 2702 | }, |
2324 | { | 2703 | { |
2704 | name: "RPD - Rapids", | ||
2705 | onSelect: function() { | ||
2706 | network = bitcoinjs.bitcoin.networks.rapids; | ||
2707 | setHdCoin(320); | ||
2708 | }, | ||
2709 | }, | ||
2710 | { | ||
2711 | name: "RVN - Ravencoin", | ||
2712 | onSelect: function() { | ||
2713 | network = bitcoinjs.bitcoin.networks.ravencoin; | ||
2714 | setHdCoin(175); | ||
2715 | }, | ||
2716 | }, | ||
2717 | { | ||
2325 | name: "RBY - Rubycoin", | 2718 | name: "RBY - Rubycoin", |
2326 | onSelect: function() { | 2719 | onSelect: function() { |
2327 | network = bitcoinjs.bitcoin.networks.rubycoin; | 2720 | network = bitcoinjs.bitcoin.networks.rubycoin; |
@@ -2343,6 +2736,13 @@ | |||
2343 | }, | 2736 | }, |
2344 | }, | 2737 | }, |
2345 | { | 2738 | { |
2739 | name: "SAFE - Safecoin", | ||
2740 | onSelect: function() { | ||
2741 | network = bitcoinjs.bitcoin.networks.safecoin; | ||
2742 | setHdCoin(19165); | ||
2743 | }, | ||
2744 | }, | ||
2745 | { | ||
2346 | name: "SLS - Salus", | 2746 | name: "SLS - Salus", |
2347 | onSelect: function() { | 2747 | onSelect: function() { |
2348 | network = bitcoinjs.bitcoin.networks.salus; | 2748 | network = bitcoinjs.bitcoin.networks.salus; |
@@ -2378,6 +2778,13 @@ | |||
2378 | }, | 2778 | }, |
2379 | }, | 2779 | }, |
2380 | { | 2780 | { |
2781 | name: "SLP - Simple Ledger Protocol", | ||
2782 | onSelect: function() { | ||
2783 | DOM.bitcoinCashAddressTypeContainer.removeClass("hidden"); | ||
2784 | setHdCoin(245); | ||
2785 | }, | ||
2786 | }, | ||
2787 | { | ||
2381 | name: "SLR - Solarcoin", | 2788 | name: "SLR - Solarcoin", |
2382 | onSelect: function() { | 2789 | onSelect: function() { |
2383 | network = bitcoinjs.bitcoin.networks.solarcoin; | 2790 | network = bitcoinjs.bitcoin.networks.solarcoin; |
@@ -2441,6 +2848,20 @@ | |||
2441 | }, | 2848 | }, |
2442 | }, | 2849 | }, |
2443 | { | 2850 | { |
2851 | name: "TWINS - TWINS", | ||
2852 | onSelect: function() { | ||
2853 | network = bitcoinjs.bitcoin.networks.twins; | ||
2854 | setHdCoin(970); | ||
2855 | }, | ||
2856 | }, | ||
2857 | { | ||
2858 | name: "TWINS - TWINS Testnet", | ||
2859 | onSelect: function() { | ||
2860 | network = bitcoinjs.bitcoin.networks.twinstestnet; | ||
2861 | setHdCoin(1); | ||
2862 | }, | ||
2863 | }, | ||
2864 | { | ||
2444 | name: "USC - Ultimatesecurecash", | 2865 | name: "USC - Ultimatesecurecash", |
2445 | onSelect: function() { | 2866 | onSelect: function() { |
2446 | network = bitcoinjs.bitcoin.networks.ultimatesecurecash; | 2867 | network = bitcoinjs.bitcoin.networks.ultimatesecurecash; |
@@ -2469,6 +2890,13 @@ | |||
2469 | }, | 2890 | }, |
2470 | }, | 2891 | }, |
2471 | { | 2892 | { |
2893 | name: "VET - VeChain", | ||
2894 | onSelect: function() { | ||
2895 | network = bitcoinjs.bitcoin.networks.bitcoin; | ||
2896 | setHdCoin(818); | ||
2897 | }, | ||
2898 | }, | ||
2899 | { | ||
2472 | name: "VIA - Viacoin", | 2900 | name: "VIA - Viacoin", |
2473 | onSelect: function() { | 2901 | onSelect: function() { |
2474 | network = bitcoinjs.bitcoin.networks.viacoin; | 2902 | network = bitcoinjs.bitcoin.networks.viacoin; |
@@ -2497,6 +2925,13 @@ | |||
2497 | }, | 2925 | }, |
2498 | }, | 2926 | }, |
2499 | { | 2927 | { |
2928 | name: "WGR - Wagerr", | ||
2929 | onSelect: function() { | ||
2930 | network = bitcoinjs.bitcoin.networks.wagerr; | ||
2931 | setHdCoin(7825266); | ||
2932 | }, | ||
2933 | }, | ||
2934 | { | ||
2500 | name: "WC - Wincoin", | 2935 | name: "WC - Wincoin", |
2501 | onSelect: function() { | 2936 | onSelect: function() { |
2502 | network = bitcoinjs.bitcoin.networks.wincoin; | 2937 | network = bitcoinjs.bitcoin.networks.wincoin; |
@@ -2518,6 +2953,13 @@ | |||
2518 | }, | 2953 | }, |
2519 | }, | 2954 | }, |
2520 | { | 2955 | { |
2956 | name: "XLM - Stellar", | ||
2957 | onSelect: function() { | ||
2958 | network = stellarUtil.dummyNetwork; | ||
2959 | setHdCoin(148); | ||
2960 | }, | ||
2961 | }, | ||
2962 | { | ||
2521 | name: "XMY - Myriadcoin", | 2963 | name: "XMY - Myriadcoin", |
2522 | onSelect: function() { | 2964 | onSelect: function() { |
2523 | network = bitcoinjs.bitcoin.networks.myriadcoin; | 2965 | network = bitcoinjs.bitcoin.networks.myriadcoin; |
@@ -2582,7 +3024,7 @@ | |||
2582 | }, | 3024 | }, |
2583 | }, | 3025 | }, |
2584 | { | 3026 | { |
2585 | name: "ZEN - Zencash", | 3027 | name: "ZEN - Horizen", |
2586 | onSelect: function() { | 3028 | onSelect: function() { |
2587 | network = bitcoinjs.bitcoin.networks.zencash; | 3029 | network = bitcoinjs.bitcoin.networks.zencash; |
2588 | setHdCoin(121); | 3030 | setHdCoin(121); |