aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2017-02-21 12:35:10 +1100
committerIan Coleman <coleman.ian@gmail.com>2017-02-21 12:38:32 +1100
commit52d589ea8d14517813c2c41ba7f5c5b9f144821d (patch)
tree6a6d61ea39bf7b2c04f53471b005383d57afc5f2
parent18f160099d4a319290501d9a5efb633e2acf53c9 (diff)
downloadBIP39-52d589ea8d14517813c2c41ba7f5c5b9f144821d.tar.gz
BIP39-52d589ea8d14517813c2c41ba7f5c5b9f144821d.tar.zst
BIP39-52d589ea8d14517813c2c41ba7f5c5b9f144821d.zip
Network order is alphabetical.
Closes #56
-rw-r--r--bip39-standalone.html66
-rw-r--r--src/js/index.js66
-rw-r--r--tests.js67
3 files changed, 117 insertions, 82 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html
index ee26c14..43b588a 100644
--- a/bip39-standalone.html
+++ b/bip39-standalone.html
@@ -42309,10 +42309,10 @@ window.Entropy = new (function() {
42309 }, 42309 },
42310 }, 42310 },
42311 { 42311 {
42312 name: "Litecoin", 42312 name: "CLAM",
42313 onSelect: function() { 42313 onSelect: function() {
42314 network = bitcoin.networks.litecoin; 42314 network = bitcoin.networks.clam;
42315 DOM.bip44coin.val(2); 42315 DOM.bip44coin.val(23);
42316 }, 42316 },
42317 }, 42317 },
42318 { 42318 {
@@ -42323,73 +42323,73 @@ window.Entropy = new (function() {
42323 }, 42323 },
42324 }, 42324 },
42325 { 42325 {
42326 name: "ShadowCash", 42326 name: "DASH",
42327 onSelect: function() { 42327 onSelect: function() {
42328 network = bitcoin.networks.shadow; 42328 network = bitcoin.networks.dash;
42329 DOM.bip44coin.val(35); 42329 DOM.bip44coin.val(5);
42330 }, 42330 },
42331 }, 42331 },
42332 { 42332 {
42333 name: "ShadowCash Testnet", 42333 name: "Ethereum",
42334 onSelect: function() { 42334 onSelect: function() {
42335 network = bitcoin.networks.shadowtn; 42335 network = bitcoin.networks.bitcoin;
42336 DOM.bip44coin.val(1); 42336 DOM.bip44coin.val(60);
42337 }, 42337 },
42338 }, 42338 },
42339 { 42339 {
42340 name: "Viacoin", 42340 name: "Jumbucks",
42341 onSelect: function() { 42341 onSelect: function() {
42342 network = bitcoin.networks.viacoin; 42342 network = bitcoin.networks.jumbucks;
42343 DOM.bip44coin.val(14); 42343 DOM.bip44coin.val(26);
42344 }, 42344 },
42345 }, 42345 },
42346 { 42346 {
42347 name: "Viacoin Testnet", 42347 name: "Litecoin",
42348 onSelect: function() { 42348 onSelect: function() {
42349 network = bitcoin.networks.viacointestnet; 42349 network = bitcoin.networks.litecoin;
42350 DOM.bip44coin.val(1); 42350 DOM.bip44coin.val(2);
42351 }, 42351 },
42352 }, 42352 },
42353 { 42353 {
42354 name: "Jumbucks", 42354 name: "Namecoin",
42355 onSelect: function() { 42355 onSelect: function() {
42356 network = bitcoin.networks.jumbucks; 42356 network = bitcoin.networks.namecoin;
42357 DOM.bip44coin.val(26); 42357 DOM.bip44coin.val(7);
42358 }, 42358 },
42359 }, 42359 },
42360 { 42360 {
42361 name: "CLAM", 42361 name: "Peercoin",
42362 onSelect: function() { 42362 onSelect: function() {
42363 network = bitcoin.networks.clam; 42363 network = bitcoin.networks.peercoin;
42364 DOM.bip44coin.val(23); 42364 DOM.bip44coin.val(6);
42365 }, 42365 },
42366 }, 42366 },
42367 { 42367 {
42368 name: "DASH", 42368 name: "ShadowCash",
42369 onSelect: function() { 42369 onSelect: function() {
42370 network = bitcoin.networks.dash; 42370 network = bitcoin.networks.shadow;
42371 DOM.bip44coin.val(5); 42371 DOM.bip44coin.val(35);
42372 }, 42372 },
42373 }, 42373 },
42374 { 42374 {
42375 name: "Namecoin", 42375 name: "ShadowCash Testnet",
42376 onSelect: function() { 42376 onSelect: function() {
42377 network = bitcoin.networks.namecoin; 42377 network = bitcoin.networks.shadowtn;
42378 DOM.bip44coin.val(7); 42378 DOM.bip44coin.val(1);
42379 }, 42379 },
42380 }, 42380 },
42381 { 42381 {
42382 name: "Peercoin", 42382 name: "Viacoin",
42383 onSelect: function() { 42383 onSelect: function() {
42384 network = bitcoin.networks.peercoin; 42384 network = bitcoin.networks.viacoin;
42385 DOM.bip44coin.val(6); 42385 DOM.bip44coin.val(14);
42386 }, 42386 },
42387 }, 42387 },
42388 { 42388 {
42389 name: "Ethereum", 42389 name: "Viacoin Testnet",
42390 onSelect: function() { 42390 onSelect: function() {
42391 network = bitcoin.networks.bitcoin; 42391 network = bitcoin.networks.viacointestnet;
42392 DOM.bip44coin.val(60); 42392 DOM.bip44coin.val(1);
42393 }, 42393 },
42394 }, 42394 },
42395 ] 42395 ]
diff --git a/src/js/index.js b/src/js/index.js
index 29cf06b..757d088 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1086,10 +1086,10 @@
1086 }, 1086 },
1087 }, 1087 },
1088 { 1088 {
1089 name: "Litecoin", 1089 name: "CLAM",
1090 onSelect: function() { 1090 onSelect: function() {
1091 network = bitcoin.networks.litecoin; 1091 network = bitcoin.networks.clam;
1092 DOM.bip44coin.val(2); 1092 DOM.bip44coin.val(23);
1093 }, 1093 },
1094 }, 1094 },
1095 { 1095 {
@@ -1100,73 +1100,73 @@
1100 }, 1100 },
1101 }, 1101 },
1102 { 1102 {
1103 name: "ShadowCash", 1103 name: "DASH",
1104 onSelect: function() { 1104 onSelect: function() {
1105 network = bitcoin.networks.shadow; 1105 network = bitcoin.networks.dash;
1106 DOM.bip44coin.val(35); 1106 DOM.bip44coin.val(5);
1107 }, 1107 },
1108 }, 1108 },
1109 { 1109 {
1110 name: "ShadowCash Testnet", 1110 name: "Ethereum",
1111 onSelect: function() { 1111 onSelect: function() {
1112 network = bitcoin.networks.shadowtn; 1112 network = bitcoin.networks.bitcoin;
1113 DOM.bip44coin.val(1); 1113 DOM.bip44coin.val(60);
1114 }, 1114 },
1115 }, 1115 },
1116 { 1116 {
1117 name: "Viacoin", 1117 name: "Jumbucks",
1118 onSelect: function() { 1118 onSelect: function() {
1119 network = bitcoin.networks.viacoin; 1119 network = bitcoin.networks.jumbucks;
1120 DOM.bip44coin.val(14); 1120 DOM.bip44coin.val(26);
1121 }, 1121 },
1122 }, 1122 },
1123 { 1123 {
1124 name: "Viacoin Testnet", 1124 name: "Litecoin",
1125 onSelect: function() { 1125 onSelect: function() {
1126 network = bitcoin.networks.viacointestnet; 1126 network = bitcoin.networks.litecoin;
1127 DOM.bip44coin.val(1); 1127 DOM.bip44coin.val(2);
1128 }, 1128 },
1129 }, 1129 },
1130 { 1130 {
1131 name: "Jumbucks", 1131 name: "Namecoin",
1132 onSelect: function() { 1132 onSelect: function() {
1133 network = bitcoin.networks.jumbucks; 1133 network = bitcoin.networks.namecoin;
1134 DOM.bip44coin.val(26); 1134 DOM.bip44coin.val(7);
1135 }, 1135 },
1136 }, 1136 },
1137 { 1137 {
1138 name: "CLAM", 1138 name: "Peercoin",
1139 onSelect: function() { 1139 onSelect: function() {
1140 network = bitcoin.networks.clam; 1140 network = bitcoin.networks.peercoin;
1141 DOM.bip44coin.val(23); 1141 DOM.bip44coin.val(6);
1142 }, 1142 },
1143 }, 1143 },
1144 { 1144 {
1145 name: "DASH", 1145 name: "ShadowCash",
1146 onSelect: function() { 1146 onSelect: function() {
1147 network = bitcoin.networks.dash; 1147 network = bitcoin.networks.shadow;
1148 DOM.bip44coin.val(5); 1148 DOM.bip44coin.val(35);
1149 }, 1149 },
1150 }, 1150 },
1151 { 1151 {
1152 name: "Namecoin", 1152 name: "ShadowCash Testnet",
1153 onSelect: function() { 1153 onSelect: function() {
1154 network = bitcoin.networks.namecoin; 1154 network = bitcoin.networks.shadowtn;
1155 DOM.bip44coin.val(7); 1155 DOM.bip44coin.val(1);
1156 }, 1156 },
1157 }, 1157 },
1158 { 1158 {
1159 name: "Peercoin", 1159 name: "Viacoin",
1160 onSelect: function() { 1160 onSelect: function() {
1161 network = bitcoin.networks.peercoin; 1161 network = bitcoin.networks.viacoin;
1162 DOM.bip44coin.val(6); 1162 DOM.bip44coin.val(14);
1163 }, 1163 },
1164 }, 1164 },
1165 { 1165 {
1166 name: "Ethereum", 1166 name: "Viacoin Testnet",
1167 onSelect: function() { 1167 onSelect: function() {
1168 network = bitcoin.networks.bitcoin; 1168 network = bitcoin.networks.viacointestnet;
1169 DOM.bip44coin.val(60); 1169 DOM.bip44coin.val(1);
1170 }, 1170 },
1171 }, 1171 },
1172 ] 1172 ]
diff --git a/tests.js b/tests.js
index debedab..e9f0a31 100644
--- a/tests.js
+++ b/tests.js
@@ -280,7 +280,9 @@ page.open(url, function(status) {
280 $(".phrase").val("abandon abandon ability"); 280 $(".phrase").val("abandon abandon ability");
281 $(".phrase").trigger("input"); 281 $(".phrase").trigger("input");
282 $(".network option[selected]").removeAttr("selected"); 282 $(".network option[selected]").removeAttr("selected");
283 $(".network option[value=1]").prop("selected", true); 283 $(".network option").filter(function() {
284 return $(this).html() == "Bitcoin Testnet";
285 }).prop("selected", true);
284 $(".network").trigger("change"); 286 $(".network").trigger("change");
285 }); 287 });
286 // check the address is generated correctly 288 // check the address is generated correctly
@@ -308,7 +310,9 @@ page.open(url, function(status) {
308 $(".phrase").val("abandon abandon ability"); 310 $(".phrase").val("abandon abandon ability");
309 $(".phrase").trigger("input"); 311 $(".phrase").trigger("input");
310 $(".network option[selected]").removeAttr("selected"); 312 $(".network option[selected]").removeAttr("selected");
311 $(".network option[value=2]").prop("selected", true); 313 $(".network option").filter(function() {
314 return $(this).html() == "Litecoin";
315 }).prop("selected", true);
312 $(".network").trigger("change"); 316 $(".network").trigger("change");
313 }); 317 });
314 // check the address is generated correctly 318 // check the address is generated correctly
@@ -336,7 +340,9 @@ page.open(url, function(status) {
336 $(".phrase").val("abandon abandon ability"); 340 $(".phrase").val("abandon abandon ability");
337 $(".phrase").trigger("input"); 341 $(".phrase").trigger("input");
338 $(".network option[selected]").removeAttr("selected"); 342 $(".network option[selected]").removeAttr("selected");
339 $(".network option[value=3]").prop("selected", true); 343 $(".network option").filter(function() {
344 return $(this).html() == "Dogecoin";
345 }).prop("selected", true);
340 $(".network").trigger("change"); 346 $(".network").trigger("change");
341 }); 347 });
342 // check the address is generated correctly 348 // check the address is generated correctly
@@ -364,7 +370,9 @@ page.open(url, function(status) {
364 $(".phrase").val("abandon abandon ability"); 370 $(".phrase").val("abandon abandon ability");
365 $(".phrase").trigger("input"); 371 $(".phrase").trigger("input");
366 $(".network option[selected]").removeAttr("selected"); 372 $(".network option[selected]").removeAttr("selected");
367 $(".network option[value=4]").prop("selected", true); 373 $(".network option").filter(function() {
374 return $(this).html() == "ShadowCash";
375 }).prop("selected", true);
368 $(".network").trigger("change"); 376 $(".network").trigger("change");
369 }); 377 });
370 // check the address is generated correctly 378 // check the address is generated correctly
@@ -392,7 +400,9 @@ page.open(url, function(status) {
392 $(".phrase").val("abandon abandon ability"); 400 $(".phrase").val("abandon abandon ability");
393 $(".phrase").trigger("input"); 401 $(".phrase").trigger("input");
394 $(".network option[selected]").removeAttr("selected"); 402 $(".network option[selected]").removeAttr("selected");
395 $(".network option[value=5]").prop("selected", true); 403 $(".network option").filter(function() {
404 return $(this).html() == "ShadowCash Testnet";
405 }).prop("selected", true);
396 $(".network").trigger("change"); 406 $(".network").trigger("change");
397 }); 407 });
398 // check the address is generated correctly 408 // check the address is generated correctly
@@ -420,7 +430,9 @@ page.open(url, function(status) {
420 $(".phrase").val("abandon abandon ability"); 430 $(".phrase").val("abandon abandon ability");
421 $(".phrase").trigger("input"); 431 $(".phrase").trigger("input");
422 $(".network option[selected]").removeAttr("selected"); 432 $(".network option[selected]").removeAttr("selected");
423 $(".network option[value=6]").prop("selected", true); 433 $(".network option").filter(function() {
434 return $(this).html() == "Viacoin";
435 }).prop("selected", true);
424 $(".network").trigger("change"); 436 $(".network").trigger("change");
425 }); 437 });
426 // check the address is generated correctly 438 // check the address is generated correctly
@@ -448,7 +460,9 @@ page.open(url, function(status) {
448 $(".phrase").val("abandon abandon ability"); 460 $(".phrase").val("abandon abandon ability");
449 $(".phrase").trigger("input"); 461 $(".phrase").trigger("input");
450 $(".network option[selected]").removeAttr("selected"); 462 $(".network option[selected]").removeAttr("selected");
451 $(".network option[value=7]").prop("selected", true); 463 $(".network option").filter(function() {
464 return $(this).html() == "Viacoin Testnet";
465 }).prop("selected", true);
452 $(".network").trigger("change"); 466 $(".network").trigger("change");
453 }); 467 });
454 // check the address is generated correctly 468 // check the address is generated correctly
@@ -476,7 +490,9 @@ page.open(url, function(status) {
476 $(".phrase").val("abandon abandon ability"); 490 $(".phrase").val("abandon abandon ability");
477 $(".phrase").trigger("input"); 491 $(".phrase").trigger("input");
478 $(".network option[selected]").removeAttr("selected"); 492 $(".network option[selected]").removeAttr("selected");
479 $(".network option[value=8]").prop("selected", true); 493 $(".network option").filter(function() {
494 return $(this).html() == "Jumbucks";
495 }).prop("selected", true);
480 $(".network").trigger("change"); 496 $(".network").trigger("change");
481 }); 497 });
482 // check the address is generated correctly 498 // check the address is generated correctly
@@ -504,7 +520,9 @@ page.open(url, function(status) {
504 $(".phrase").val("abandon abandon ability"); 520 $(".phrase").val("abandon abandon ability");
505 $(".phrase").trigger("input"); 521 $(".phrase").trigger("input");
506 $(".network option[selected]").removeAttr("selected"); 522 $(".network option[selected]").removeAttr("selected");
507 $(".network option[value=9]").prop("selected", true); 523 $(".network option").filter(function() {
524 return $(this).html() == "CLAM";
525 }).prop("selected", true);
508 $(".network").trigger("change"); 526 $(".network").trigger("change");
509 }); 527 });
510 // check the address is generated correctly 528 // check the address is generated correctly
@@ -532,7 +550,9 @@ page.open(url, function(status) {
532 $(".phrase").val("abandon abandon ability"); 550 $(".phrase").val("abandon abandon ability");
533 $(".phrase").trigger("input"); 551 $(".phrase").trigger("input");
534 $(".network option[selected]").removeAttr("selected"); 552 $(".network option[selected]").removeAttr("selected");
535 $(".network option[value=10]").prop("selected", true); 553 $(".network option").filter(function() {
554 return $(this).html() == "DASH";
555 }).prop("selected", true);
536 $(".network").trigger("change"); 556 $(".network").trigger("change");
537 }); 557 });
538 // check the address is generated correctly 558 // check the address is generated correctly
@@ -560,7 +580,9 @@ page.open(url, function(status) {
560 $(".phrase").val("abandon abandon ability"); 580 $(".phrase").val("abandon abandon ability");
561 $(".phrase").trigger("input"); 581 $(".phrase").trigger("input");
562 $(".network option[selected]").removeAttr("selected"); 582 $(".network option[selected]").removeAttr("selected");
563 $(".network option[value=11]").prop("selected", true); 583 $(".network option").filter(function() {
584 return $(this).html() == "Namecoin";
585 }).prop("selected", true);
564 $(".network").trigger("change"); 586 $(".network").trigger("change");
565 }); 587 });
566 // check the address is generated correctly 588 // check the address is generated correctly
@@ -588,7 +610,9 @@ page.open(url, function(status) {
588 $(".phrase").val("abandon abandon ability"); 610 $(".phrase").val("abandon abandon ability");
589 $(".phrase").trigger("input"); 611 $(".phrase").trigger("input");
590 $(".network option[selected]").removeAttr("selected"); 612 $(".network option[selected]").removeAttr("selected");
591 $(".network option[value=12]").prop("selected", true); 613 $(".network option").filter(function() {
614 return $(this).html() == "Peercoin";
615 }).prop("selected", true);
592 $(".network").trigger("change"); 616 $(".network").trigger("change");
593 }); 617 });
594 // check the address is generated correctly 618 // check the address is generated correctly
@@ -617,7 +641,9 @@ page.open(url, function(status) {
617 $(".phrase").val("abandon abandon ability"); 641 $(".phrase").val("abandon abandon ability");
618 $(".phrase").trigger("input"); 642 $(".phrase").trigger("input");
619 $(".network option[selected]").removeAttr("selected"); 643 $(".network option[selected]").removeAttr("selected");
620 $(".network option[value=13]").prop("selected", true); 644 $(".network option").filter(function() {
645 return $(this).html() == "Ethereum";
646 }).prop("selected", true);
621 $(".network").trigger("change"); 647 $(".network").trigger("change");
622 }); 648 });
623 waitForGenerate(function() { 649 waitForGenerate(function() {
@@ -1838,7 +1864,10 @@ page.open(url, function(status) {
1838 waitForGenerate(function() { 1864 waitForGenerate(function() {
1839 // 4) switch from bitcoin to litecoin 1865 // 4) switch from bitcoin to litecoin
1840 page.evaluate(function() { 1866 page.evaluate(function() {
1841 $(".network").val("2").trigger("change"); 1867 $(".network option").filter(function() {
1868 return $(this).html() == "Litecoin";
1869 }).prop("selected", true);
1870 $(".network").trigger("change");
1842 }); 1871 });
1843 waitForGenerate(function() { 1872 waitForGenerate(function() {
1844 // 5) Check derivation path is displayed correctly 1873 // 5) Check derivation path is displayed correctly
@@ -1881,7 +1910,10 @@ page.open(url, function(status) {
1881 waitForGenerate(function() { 1910 waitForGenerate(function() {
1882 // switch from bitcoin to clam 1911 // switch from bitcoin to clam
1883 page.evaluate(function() { 1912 page.evaluate(function() {
1884 $(".network").val("9").trigger("change"); 1913 $(".network option").filter(function() {
1914 return $(this).html() == "CLAM";
1915 }).prop("selected", true);
1916 $(".network").trigger("change");
1885 }); 1917 });
1886 waitForGenerate(function() { 1918 waitForGenerate(function() {
1887 // check derivation path is displayed correctly 1919 // check derivation path is displayed correctly
@@ -1912,7 +1944,10 @@ page.open(url, function(status) {
1912 waitForGenerate(function() { 1944 waitForGenerate(function() {
1913 // 4) switch from bitcoin to viacoin 1945 // 4) switch from bitcoin to viacoin
1914 page.evaluate(function() { 1946 page.evaluate(function() {
1915 $(".network").val("6").trigger("change"); 1947 $(".network option").filter(function() {
1948 return $(this).html() == "Viacoin";
1949 }).prop("selected", true);
1950 $(".network").trigger("change");
1916 }); 1951 });
1917 waitForGenerate(function() { 1952 waitForGenerate(function() {
1918 // 5) ensure the derived address is correct 1953 // 5) ensure the derived address is correct