diff options
-rw-r--r-- | bip39-standalone.html | 75 | ||||
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 10 | ||||
-rw-r--r-- | src/js/index.js | 65 | ||||
-rw-r--r-- | tests.js | 72 |
4 files changed, 143 insertions, 79 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index d3a8d33..a00cb68 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -19902,6 +19902,16 @@ bitcoin.networks.clam = { | |||
19902 | wif: 0x85, | 19902 | wif: 0x85, |
19903 | }; | 19903 | }; |
19904 | 19904 | ||
19905 | bitcoin.networks.crown = { | ||
19906 | bip32: { | ||
19907 | public: 0x0488b21e, | ||
19908 | private: 0x0488ade4 | ||
19909 | }, | ||
19910 | pubKeyHash: 0x00, | ||
19911 | scriptHash: 0x05, | ||
19912 | wif: 0x80, | ||
19913 | }; | ||
19914 | |||
19905 | bitcoin.networks.dash = { | 19915 | bitcoin.networks.dash = { |
19906 | bip32: { | 19916 | bip32: { |
19907 | public: 0x0488b21e, | 19917 | public: 0x0488b21e, |
@@ -44319,7 +44329,7 @@ window.Entropy = new (function() { | |||
44319 | indexText = indexText + "'"; | 44329 | indexText = indexText + "'"; |
44320 | } | 44330 | } |
44321 | // Ethereum values are different | 44331 | // Ethereum values are different |
44322 | if (networks[DOM.network.val()].name == "Ethereum") { | 44332 | if (networks[DOM.network.val()].name == "ETH - Ethereum") { |
44323 | var privKeyBuffer = key.privKey.d.toBuffer(); | 44333 | var privKeyBuffer = key.privKey.d.toBuffer(); |
44324 | privkey = privKeyBuffer.toString('hex'); | 44334 | privkey = privKeyBuffer.toString('hex'); |
44325 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); | 44335 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); |
@@ -44330,7 +44340,7 @@ window.Entropy = new (function() { | |||
44330 | pubkey = ethUtil.addHexPrefix(pubkey); | 44340 | pubkey = ethUtil.addHexPrefix(pubkey); |
44331 | } | 44341 | } |
44332 | // Ripple values are different | 44342 | // Ripple values are different |
44333 | if (networks[DOM.network.val()].name == "Ripple") { | 44343 | if (networks[DOM.network.val()].name == "XRP - Ripple") { |
44334 | privkey = convertRipplePriv(privkey); | 44344 | privkey = convertRipplePriv(privkey); |
44335 | address = convertRippleAdrr(address); | 44345 | address = convertRippleAdrr(address); |
44336 | } | 44346 | } |
@@ -44791,138 +44801,145 @@ window.Entropy = new (function() { | |||
44791 | 44801 | ||
44792 | var networks = [ | 44802 | var networks = [ |
44793 | { | 44803 | { |
44794 | name: "Bitcoin", | 44804 | name: "BTC - Bitcoin", |
44795 | onSelect: function() { | 44805 | onSelect: function() { |
44796 | network = bitcoin.networks.bitcoin; | 44806 | network = bitcoin.networks.bitcoin; |
44797 | DOM.bip44coin.val(0); | 44807 | DOM.bip44coin.val(0); |
44798 | }, | 44808 | }, |
44799 | }, | 44809 | }, |
44800 | { | 44810 | { |
44801 | name: "Bitcoin Testnet", | 44811 | name: "BTC - Bitcoin Testnet", |
44802 | onSelect: function() { | 44812 | onSelect: function() { |
44803 | network = bitcoin.networks.testnet; | 44813 | network = bitcoin.networks.testnet; |
44804 | DOM.bip44coin.val(1); | 44814 | DOM.bip44coin.val(1); |
44805 | }, | 44815 | }, |
44806 | }, | 44816 | }, |
44807 | { | 44817 | { |
44808 | name: "CLAM", | 44818 | name: "CLAM - Clams", |
44809 | onSelect: function() { | 44819 | onSelect: function() { |
44810 | network = bitcoin.networks.clam; | 44820 | network = bitcoin.networks.clam; |
44811 | DOM.bip44coin.val(23); | 44821 | DOM.bip44coin.val(23); |
44812 | }, | 44822 | }, |
44813 | }, | 44823 | }, |
44814 | { | 44824 | { |
44815 | name: "Dogecoin", | 44825 | name: "CRW - Crown", |
44816 | onSelect: function() { | 44826 | onSelect: function() { |
44817 | network = bitcoin.networks.dogecoin; | 44827 | network = bitcoin.networks.crown; |
44818 | DOM.bip44coin.val(3); | 44828 | DOM.bip44coin.val(72); |
44819 | }, | 44829 | }, |
44820 | }, | 44830 | }, |
44821 | { | 44831 | { |
44822 | name: "DASH", | 44832 | name: "DASH - Dash", |
44823 | onSelect: function() { | 44833 | onSelect: function() { |
44824 | network = bitcoin.networks.dash; | 44834 | network = bitcoin.networks.dash; |
44825 | DOM.bip44coin.val(5); | 44835 | DOM.bip44coin.val(5); |
44826 | }, | 44836 | }, |
44827 | }, | 44837 | }, |
44828 | { | 44838 | { |
44829 | name: "DASH Testnet", | 44839 | name: "DASH - Dash Testnet", |
44830 | onSelect: function() { | 44840 | onSelect: function() { |
44831 | network = bitcoin.networks.dashtn; | 44841 | network = bitcoin.networks.dashtn; |
44832 | DOM.bip44coin.val(1); | 44842 | DOM.bip44coin.val(1); |
44833 | }, | 44843 | }, |
44834 | }, | 44844 | }, |
44835 | { | 44845 | { |
44836 | name: "Ethereum", | 44846 | name: "DOGE - Dogecoin", |
44847 | onSelect: function() { | ||
44848 | network = bitcoin.networks.dogecoin; | ||
44849 | DOM.bip44coin.val(3); | ||
44850 | }, | ||
44851 | }, | ||
44852 | { | ||
44853 | name: "ETH - Ethereum", | ||
44837 | onSelect: function() { | 44854 | onSelect: function() { |
44838 | network = bitcoin.networks.bitcoin; | 44855 | network = bitcoin.networks.bitcoin; |
44839 | DOM.bip44coin.val(60); | 44856 | DOM.bip44coin.val(60); |
44840 | }, | 44857 | }, |
44841 | }, | 44858 | }, |
44842 | { | 44859 | { |
44843 | name: "GAME", | 44860 | name: "GAME - GameCredits", |
44844 | onSelect: function() { | 44861 | onSelect: function() { |
44845 | network = bitcoin.networks.game; | 44862 | network = bitcoin.networks.game; |
44846 | DOM.bip44coin.val(101); | 44863 | DOM.bip44coin.val(101); |
44847 | }, | 44864 | }, |
44848 | }, | 44865 | }, |
44849 | { | 44866 | { |
44850 | name: "Jumbucks", | 44867 | name: "JBS - Jumbucks", |
44851 | onSelect: function() { | 44868 | onSelect: function() { |
44852 | network = bitcoin.networks.jumbucks; | 44869 | network = bitcoin.networks.jumbucks; |
44853 | DOM.bip44coin.val(26); | 44870 | DOM.bip44coin.val(26); |
44854 | }, | 44871 | }, |
44855 | }, | 44872 | }, |
44856 | { | 44873 | { |
44857 | name: "Litecoin", | 44874 | name: "LTC - Litecoin", |
44858 | onSelect: function() { | 44875 | onSelect: function() { |
44859 | network = bitcoin.networks.litecoin; | 44876 | network = bitcoin.networks.litecoin; |
44860 | DOM.bip44coin.val(2); | 44877 | DOM.bip44coin.val(2); |
44861 | }, | 44878 | }, |
44862 | }, | 44879 | }, |
44863 | { | 44880 | { |
44864 | name: "Namecoin", | 44881 | name: "NMC - Namecoin", |
44865 | onSelect: function() { | 44882 | onSelect: function() { |
44866 | network = bitcoin.networks.namecoin; | 44883 | network = bitcoin.networks.namecoin; |
44867 | DOM.bip44coin.val(7); | 44884 | DOM.bip44coin.val(7); |
44868 | }, | 44885 | }, |
44869 | }, | 44886 | }, |
44870 | { | 44887 | { |
44871 | name: "Peercoin", | 44888 | name: "PPC - Peercoin", |
44872 | onSelect: function() { | 44889 | onSelect: function() { |
44873 | network = bitcoin.networks.peercoin; | 44890 | network = bitcoin.networks.peercoin; |
44874 | DOM.bip44coin.val(6); | 44891 | DOM.bip44coin.val(6); |
44875 | }, | 44892 | }, |
44876 | }, | 44893 | }, |
44877 | { | 44894 | { |
44878 | name: "Ripple", | 44895 | name: "SDC - ShadowCash", |
44879 | onSelect: function() { | ||
44880 | network = bitcoin.networks.bitcoin; | ||
44881 | DOM.bip44coin.val(144); | ||
44882 | }, | ||
44883 | }, | ||
44884 | { | ||
44885 | name: "ShadowCash", | ||
44886 | onSelect: function() { | 44896 | onSelect: function() { |
44887 | network = bitcoin.networks.shadow; | 44897 | network = bitcoin.networks.shadow; |
44888 | DOM.bip44coin.val(35); | 44898 | DOM.bip44coin.val(35); |
44889 | }, | 44899 | }, |
44890 | }, | 44900 | }, |
44891 | { | 44901 | { |
44892 | name: "ShadowCash Testnet", | 44902 | name: "SDC - ShadowCash Testnet", |
44893 | onSelect: function() { | 44903 | onSelect: function() { |
44894 | network = bitcoin.networks.shadowtn; | 44904 | network = bitcoin.networks.shadowtn; |
44895 | DOM.bip44coin.val(1); | 44905 | DOM.bip44coin.val(1); |
44896 | }, | 44906 | }, |
44897 | }, | 44907 | }, |
44898 | { | 44908 | { |
44899 | name: "Slimcoin", | 44909 | name: "SLM - Slimcoin", |
44900 | onSelect: function() { | 44910 | onSelect: function() { |
44901 | network = bitcoin.networks.slimcoin; | 44911 | network = bitcoin.networks.slimcoin; |
44902 | DOM.bip44coin.val(63); | 44912 | DOM.bip44coin.val(63); |
44903 | }, | 44913 | }, |
44904 | }, | 44914 | }, |
44905 | { | 44915 | { |
44906 | name: "Slimcoin Testnet", | 44916 | name: "SLM - Slimcoin Testnet", |
44907 | onSelect: function() { | 44917 | onSelect: function() { |
44908 | network = bitcoin.networks.slimcointn; | 44918 | network = bitcoin.networks.slimcointn; |
44909 | DOM.bip44coin.val(111); | 44919 | DOM.bip44coin.val(111); |
44910 | }, | 44920 | }, |
44911 | }, | 44921 | }, |
44912 | { | 44922 | { |
44913 | name: "Viacoin", | 44923 | name: "VIA - Viacoin", |
44914 | onSelect: function() { | 44924 | onSelect: function() { |
44915 | network = bitcoin.networks.viacoin; | 44925 | network = bitcoin.networks.viacoin; |
44916 | DOM.bip44coin.val(14); | 44926 | DOM.bip44coin.val(14); |
44917 | }, | 44927 | }, |
44918 | }, | 44928 | }, |
44919 | { | 44929 | { |
44920 | name: "Viacoin Testnet", | 44930 | name: "VIA - Viacoin Testnet", |
44921 | onSelect: function() { | 44931 | onSelect: function() { |
44922 | network = bitcoin.networks.viacointestnet; | 44932 | network = bitcoin.networks.viacointestnet; |
44923 | DOM.bip44coin.val(1); | 44933 | DOM.bip44coin.val(1); |
44924 | }, | 44934 | }, |
44925 | }, | 44935 | }, |
44936 | { | ||
44937 | name: "XRP - Ripple", | ||
44938 | onSelect: function() { | ||
44939 | network = bitcoin.networks.bitcoin; | ||
44940 | DOM.bip44coin.val(144); | ||
44941 | }, | ||
44942 | } | ||
44926 | ] | 44943 | ] |
44927 | 44944 | ||
44928 | var clients = [ | 44945 | var clients = [ |
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 7747d25..631af7e 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -35,6 +35,16 @@ bitcoin.networks.clam = { | |||
35 | wif: 0x85, | 35 | wif: 0x85, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | bitcoin.networks.crown = { | ||
39 | bip32: { | ||
40 | public: 0x0488b21e, | ||
41 | private: 0x0488ade4 | ||
42 | }, | ||
43 | pubKeyHash: 0x00, | ||
44 | scriptHash: 0x05, | ||
45 | wif: 0x80, | ||
46 | }; | ||
47 | |||
38 | bitcoin.networks.dash = { | 48 | bitcoin.networks.dash = { |
39 | bip32: { | 49 | bip32: { |
40 | public: 0x0488b21e, | 50 | public: 0x0488b21e, |
diff --git a/src/js/index.js b/src/js/index.js index 2bb766d..1e88b70 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -585,7 +585,7 @@ | |||
585 | indexText = indexText + "'"; | 585 | indexText = indexText + "'"; |
586 | } | 586 | } |
587 | // Ethereum values are different | 587 | // Ethereum values are different |
588 | if (networks[DOM.network.val()].name == "Ethereum") { | 588 | if (networks[DOM.network.val()].name == "ETH - Ethereum") { |
589 | var privKeyBuffer = key.privKey.d.toBuffer(); | 589 | var privKeyBuffer = key.privKey.d.toBuffer(); |
590 | privkey = privKeyBuffer.toString('hex'); | 590 | privkey = privKeyBuffer.toString('hex'); |
591 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); | 591 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); |
@@ -596,7 +596,7 @@ | |||
596 | pubkey = ethUtil.addHexPrefix(pubkey); | 596 | pubkey = ethUtil.addHexPrefix(pubkey); |
597 | } | 597 | } |
598 | // Ripple values are different | 598 | // Ripple values are different |
599 | if (networks[DOM.network.val()].name == "Ripple") { | 599 | if (networks[DOM.network.val()].name == "XRP - Ripple") { |
600 | privkey = convertRipplePriv(privkey); | 600 | privkey = convertRipplePriv(privkey); |
601 | address = convertRippleAdrr(address); | 601 | address = convertRippleAdrr(address); |
602 | } | 602 | } |
@@ -1057,138 +1057,145 @@ | |||
1057 | 1057 | ||
1058 | var networks = [ | 1058 | var networks = [ |
1059 | { | 1059 | { |
1060 | name: "Bitcoin", | 1060 | name: "BTC - Bitcoin", |
1061 | onSelect: function() { | 1061 | onSelect: function() { |
1062 | network = bitcoin.networks.bitcoin; | 1062 | network = bitcoin.networks.bitcoin; |
1063 | DOM.bip44coin.val(0); | 1063 | DOM.bip44coin.val(0); |
1064 | }, | 1064 | }, |
1065 | }, | 1065 | }, |
1066 | { | 1066 | { |
1067 | name: "Bitcoin Testnet", | 1067 | name: "BTC - Bitcoin Testnet", |
1068 | onSelect: function() { | 1068 | onSelect: function() { |
1069 | network = bitcoin.networks.testnet; | 1069 | network = bitcoin.networks.testnet; |
1070 | DOM.bip44coin.val(1); | 1070 | DOM.bip44coin.val(1); |
1071 | }, | 1071 | }, |
1072 | }, | 1072 | }, |
1073 | { | 1073 | { |
1074 | name: "CLAM", | 1074 | name: "CLAM - Clams", |
1075 | onSelect: function() { | 1075 | onSelect: function() { |
1076 | network = bitcoin.networks.clam; | 1076 | network = bitcoin.networks.clam; |
1077 | DOM.bip44coin.val(23); | 1077 | DOM.bip44coin.val(23); |
1078 | }, | 1078 | }, |
1079 | }, | 1079 | }, |
1080 | { | 1080 | { |
1081 | name: "Dogecoin", | 1081 | name: "CRW - Crown", |
1082 | onSelect: function() { | 1082 | onSelect: function() { |
1083 | network = bitcoin.networks.dogecoin; | 1083 | network = bitcoin.networks.crown; |
1084 | DOM.bip44coin.val(3); | 1084 | DOM.bip44coin.val(72); |
1085 | }, | 1085 | }, |
1086 | }, | 1086 | }, |
1087 | { | 1087 | { |
1088 | name: "DASH", | 1088 | name: "DASH - Dash", |
1089 | onSelect: function() { | 1089 | onSelect: function() { |
1090 | network = bitcoin.networks.dash; | 1090 | network = bitcoin.networks.dash; |
1091 | DOM.bip44coin.val(5); | 1091 | DOM.bip44coin.val(5); |
1092 | }, | 1092 | }, |
1093 | }, | 1093 | }, |
1094 | { | 1094 | { |
1095 | name: "DASH Testnet", | 1095 | name: "DASH - Dash Testnet", |
1096 | onSelect: function() { | 1096 | onSelect: function() { |
1097 | network = bitcoin.networks.dashtn; | 1097 | network = bitcoin.networks.dashtn; |
1098 | DOM.bip44coin.val(1); | 1098 | DOM.bip44coin.val(1); |
1099 | }, | 1099 | }, |
1100 | }, | 1100 | }, |
1101 | { | 1101 | { |
1102 | name: "Ethereum", | 1102 | name: "DOGE - Dogecoin", |
1103 | onSelect: function() { | ||
1104 | network = bitcoin.networks.dogecoin; | ||
1105 | DOM.bip44coin.val(3); | ||
1106 | }, | ||
1107 | }, | ||
1108 | { | ||
1109 | name: "ETH - Ethereum", | ||
1103 | onSelect: function() { | 1110 | onSelect: function() { |
1104 | network = bitcoin.networks.bitcoin; | 1111 | network = bitcoin.networks.bitcoin; |
1105 | DOM.bip44coin.val(60); | 1112 | DOM.bip44coin.val(60); |
1106 | }, | 1113 | }, |
1107 | }, | 1114 | }, |
1108 | { | 1115 | { |
1109 | name: "GAME", | 1116 | name: "GAME - GameCredits", |
1110 | onSelect: function() { | 1117 | onSelect: function() { |
1111 | network = bitcoin.networks.game; | 1118 | network = bitcoin.networks.game; |
1112 | DOM.bip44coin.val(101); | 1119 | DOM.bip44coin.val(101); |
1113 | }, | 1120 | }, |
1114 | }, | 1121 | }, |
1115 | { | 1122 | { |
1116 | name: "Jumbucks", | 1123 | name: "JBS - Jumbucks", |
1117 | onSelect: function() { | 1124 | onSelect: function() { |
1118 | network = bitcoin.networks.jumbucks; | 1125 | network = bitcoin.networks.jumbucks; |
1119 | DOM.bip44coin.val(26); | 1126 | DOM.bip44coin.val(26); |
1120 | }, | 1127 | }, |
1121 | }, | 1128 | }, |
1122 | { | 1129 | { |
1123 | name: "Litecoin", | 1130 | name: "LTC - Litecoin", |
1124 | onSelect: function() { | 1131 | onSelect: function() { |
1125 | network = bitcoin.networks.litecoin; | 1132 | network = bitcoin.networks.litecoin; |
1126 | DOM.bip44coin.val(2); | 1133 | DOM.bip44coin.val(2); |
1127 | }, | 1134 | }, |
1128 | }, | 1135 | }, |
1129 | { | 1136 | { |
1130 | name: "Namecoin", | 1137 | name: "NMC - Namecoin", |
1131 | onSelect: function() { | 1138 | onSelect: function() { |
1132 | network = bitcoin.networks.namecoin; | 1139 | network = bitcoin.networks.namecoin; |
1133 | DOM.bip44coin.val(7); | 1140 | DOM.bip44coin.val(7); |
1134 | }, | 1141 | }, |
1135 | }, | 1142 | }, |
1136 | { | 1143 | { |
1137 | name: "Peercoin", | 1144 | name: "PPC - Peercoin", |
1138 | onSelect: function() { | 1145 | onSelect: function() { |
1139 | network = bitcoin.networks.peercoin; | 1146 | network = bitcoin.networks.peercoin; |
1140 | DOM.bip44coin.val(6); | 1147 | DOM.bip44coin.val(6); |
1141 | }, | 1148 | }, |
1142 | }, | 1149 | }, |
1143 | { | 1150 | { |
1144 | name: "Ripple", | 1151 | name: "SDC - ShadowCash", |
1145 | onSelect: function() { | ||
1146 | network = bitcoin.networks.bitcoin; | ||
1147 | DOM.bip44coin.val(144); | ||
1148 | }, | ||
1149 | }, | ||
1150 | { | ||
1151 | name: "ShadowCash", | ||
1152 | onSelect: function() { | 1152 | onSelect: function() { |
1153 | network = bitcoin.networks.shadow; | 1153 | network = bitcoin.networks.shadow; |
1154 | DOM.bip44coin.val(35); | 1154 | DOM.bip44coin.val(35); |
1155 | }, | 1155 | }, |
1156 | }, | 1156 | }, |
1157 | { | 1157 | { |
1158 | name: "ShadowCash Testnet", | 1158 | name: "SDC - ShadowCash Testnet", |
1159 | onSelect: function() { | 1159 | onSelect: function() { |
1160 | network = bitcoin.networks.shadowtn; | 1160 | network = bitcoin.networks.shadowtn; |
1161 | DOM.bip44coin.val(1); | 1161 | DOM.bip44coin.val(1); |
1162 | }, | 1162 | }, |
1163 | }, | 1163 | }, |
1164 | { | 1164 | { |
1165 | name: "Slimcoin", | 1165 | name: "SLM - Slimcoin", |
1166 | onSelect: function() { | 1166 | onSelect: function() { |
1167 | network = bitcoin.networks.slimcoin; | 1167 | network = bitcoin.networks.slimcoin; |
1168 | DOM.bip44coin.val(63); | 1168 | DOM.bip44coin.val(63); |
1169 | }, | 1169 | }, |
1170 | }, | 1170 | }, |
1171 | { | 1171 | { |
1172 | name: "Slimcoin Testnet", | 1172 | name: "SLM - Slimcoin Testnet", |
1173 | onSelect: function() { | 1173 | onSelect: function() { |
1174 | network = bitcoin.networks.slimcointn; | 1174 | network = bitcoin.networks.slimcointn; |
1175 | DOM.bip44coin.val(111); | 1175 | DOM.bip44coin.val(111); |
1176 | }, | 1176 | }, |
1177 | }, | 1177 | }, |
1178 | { | 1178 | { |
1179 | name: "Viacoin", | 1179 | name: "VIA - Viacoin", |
1180 | onSelect: function() { | 1180 | onSelect: function() { |
1181 | network = bitcoin.networks.viacoin; | 1181 | network = bitcoin.networks.viacoin; |
1182 | DOM.bip44coin.val(14); | 1182 | DOM.bip44coin.val(14); |
1183 | }, | 1183 | }, |
1184 | }, | 1184 | }, |
1185 | { | 1185 | { |
1186 | name: "Viacoin Testnet", | 1186 | name: "VIA - Viacoin Testnet", |
1187 | onSelect: function() { | 1187 | onSelect: function() { |
1188 | network = bitcoin.networks.viacointestnet; | 1188 | network = bitcoin.networks.viacointestnet; |
1189 | DOM.bip44coin.val(1); | 1189 | DOM.bip44coin.val(1); |
1190 | }, | 1190 | }, |
1191 | }, | 1191 | }, |
1192 | { | ||
1193 | name: "XRP - Ripple", | ||
1194 | onSelect: function() { | ||
1195 | network = bitcoin.networks.bitcoin; | ||
1196 | DOM.bip44coin.val(144); | ||
1197 | }, | ||
1198 | } | ||
1192 | ] | 1199 | ] |
1193 | 1200 | ||
1194 | var clients = [ | 1201 | var clients = [ |
@@ -281,7 +281,7 @@ page.open(url, function(status) { | |||
281 | $(".phrase").trigger("input"); | 281 | $(".phrase").trigger("input"); |
282 | $(".network option[selected]").removeAttr("selected"); | 282 | $(".network option[selected]").removeAttr("selected"); |
283 | $(".network option").filter(function() { | 283 | $(".network option").filter(function() { |
284 | return $(this).html() == "Bitcoin Testnet"; | 284 | return $(this).html() == "BTC - Bitcoin Testnet"; |
285 | }).prop("selected", true); | 285 | }).prop("selected", true); |
286 | $(".network").trigger("change"); | 286 | $(".network").trigger("change"); |
287 | }); | 287 | }); |
@@ -311,7 +311,7 @@ page.open(url, function(status) { | |||
311 | $(".phrase").trigger("input"); | 311 | $(".phrase").trigger("input"); |
312 | $(".network option[selected]").removeAttr("selected"); | 312 | $(".network option[selected]").removeAttr("selected"); |
313 | $(".network option").filter(function() { | 313 | $(".network option").filter(function() { |
314 | return $(this).html() == "Litecoin"; | 314 | return $(this).html() == "LTC - Litecoin"; |
315 | }).prop("selected", true); | 315 | }).prop("selected", true); |
316 | $(".network").trigger("change"); | 316 | $(".network").trigger("change"); |
317 | }); | 317 | }); |
@@ -341,7 +341,7 @@ page.open(url, function(status) { | |||
341 | $(".phrase").trigger("input"); | 341 | $(".phrase").trigger("input"); |
342 | $(".network option[selected]").removeAttr("selected"); | 342 | $(".network option[selected]").removeAttr("selected"); |
343 | $(".network option").filter(function() { | 343 | $(".network option").filter(function() { |
344 | return $(this).html() == "Ripple"; | 344 | return $(this).html() == "XRP - Ripple"; |
345 | }).prop("selected", true); | 345 | }).prop("selected", true); |
346 | $(".network").trigger("change"); | 346 | $(".network").trigger("change"); |
347 | }); | 347 | }); |
@@ -371,7 +371,7 @@ page.open(url, function(status) { | |||
371 | $(".phrase").trigger("input"); | 371 | $(".phrase").trigger("input"); |
372 | $(".network option[selected]").removeAttr("selected"); | 372 | $(".network option[selected]").removeAttr("selected"); |
373 | $(".network option").filter(function() { | 373 | $(".network option").filter(function() { |
374 | return $(this).html() == "Dogecoin"; | 374 | return $(this).html() == "DOGE - Dogecoin"; |
375 | }).prop("selected", true); | 375 | }).prop("selected", true); |
376 | $(".network").trigger("change"); | 376 | $(".network").trigger("change"); |
377 | }); | 377 | }); |
@@ -401,7 +401,7 @@ page.open(url, function(status) { | |||
401 | $(".phrase").trigger("input"); | 401 | $(".phrase").trigger("input"); |
402 | $(".network option[selected]").removeAttr("selected"); | 402 | $(".network option[selected]").removeAttr("selected"); |
403 | $(".network option").filter(function() { | 403 | $(".network option").filter(function() { |
404 | return $(this).html() == "ShadowCash"; | 404 | return $(this).html() == "SDC - ShadowCash"; |
405 | }).prop("selected", true); | 405 | }).prop("selected", true); |
406 | $(".network").trigger("change"); | 406 | $(".network").trigger("change"); |
407 | }); | 407 | }); |
@@ -431,7 +431,7 @@ page.open(url, function(status) { | |||
431 | $(".phrase").trigger("input"); | 431 | $(".phrase").trigger("input"); |
432 | $(".network option[selected]").removeAttr("selected"); | 432 | $(".network option[selected]").removeAttr("selected"); |
433 | $(".network option").filter(function() { | 433 | $(".network option").filter(function() { |
434 | return $(this).html() == "ShadowCash Testnet"; | 434 | return $(this).html() == "SDC - ShadowCash Testnet"; |
435 | }).prop("selected", true); | 435 | }).prop("selected", true); |
436 | $(".network").trigger("change"); | 436 | $(".network").trigger("change"); |
437 | }); | 437 | }); |
@@ -461,7 +461,7 @@ page.open(url, function(status) { | |||
461 | $(".phrase").trigger("input"); | 461 | $(".phrase").trigger("input"); |
462 | $(".network option[selected]").removeAttr("selected"); | 462 | $(".network option[selected]").removeAttr("selected"); |
463 | $(".network option").filter(function() { | 463 | $(".network option").filter(function() { |
464 | return $(this).html() == "Viacoin"; | 464 | return $(this).html() == "VIA - Viacoin"; |
465 | }).prop("selected", true); | 465 | }).prop("selected", true); |
466 | $(".network").trigger("change"); | 466 | $(".network").trigger("change"); |
467 | }); | 467 | }); |
@@ -491,7 +491,7 @@ page.open(url, function(status) { | |||
491 | $(".phrase").trigger("input"); | 491 | $(".phrase").trigger("input"); |
492 | $(".network option[selected]").removeAttr("selected"); | 492 | $(".network option[selected]").removeAttr("selected"); |
493 | $(".network option").filter(function() { | 493 | $(".network option").filter(function() { |
494 | return $(this).html() == "Viacoin Testnet"; | 494 | return $(this).html() == "VIA - Viacoin Testnet"; |
495 | }).prop("selected", true); | 495 | }).prop("selected", true); |
496 | $(".network").trigger("change"); | 496 | $(".network").trigger("change"); |
497 | }); | 497 | }); |
@@ -521,7 +521,7 @@ page.open(url, function(status) { | |||
521 | $(".phrase").trigger("input"); | 521 | $(".phrase").trigger("input"); |
522 | $(".network option[selected]").removeAttr("selected"); | 522 | $(".network option[selected]").removeAttr("selected"); |
523 | $(".network option").filter(function() { | 523 | $(".network option").filter(function() { |
524 | return $(this).html() == "Jumbucks"; | 524 | return $(this).html() == "JBS - Jumbucks"; |
525 | }).prop("selected", true); | 525 | }).prop("selected", true); |
526 | $(".network").trigger("change"); | 526 | $(".network").trigger("change"); |
527 | }); | 527 | }); |
@@ -551,7 +551,7 @@ page.open(url, function(status) { | |||
551 | $(".phrase").trigger("input"); | 551 | $(".phrase").trigger("input"); |
552 | $(".network option[selected]").removeAttr("selected"); | 552 | $(".network option[selected]").removeAttr("selected"); |
553 | $(".network option").filter(function() { | 553 | $(".network option").filter(function() { |
554 | return $(this).html() == "CLAM"; | 554 | return $(this).html() == "CLAM - Clams"; |
555 | }).prop("selected", true); | 555 | }).prop("selected", true); |
556 | $(".network").trigger("change"); | 556 | $(".network").trigger("change"); |
557 | }); | 557 | }); |
@@ -571,6 +571,36 @@ page.open(url, function(status) { | |||
571 | }); | 571 | }); |
572 | }, | 572 | }, |
573 | 573 | ||
574 | // Network can be set to crown | ||
575 | function() { | ||
576 | page.open(url, function(status) { | ||
577 | // set the phrase and coin | ||
578 | var expected = "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5"; | ||
579 | page.evaluate(function() { | ||
580 | $(".phrase").val("abandon abandon ability"); | ||
581 | $(".phrase").trigger("input"); | ||
582 | $(".network option[selected]").removeAttr("selected"); | ||
583 | $(".network option").filter(function() { | ||
584 | return $(this).html() == "CRW - Crown"; | ||
585 | }).prop("selected", true); | ||
586 | $(".network").trigger("change"); | ||
587 | }); | ||
588 | // check the address is generated correctly | ||
589 | waitForGenerate(function() { | ||
590 | var actual = page.evaluate(function() { | ||
591 | return $(".address:first").text(); | ||
592 | }); | ||
593 | if (actual != expected) { | ||
594 | console.log("CRW address is incorrect"); | ||
595 | console.log("Expected: " + expected); | ||
596 | console.log("Actual: " + actual); | ||
597 | fail(); | ||
598 | } | ||
599 | next(); | ||
600 | }); | ||
601 | }); | ||
602 | }, | ||
603 | |||
574 | // Network can be set to dash | 604 | // Network can be set to dash |
575 | function() { | 605 | function() { |
576 | page.open(url, function(status) { | 606 | page.open(url, function(status) { |
@@ -581,7 +611,7 @@ page.open(url, function(status) { | |||
581 | $(".phrase").trigger("input"); | 611 | $(".phrase").trigger("input"); |
582 | $(".network option[selected]").removeAttr("selected"); | 612 | $(".network option[selected]").removeAttr("selected"); |
583 | $(".network option").filter(function() { | 613 | $(".network option").filter(function() { |
584 | return $(this).html() == "DASH"; | 614 | return $(this).html() == "DASH - Dash"; |
585 | }).prop("selected", true); | 615 | }).prop("selected", true); |
586 | $(".network").trigger("change"); | 616 | $(".network").trigger("change"); |
587 | }); | 617 | }); |
@@ -610,7 +640,7 @@ page.open(url, function(status) { | |||
610 | $(".phrase").trigger("input"); | 640 | $(".phrase").trigger("input"); |
611 | $(".network option[selected]").removeAttr("selected"); | 641 | $(".network option[selected]").removeAttr("selected"); |
612 | $(".network option").filter(function() { | 642 | $(".network option").filter(function() { |
613 | return $(this).html() == "DASH Testnet"; | 643 | return $(this).html() == "DASH - Dash Testnet"; |
614 | }).prop("selected", true); | 644 | }).prop("selected", true); |
615 | $(".network").trigger("change"); | 645 | $(".network").trigger("change"); |
616 | }); | 646 | }); |
@@ -640,7 +670,7 @@ page.open(url, function(status) { | |||
640 | $(".phrase").trigger("input"); | 670 | $(".phrase").trigger("input"); |
641 | $(".network option[selected]").removeAttr("selected"); | 671 | $(".network option[selected]").removeAttr("selected"); |
642 | $(".network option").filter(function() { | 672 | $(".network option").filter(function() { |
643 | return $(this).html() == "GAME"; | 673 | return $(this).html() == "GAME - GameCredits"; |
644 | }).prop("selected", true); | 674 | }).prop("selected", true); |
645 | $(".network").trigger("change"); | 675 | $(".network").trigger("change"); |
646 | }); | 676 | }); |
@@ -670,7 +700,7 @@ page.open(url, function(status) { | |||
670 | $(".phrase").trigger("input"); | 700 | $(".phrase").trigger("input"); |
671 | $(".network option[selected]").removeAttr("selected"); | 701 | $(".network option[selected]").removeAttr("selected"); |
672 | $(".network option").filter(function() { | 702 | $(".network option").filter(function() { |
673 | return $(this).html() == "Namecoin"; | 703 | return $(this).html() == "NMC - Namecoin"; |
674 | }).prop("selected", true); | 704 | }).prop("selected", true); |
675 | $(".network").trigger("change"); | 705 | $(".network").trigger("change"); |
676 | }); | 706 | }); |
@@ -700,7 +730,7 @@ page.open(url, function(status) { | |||
700 | $(".phrase").trigger("input"); | 730 | $(".phrase").trigger("input"); |
701 | $(".network option[selected]").removeAttr("selected"); | 731 | $(".network option[selected]").removeAttr("selected"); |
702 | $(".network option").filter(function() { | 732 | $(".network option").filter(function() { |
703 | return $(this).html() == "Peercoin"; | 733 | return $(this).html() == "PPC - Peercoin"; |
704 | }).prop("selected", true); | 734 | }).prop("selected", true); |
705 | $(".network").trigger("change"); | 735 | $(".network").trigger("change"); |
706 | }); | 736 | }); |
@@ -731,7 +761,7 @@ page.open(url, function(status) { | |||
731 | $(".phrase").trigger("input"); | 761 | $(".phrase").trigger("input"); |
732 | $(".network option[selected]").removeAttr("selected"); | 762 | $(".network option[selected]").removeAttr("selected"); |
733 | $(".network option").filter(function() { | 763 | $(".network option").filter(function() { |
734 | return $(this).html() == "Ethereum"; | 764 | return $(this).html() == "ETH - Ethereum"; |
735 | }).prop("selected", true); | 765 | }).prop("selected", true); |
736 | $(".network").trigger("change"); | 766 | $(".network").trigger("change"); |
737 | }); | 767 | }); |
@@ -792,7 +822,7 @@ page.open(url, function(status) { | |||
792 | $(".phrase").trigger("input"); | 822 | $(".phrase").trigger("input"); |
793 | $(".network option[selected]").removeAttr("selected"); | 823 | $(".network option[selected]").removeAttr("selected"); |
794 | $(".network option").filter(function() { | 824 | $(".network option").filter(function() { |
795 | return $(this).html() == "Slimcoin"; | 825 | return $(this).html() == "SLM - Slimcoin"; |
796 | }).prop("selected", true); | 826 | }).prop("selected", true); |
797 | $(".network").trigger("change"); | 827 | $(".network").trigger("change"); |
798 | }); | 828 | }); |
@@ -822,7 +852,7 @@ page.open(url, function(status) { | |||
822 | $(".phrase").trigger("input"); | 852 | $(".phrase").trigger("input"); |
823 | $(".network option[selected]").removeAttr("selected"); | 853 | $(".network option[selected]").removeAttr("selected"); |
824 | $(".network option").filter(function() { | 854 | $(".network option").filter(function() { |
825 | return $(this).html() == "Slimcoin Testnet"; | 855 | return $(this).html() == "SLM - Slimcoin Testnet"; |
826 | }).prop("selected", true); | 856 | }).prop("selected", true); |
827 | $(".network").trigger("change"); | 857 | $(".network").trigger("change"); |
828 | }); | 858 | }); |
@@ -2014,7 +2044,7 @@ page.open(url, function(status) { | |||
2014 | // 4) switch from bitcoin to litecoin | 2044 | // 4) switch from bitcoin to litecoin |
2015 | page.evaluate(function() { | 2045 | page.evaluate(function() { |
2016 | $(".network option").filter(function() { | 2046 | $(".network option").filter(function() { |
2017 | return $(this).html() == "Litecoin"; | 2047 | return $(this).html() == "LTC - Litecoin"; |
2018 | }).prop("selected", true); | 2048 | }).prop("selected", true); |
2019 | $(".network").trigger("change"); | 2049 | $(".network").trigger("change"); |
2020 | }); | 2050 | }); |
@@ -2060,7 +2090,7 @@ page.open(url, function(status) { | |||
2060 | // switch from bitcoin to clam | 2090 | // switch from bitcoin to clam |
2061 | page.evaluate(function() { | 2091 | page.evaluate(function() { |
2062 | $(".network option").filter(function() { | 2092 | $(".network option").filter(function() { |
2063 | return $(this).html() == "CLAM"; | 2093 | return $(this).html() == "CLAM - Clams"; |
2064 | }).prop("selected", true); | 2094 | }).prop("selected", true); |
2065 | $(".network").trigger("change"); | 2095 | $(".network").trigger("change"); |
2066 | }); | 2096 | }); |
@@ -2094,7 +2124,7 @@ page.open(url, function(status) { | |||
2094 | // 4) switch from bitcoin to viacoin | 2124 | // 4) switch from bitcoin to viacoin |
2095 | page.evaluate(function() { | 2125 | page.evaluate(function() { |
2096 | $(".network option").filter(function() { | 2126 | $(".network option").filter(function() { |
2097 | return $(this).html() == "Viacoin"; | 2127 | return $(this).html() == "VIA - Viacoin"; |
2098 | }).prop("selected", true); | 2128 | }).prop("selected", true); |
2099 | $(".network").trigger("change"); | 2129 | $(".network").trigger("change"); |
2100 | }); | 2130 | }); |