]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blame - tests/spec/tests.js
Add rebranded labelling to Zcoin/Firo
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / tests / spec / tests.js
CommitLineData
0460b53f
IC
1// Usage:
2// cd /path/to/repo/tests
3// jasmine spec/tests.js
4//
5// Dependencies:
6// nodejs
7// selenium
8// jasmine
9// see https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode#Automated_testing_with_headless_mode
10
11// USER SPECIFIED OPTIONS
12var browser = process.env.BROWSER; //"firefox"; // or "chrome"
13if (!browser) {
14 console.log("Browser can be set via environment variable, eg");
15 console.log("BROWSER=firefox jasmine spec/tests.js");
16 console.log("Options for BROWSER are firefox chrome");
17 console.log("Using default browser: chrome");
18 browser = "chrome";
19}
20else {
21 console.log("Using browser: " + browser);
22}
23
24// Globals
25
26var webdriver = require('selenium-webdriver');
27var By = webdriver.By;
28var Key = webdriver.Key;
29var until = webdriver.until;
30var newDriver = null;
31var driver = null;
32// Delays in ms
9fae1ffb 33var generateDelay = 1500;
0460b53f
IC
34var feedbackDelay = 500;
35var entropyFeedbackDelay = 500;
e21e32da 36var bip38delay = 15000;
0460b53f
IC
37
38// url uses file:// scheme
39var path = require('path')
40var parentDir = path.resolve(process.cwd(), '..', 'src', 'index.html');
41var url = "file://" + parentDir;
42if (browser == "firefox") {
43 // TODO loading local html in firefox is broken
44 console.log("Loading local html in firefox is broken, see https://stackoverflow.com/q/46367054");
45 console.log("You must run a server in this case, ie do this:");
46 console.log("$ cd /path/to/bip39/src");
47 console.log("$ python -m http.server");
48 url = "http://localhost:8000";
49}
50
51// Variables dependent on specific browser selection
52
53if (browser == "firefox") {
54 var firefox = require('selenium-webdriver/firefox');
55 var binary = new firefox.Binary(firefox.Channel.NIGHTLY);
56 binary.addArguments("-headless");
57 newDriver = function() {
58 return new webdriver.Builder()
59 .forBrowser('firefox')
60 .setFirefoxOptions(new firefox.Options().setBinary(binary))
61 .build();
62 }
63}
64else if (browser == "chrome") {
65 var chrome = require('selenium-webdriver/chrome');
66 newDriver = function() {
67 return new webdriver.Builder()
68 .forBrowser('chrome')
69 .setChromeOptions(new chrome.Options().addArguments("headless"))
70 .build();
71 }
72}
73
74// Helper functions
75
1dafc30d 76function testNetwork(done, params) {
0460b53f
IC
77 var phrase = params.phrase || 'abandon abandon ability';
78 driver.findElement(By.css('.phrase'))
79 .sendKeys(phrase);
80 selectNetwork(params.selectText);
81 driver.sleep(generateDelay).then(function() {
0ae59396 82 getFirstAddress(function(address) {
1dafc30d
IC
83 getFirstPublicKey(function(pubkey) {
84 getFirstPrivateKey(function(privkey) {
85 if ("firstAddress" in params) {
86 expect(address).toBe(params.firstAddress);
87 }
88 if ("firstPubKey" in params) {
89 expect(pubkey).toBe(params.firstPubKey);
90 }
91 if ("firstPrivKey" in params) {
92 expect(privkey).toBe(params.firstPrivKey);
93 }
94 done();
95 });
96 });
0ae59396 97 });
0460b53f
IC
98 });
99}
100
101function getFirstRowValue(handler, selector) {
102 driver.findElements(By.css(selector))
103 .then(function(els) {
104 els[0].getText()
105 .then(handler);
106 })
107}
108
109function getFirstAddress(handler) {
110 getFirstRowValue(handler, ".address");
111}
112
0ae59396
JU
113function getFirstPublicKey(handler) {
114 getFirstRowValue(handler, ".pubkey");
115}
116
1dafc30d
IC
117function getFirstPrivateKey(handler) {
118 getFirstRowValue(handler, ".privkey");
119}
120
0460b53f
IC
121function getFirstPath(handler) {
122 getFirstRowValue(handler, ".index");
123}
124
125function testColumnValuesAreInvisible(done, columnClassName) {
126 var selector = "." + columnClassName + " span";
127 driver.findElements(By.css(selector))
128 .then(function(els) {
129 els[0].getAttribute("class")
130 .then(function(classes) {
131 expect(classes).toContain("invisible");
132 done();
133 });
134 })
135}
136
137function testRowsAreInCorrectOrder(done) {
138 driver.findElements(By.css('.index'))
139 .then(function(els) {
140 var testRowAtIndex = function(i) {
141 if (i >= els.length) {
142 done();
143 }
144 else {
145 els[i].getText()
146 .then(function(actualPath) {
147 var noHardened = actualPath.replace(/'/g, "");
148 var pathBits = noHardened.split("/")
149 var lastBit = pathBits[pathBits.length-1];
150 var actualIndex = parseInt(lastBit);
151 expect(actualIndex).toBe(i);
152 testRowAtIndex(i+1);
153 });
154 }
155 }
156 testRowAtIndex(0);
157 });
158}
159
160function selectNetwork(name) {
161 driver.executeScript(function() {
162 var selectText = arguments[0];
163 $(".network option[selected]").removeAttr("selected");
164 $(".network option").filter(function(i,e) {
165 return $(e).html() == selectText;
166 }).prop("selected", true);
167 $(".network").trigger("change");
168 }, name);
169}
170
171function testEntropyType(done, entropyText, entropyTypeUnsafe) {
172 // entropy type is compiled into regexp so needs escaping
173 // see https://stackoverflow.com/a/2593661
174 var entropyType = (entropyTypeUnsafe+'').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
175 driver.findElement(By.css('.use-entropy'))
176 .click();
177 driver.findElement(By.css('.entropy'))
178 .sendKeys(entropyText);
179 driver.sleep(generateDelay).then(function() {
180 driver.findElement(By.css('.entropy-container'))
181 .getText()
182 .then(function(text) {
183 var re = new RegExp("Entropy Type\\s+" + entropyType);
184 expect(text).toMatch(re);
185 done();
186 });
187 });
188}
189
190function testEntropyBits(done, entropyText, entropyBits) {
191 driver.findElement(By.css('.use-entropy'))
192 .click();
193 driver.findElement(By.css('.entropy'))
194 .sendKeys(entropyText);
195 driver.sleep(generateDelay).then(function() {
196 driver.findElement(By.css('.entropy-container'))
197 .getText()
198 .then(function(text) {
199 var re = new RegExp("Total Bits\\s+" + entropyBits);
200 expect(text).toMatch(re);
201 done();
202 });
203 });
204}
205
206function testEntropyFeedback(done, entropyDetail) {
207 // entropy type is compiled into regexp so needs escaping
208 // see https://stackoverflow.com/a/2593661
209 if ("type" in entropyDetail) {
210 entropyDetail.type = (entropyDetail.type+'').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
211 }
212 driver.findElement(By.css('.use-entropy'))
213 .click();
214 driver.findElement(By.css('.entropy'))
215 .sendKeys(entropyDetail.entropy);
216 driver.sleep(entropyFeedbackDelay).then(function() {
217 driver.findElement(By.css('.entropy-container'))
218 .getText()
219 .then(function(text) {
220 driver.findElement(By.css('.phrase'))
221 .getAttribute("value")
222 .then(function(phrase) {
223 if ("filtered" in entropyDetail) {
224 var key = "Filtered Entropy";
225 var value = entropyDetail.filtered;
226 var reText = key + "\\s+" + value;
227 var re = new RegExp(reText);
228 expect(text).toMatch(re);
229 }
230 if ("type" in entropyDetail) {
231 var key = "Entropy Type";
232 var value = entropyDetail.type;
233 var reText = key + "\\s+" + value;
234 var re = new RegExp(reText);
235 expect(text).toMatch(re);
236 }
237 if ("events" in entropyDetail) {
238 var key = "Event Count";
239 var value = entropyDetail.events;
240 var reText = key + "\\s+" + value;
241 var re = new RegExp(reText);
242 expect(text).toMatch(re);
243 }
244 if ("bits" in entropyDetail) {
245 var key = "Total Bits";
246 var value = entropyDetail.bits;
247 var reText = key + "\\s+" + value;
248 var re = new RegExp(reText);
249 expect(text).toMatch(re);
250 }
251 if ("bitsPerEvent" in entropyDetail) {
252 var key = "Bits Per Event";
253 var value = entropyDetail.bitsPerEvent;
254 var reText = key + "\\s+" + value;
255 var re = new RegExp(reText);
256 expect(text).toMatch(re);
257 }
258 if ("words" in entropyDetail) {
259 var actualWords = phrase.split(/\s+/)
260 .filter(function(w) { return w.length > 0 })
261 .length;
262 expect(actualWords).toBe(entropyDetail.words);
263 }
264 if ("strength" in entropyDetail) {
265 var key = "Time To Crack";
266 var value = entropyDetail.strength;
267 var reText = key + "\\s+" + value;
268 var re = new RegExp(reText);
269 expect(text).toMatch(re);
270 }
271 done();
272 });
273 });
274 });
275}
276
277function testClientSelect(done, params) {
278 // set mnemonic and select bip32 tab
279 driver.findElement(By.css('#bip32-tab a'))
280 .click()
281 driver.findElement(By.css('.phrase'))
282 .sendKeys("abandon abandon ability");
283 driver.sleep(generateDelay).then(function() {
284 // BITCOIN CORE
285 // set bip32 client to bitcoin core
286 driver.executeScript(function() {
287 $("#bip32-client").val(arguments[0]).trigger("change");
288 }, params.selectValue);
289 driver.sleep(generateDelay).then(function() {
290 // check the derivation path is correct
291 driver.findElement(By.css("#bip32-path"))
292 .getAttribute("value")
293 .then(function(path) {
294 expect(path).toBe(params.bip32path);
295 // check hardened addresses is selected
296 driver.findElement(By.css(".hardened-addresses"))
297 .getAttribute("checked")
298 .then(function(isChecked) {
299 expect(isChecked).toBe(params.useHardenedAddresses);
300 // check input is readonly
301 driver.findElement(By.css("#bip32-path"))
302 .getAttribute("readonly")
303 .then(function(isReadonly) {
304 expect(isReadonly).toBe("true");
305 done();
306 });
307 });
308 });
309 });
310 });
311}
312
313// Tests
314
315describe('BIP39 Tool Tests', function() {
316
317 beforeEach(function(done) {
318 driver = newDriver();
d2f5d28e 319 driver.get(url).then(done);
0460b53f
IC
320 });
321
322 // Close the website after each test is run (so that it is opened fresh each time)
323 afterEach(function(done) {
324 driver.quit().then(done);
325 });
326
327// BEGIN TESTS
328
329// Page initially loads with blank phrase
330it('Should load the page', function(done) {
331 driver.findElement(By.css('.phrase'))
332 .getAttribute('value').then(function(value) {
333 expect(value).toBe('');
334 done();
335 });
336});
337
338// Page has text
339it('Should have text on the page', function(done) {
340 driver.findElement(By.css('body'))
341 .getText()
342 .then(function(text) {
343 var textToFind = "You can enter an existing BIP39 mnemonic";
344 expect(text).toContain(textToFind);
345 done();
346 });
347});
348
349// Entering mnemonic generates addresses
350it('Should have a list of addresses', function(done) {
351 driver.findElement(By.css('.phrase'))
352 .sendKeys('abandon abandon ability');
353 driver.sleep(generateDelay).then(function() {
354 driver.findElements(By.css('.address'))
355 .then(function(els) {
356 expect(els.length).toBe(20);
357 done();
358 })
359 });
360});
361
362// Generate button generates random mnemonic
363it('Should be able to generate a random mnemonic', function(done) {
364 // initial phrase is blank
365 driver.findElement(By.css('.phrase'))
366 .getAttribute("value")
367 .then(function(phrase) {
368 expect(phrase.length).toBe(0);
369 // press generate
370 driver.findElement(By.css('.generate')).click();
371 driver.sleep(generateDelay).then(function() {
372 // new phrase is not blank
373 driver.findElement(By.css('.phrase'))
374 .getAttribute("value")
375 .then(function(phrase) {
376 expect(phrase.length).toBeGreaterThan(0);
377 done();
378 });
379 });
380 });
381});
382
383// Mnemonic length can be customized
384it('Should allow custom length mnemonics', function(done) {
385 // set strength to 6
386 driver.executeScript(function() {
387 $(".strength option[selected]").removeAttr("selected");
388 $(".strength option[value=6]").prop("selected", true);
389 });
390 driver.findElement(By.css('.generate')).click();
391 driver.sleep(generateDelay).then(function() {
392 driver.findElement(By.css('.phrase'))
393 .getAttribute("value")
394 .then(function(phrase) {
395 var words = phrase.split(" ");
396 expect(words.length).toBe(6);
397 done();
398 });
399 });
400});
401
402// Passphrase can be set
403it('Allows a passphrase to be set', function(done) {
404 driver.findElement(By.css('.phrase'))
405 .sendKeys('abandon abandon ability');
406 driver.findElement(By.css('.passphrase'))
407 .sendKeys('secure_passphrase');
408 driver.sleep(generateDelay).then(function() {
409 getFirstAddress(function(address) {
410 expect(address).toBe("15pJzUWPGzR7avffV9nY5by4PSgSKG9rba");
411 done();
412 })
413 });
414});
415
416// Network can be set to networks other than bitcoin
417it('Allows selection of bitcoin testnet', function(done) {
418 var params = {
419 selectText: "BTC - Bitcoin Testnet",
1dafc30d 420 phrase: "abandon abandon ability",
0460b53f 421 firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi",
1dafc30d
IC
422 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
423 firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx",
0460b53f
IC
424 };
425 testNetwork(done, params);
426});
f1224201
IC
427it('Allows selection of bitcoin regtest', function(done) {
428 var params = {
429 selectText: "BTC - Bitcoin RegTest",
1dafc30d 430 phrase: "abandon abandon ability",
f1224201 431 firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi",
1dafc30d
IC
432 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
433 firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx",
f1224201
IC
434 };
435 testNetwork(done, params);
436});
0460b53f
IC
437it('Allows selection of litecoin', function(done) {
438 var params = {
439 selectText: "LTC - Litecoin",
1dafc30d 440 phrase: "abandon abandon ability",
0460b53f 441 firstAddress: "LQ4XU8RX2ULPmPq9FcUHdVmPVchP9nwXdn",
1dafc30d
IC
442 firstPubKey: "028e27f074a8f4b85c07f944330bd59ec1b2dd7f88bb28182720cab6d2a5a5ff30",
443 firstPrivKey: "T9ShR6Z2vyEMHVgpeoif857LdMUZDKvzux3QMvD4EjpPYUV5TuEx",
0460b53f
IC
444 };
445 testNetwork(done, params);
446});
b85da074
PD
447it('Allows selection of litecoin testnet', function(done) {
448 var params = {
449 selectText: "LTCt - Litecoin Testnet",
1dafc30d 450 phrase: "abandon abandon ability",
b85da074 451 firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi",
1dafc30d
IC
452 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
453 firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx",
b85da074
PD
454 };
455 testNetwork(done, params);
456});
0460b53f
IC
457it('Allows selection of ripple', function(done) {
458 var params = {
459 selectText: "XRP - Ripple",
0460b53f 460 phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
1dafc30d
IC
461 firstAddress: "rLTFnqbmCVPGx6VfaygdtuKWJgcN4v1zRS",
462 firstPubKey: "0393ebfc2f75dd5757456a7ff7b907571693c9e3807ea386be68688b9c5fac072e",
463 firstPrivKey: "a869f16215c3cd7b6c5f448344bc8688cba70b734bbe189b2c48098a2c15dd53",
0460b53f
IC
464 };
465 testNetwork(done, params);
466});
f3101bd3
LL
467it('Allows selection of jingtum', function(done) {
468 var params = {
469 selectText: "SWTC - Jingtum",
470 phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
471 firstAddress: "jffSYWyxcr9t6DHHdAj2yUXrCsioU66xjm",
472 firstPubKey: "029dfcb278148874dd7e7109001593d7f410909e7bbcbcc3cc19ecb476c8bf8d84",
473 firstPrivKey: "02bdfe14bdd75514e714db7b8cbbae87b2ab8d7a050c3e441d687b7c4ef17d1f",
474 };
475 testNetwork(done, params);
476});
45e40c28
C
477it('Allows selection of casinocoin', function(done) {
478 var params = {
479 selectText: "CSC - CasinoCoin",
45e40c28 480 phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
1dafc30d
IC
481 firstAddress: "c3P5EUb27Pzk9dcGt4s7zQDQj4sC6Y81mT",
482 firstPubKey: "038ca5b4ff9d58059423b5a03deb2a9b755a311e97dc36ae8ab3d4ed93c808daf7",
483 firstPrivKey: "127fa93d8e4f434ce76faebc961df7ec081a68de19e96f36d38766e468b35920",
45e40c28
C
484 };
485 testNetwork(done, params);
0460b53f
IC
486});
487it('Allows selection of dogecoin', function(done) {
488 var params = {
489 selectText: "DOGE - Dogecoin",
1dafc30d 490 phrase: "abandon abandon ability",
0460b53f 491 firstAddress: "DPQH2AtuzkVSG6ovjKk4jbUmZ6iXLpgbJA",
1dafc30d
IC
492 firstPubKey: "02d3d540cc62d5102887d26f2b129947f2bd2306dd9b76242c61ca65e5ca408899",
493 firstPrivKey: "QNv5TAoR6EodkN86FXaLDosy4Rau4sJ46JxE9NtUYtmKPLTuRmpc",
0460b53f
IC
494 };
495 testNetwork(done, params);
496});
b85da074
PD
497it('Allows selection of dogecoin testnet', function(done) {
498 var params = {
b244e344 499 selectText: "DOGEt - Dogecoin Testnet",
1dafc30d 500 phrase: "abandon abandon ability",
b85da074 501 firstAddress: "niHnSJKHdwDyDxRMLBJrtNqpvHEsAFWe6B",
1dafc30d
IC
502 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
503 firstPrivKey: "cnCsx3G1NgXZGhijCRNupM1tts1aDNnQsr9e5jB5JnYv2yEDTwT5",
b85da074
PD
504 };
505 testNetwork(done, params);
506});
40209fd8 507it('Allows selection of denarius', function(done) {
508 var params = {
509 selectText: "DNR - Denarius",
1dafc30d 510 phrase: "abandon abandon ability",
50289881 511 firstAddress: "DFdFMVUMzU9xX88EywXvAGwjiwpxyh9vKb",
1dafc30d
IC
512 firstPubKey: "0285cda45afbf0b8897a5cedf97cbb1e2b63b0ac28cd1e919ea60fb748bc61e8d5",
513 firstPrivKey: "QX3Dy3b7C3vNWYDBPk8Hewp3ii2NukAopsHFCCsLZ6Ss77vzdoMj",
40209fd8 514 };
515 testNetwork(done, params);
516});
0460b53f
IC
517it('Allows selection of shadowcash', function(done) {
518 var params = {
519 selectText: "SDC - ShadowCash",
1dafc30d 520 phrase: "abandon abandon ability",
0460b53f 521 firstAddress: "SiSZtfYAXEFvMm3XM8hmtkGDyViRwErtCG",
1dafc30d
IC
522 firstPubKey: "024d48659b83ff20fc250e7f111742e652aa71b73f3ff8d41b5f3ea99cb8ef9e3c",
523 firstPrivKey: "VJzJ98j5pdjzpY9DVRvU2RiRcvQ4t2oYYd9w9WUdiUJjvPs9X83v",
0460b53f
IC
524 };
525 testNetwork(done, params);
526});
527it('Allows selection of shadowcash testnet', function(done) {
528 var params = {
529 selectText: "SDC - ShadowCash Testnet",
1dafc30d 530 phrase: "abandon abandon ability",
0460b53f 531 firstAddress: "tM2EDpVKaTiEg2NZg3yKg8eqjLr55BErHe",
1dafc30d
IC
532 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
533 firstPrivKey: "erKhxJJbpqMUuwuUwUuQxnLiNwphuEabA2sTv62QBV6syc1coTeS",
0460b53f
IC
534 };
535 testNetwork(done, params);
536});
537it('Allows selection of viacoin', function(done) {
538 var params = {
539 selectText: "VIA - Viacoin",
1dafc30d 540 phrase: "abandon abandon ability",
0460b53f 541 firstAddress: "Vq9Eq4N5SQnjqZvxtxzo7hZPW5XnyJsmXT",
1dafc30d
IC
542 firstPubKey: "0223abcae630e23afd7ce0dc399906ca00f984b3be475fbf3f3995e708b0b75392",
543 firstPrivKey: "WX5sbp26uyFDa4Bt5DgPqvQuRjrwc95DYzG7ZHXsdtooFAUhd3xV",
0460b53f
IC
544 };
545 testNetwork(done, params);
546});
547it('Allows selection of viacoin testnet', function(done) {
548 var params = {
549 selectText: "VIA - Viacoin Testnet",
1dafc30d 550 phrase: "abandon abandon ability",
0460b53f 551 firstAddress: "tM2EDpVKaTiEg2NZg3yKg8eqjLr55BErHe",
1dafc30d
IC
552 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
553 firstPrivKey: "erKhxJJbpqMUuwuUwUuQxnLiNwphuEabA2sTv62QBV6syc1coTeS",
0460b53f
IC
554 };
555 testNetwork(done, params);
556});
557it('Allows selection of jumbucks', function(done) {
558 var params = {
559 selectText: "JBS - Jumbucks",
1dafc30d 560 phrase: "abandon abandon ability",
0460b53f 561 firstAddress: "JLEXccwDXADK4RxBPkRez7mqsHVoJBEUew",
1dafc30d
IC
562 firstPubKey: "02e9e84c68e2247d87c863f5697676af9c0f2dacc3fe774a24188f37311b679059",
563 firstPrivKey: "SPcmbuyWp5ukQLbnDyaVr8WuPfmLUEVZN9e2r7X96i31twrn8BBQ",
0460b53f
IC
564 };
565 testNetwork(done, params);
566});
567it('Allows selection of clam', function(done) {
568 var params = {
569 selectText: "CLAM - Clams",
1dafc30d 570 phrase: "abandon abandon ability",
0460b53f 571 firstAddress: "xCp4sakjVx4pUAZ6cBCtuin8Ddb6U1sk9y",
1dafc30d
IC
572 firstPubKey: "03f6189ef4ae7f15ead1a579201c63845cf3efc4745d6abf58aa5584163b2dd070",
573 firstPrivKey: "LoqdpeyYzFoGqQag6Ya4BkMT9KQJK1ygQFbKj3x2meaWe6Xzen15",
0460b53f
IC
574 };
575 testNetwork(done, params);
576});
bf13c95f
PC
577it('Allows selection of crown', function(done) {
578 var params = {
579 selectText: "CRW - Crown (Legacy)",
1dafc30d 580 phrase: "abandon abandon ability",
b85da074 581 firstAddress: "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5",
1dafc30d
IC
582 firstPubKey: "034246d561c53eb1a2afbd9df6403d6fd8a70b36016e0307eae28095a465eaa602",
583 firstPrivKey: "L2oSEFimb9QJB38eGD1xL8zKZAa1cTYGFGXMi4yJBqKmYvpjcuJs",
bf13c95f
PC
584 };
585 testNetwork(done, params);
586});
0460b53f
IC
587it('Allows selection of crown', function(done) {
588 var params = {
589 selectText: "CRW - Crown",
1dafc30d 590 phrase: "abandon abandon ability",
bf13c95f 591 firstAddress: "CRWKnVmVhvH1KWTYe6sq8xV4dFGcFpBEEkPQ",
1dafc30d
IC
592 firstPubKey: "034246d561c53eb1a2afbd9df6403d6fd8a70b36016e0307eae28095a465eaa602",
593 firstPrivKey: "L2oSEFimb9QJB38eGD1xL8zKZAa1cTYGFGXMi4yJBqKmYvpjcuJs",
0460b53f
IC
594 };
595 testNetwork(done, params);
596});
597it('Allows selection of dash', function(done) {
598 var params = {
599 selectText: "DASH - Dash",
1dafc30d 600 phrase: "abandon abandon ability",
0460b53f 601 firstAddress: "XdbhtMuGsPSkE6bPdNTHoFSszQKmK4S5LT",
1dafc30d
IC
602 firstPubKey: "0270009f37337f15603103ce90111f32f44ddd87525017a93ec6170abb784be2ff",
603 firstPrivKey: "XGqEiiVo1w6Us3YN8KRthyLxdnBH1W6JpLkcxoX2w2zQMYFDKSua",
0460b53f
IC
604 };
605 testNetwork(done, params);
606});
607it('Allows selection of dash testnet', function(done) {
608 var params = {
609 selectText: "DASH - Dash Testnet",
1dafc30d 610 phrase: "abandon abandon ability",
0460b53f 611 firstAddress: "yaR52EN4oojdJfBgzWJTymC4uuCLPT29Gw",
1dafc30d
IC
612 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
613 firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx",
0460b53f
IC
614 };
615 testNetwork(done, params);
616});
617it('Allows selection of game', function(done) {
618 var params = {
619 selectText: "GAME - GameCredits",
1dafc30d 620 phrase: "abandon abandon ability",
0460b53f 621 firstAddress: "GSMY9bAp36cMR4zyT4uGVS7GFjpdXbao5Q",
1dafc30d
IC
622 firstPubKey: "03d173ea00b6688f7d7c2afdcbc720b227aa8b9b87e5f7145139acaa9f0a0dc447",
623 firstPrivKey: "Raixm9wAKFjw9rnPKcXkymQ5iEdMZBRdrvjm8zLpqacS7LUeXBwZ",
0460b53f
IC
624 };
625 testNetwork(done, params);
626});
91eb2cbc 627it('Allows selection of komodo', function(done) {
aab3645f 628 var params = {
629 selectText: "KMD - Komodo",
1dafc30d 630 phrase: "abandon abandon ability",
5c1003dd 631 firstAddress: "RMPPzJwAjPVZZAwJvXivHJGGjdCx6WBD2t",
1dafc30d
IC
632 firstPubKey: "03bd652582a446ce9a697e74da9429eabe6e70bbe3d300b9ef227df7430e83b6fc",
633 firstPrivKey: "UxHzU8KCfSDrQgreujv1vGrqpbvx5jrjSz7bNWjWoT7D3V4uWo4i",
aab3645f 634 };
635 testNetwork(done, params);
636});
0460b53f
IC
637it('Allows selection of namecoin', function(done) {
638 var params = {
639 selectText: "NMC - Namecoin",
1dafc30d 640 phrase: "abandon abandon ability",
0460b53f 641 firstAddress: "Mw2vK2Bvex1yYtYF6sfbEg2YGoUc98YUD2",
1dafc30d
IC
642 firstPubKey: "0398066486fe87cbcb9da8e29d180b44937b6c43ad1ec4d3bddd77b7905765937e",
643 firstPrivKey: "L4A8sSkrGndiXyZdj6Fnju8Wu76s96cdHHmPxV3C5M2R2w4GVNco",
0460b53f
IC
644 };
645 testNetwork(done, params);
646});
c51bb4f9
IC
647it('Allows selection of onixcoin', function(done) {
648 var params = {
649 selectText: "ONX - Onixcoin",
1dafc30d 650 phrase: "abandon abandon ability",
c51bb4f9 651 firstAddress: "XGwMqddeKjT3ddgX73QokjVbCL3aK6Yxfk",
1dafc30d
IC
652 firstPubKey: "035349f2912e3290898d6e00807704254f256127e59a2930367c403b3b9ae5afbd",
653 firstPrivKey: "X8hzuyWvi2F6UQQ5MNiQo2taYwKwZvJRurTBV6smahx2ikLksLPm",
c51bb4f9
IC
654 };
655 testNetwork(done, params);
656});
ae27549b
JLEP
657it('Allows selection of lkrcoin', function(done) {
658 var params = {
659 selectText: "LKR - Lkrcoin",
1dafc30d 660 phrase: "abandon abandon ability",
ae27549b 661 firstAddress: "LfbT296e7AEEnn4bYDbL535Nd8P9g98CdJ",
1dafc30d
IC
662 firstPubKey: "03328d3800456372224ec54b033ace88bfd4c19a684204147404063839a02ab7e8",
663 firstPrivKey: "TANp1xRA3qCdRfZc8THM8HMKZivevNz8BEXmA8YxemqXj1YzHmDS",
ae27549b
JLEP
664 };
665 testNetwork(done, params);
666});
3e7b1ac9
JLE
667it('Allows selection of bolivarcoin', function(done) {
668 var params = {
669 selectText: "BOLI - Bolivarcoin",
1dafc30d 670 phrase: "abandon abandon ability",
575ee4de 671 firstAddress: "bbKzCAUR7hZ3nqfffy7VgrSz8LmAP3S5mK",
1dafc30d
IC
672 firstPubKey: "0328a72574c709cc183ffccb8f17c0383caf937ce67e7c3411cdf8ca2e5fc2bf8f",
673 firstPrivKey: "YYwA99QgwZu9zNJBxYbG43GzeE8kEREb7S1dpnFcBJG1W5sR1W9T",
3e7b1ac9
JLE
674 };
675 testNetwork(done, params);
676});
0460b53f
IC
677it('Allows selection of peercoin', function(done) {
678 var params = {
679 selectText: "PPC - Peercoin",
1dafc30d 680 phrase: "abandon abandon ability",
0460b53f 681 firstAddress: "PVAiioTaK2eDHSEo3tppT9AVdBYqxRTBAm",
1dafc30d
IC
682 firstPubKey: "02035b1d7f7683a03be1a6009c4572b24a3ba114afb8caff278881af77c4cba362",
683 firstPrivKey: "UCcQgeBjh7GpqukSRcXrx54Q41BJYkWY6PSdm6CtCUFYD5bS9qZS",
0460b53f
IC
684 };
685 testNetwork(done, params);
686});
687it('Allows selection of ethereum', function(done) {
688 var params = {
689 selectText: "ETH - Ethereum",
1dafc30d 690 phrase: "abandon abandon ability",
c394ec3c 691 firstAddress: "0xe5815d5902Ad612d49283DEdEc02100Bd44C2772",
1dafc30d
IC
692 firstPubKey: "0x03e723e5b3aa7d72213f01139aa4783e1b34f74e1a04534e3fd8e29bfe2768af8a",
693 firstPrivKey: "0x8f253078b73d7498302bb78c171b23ce7a8fb511987d2b2702b731638a4a15e7",
0460b53f
IC
694 };
695 testNetwork(done, params);
0460b53f
IC
696});
697it('Allows selection of slimcoin', function(done) {
698 var params = {
699 selectText: "SLM - Slimcoin",
1dafc30d 700 phrase: "abandon abandon ability",
0460b53f 701 firstAddress: "SNzPi1CafHFm3WWjRo43aMgiaEEj3ogjww",
1dafc30d
IC
702 firstPubKey: "020c3ab49a6de010d23ddf14dec67666d7ad46dafbae9841db7723bbb0044067cc",
703 firstPrivKey: "BTPTMvgoTgsAxpoQE4VCJAq5TYMnLbX5mDodFSaF7ceq6suK13pk",
0460b53f
IC
704 };
705 testNetwork(done, params);
706});
707it('Allows selection of slimcoin testnet', function(done) {
708 var params = {
709 selectText: "SLM - Slimcoin Testnet",
1dafc30d 710 phrase: "abandon abandon ability",
0460b53f 711 firstAddress: "n3nMgWufTek5QQAr6uwMhg5xbzj8xqc4Dq",
1dafc30d
IC
712 firstPubKey: "024557a9693da0354c5f77e57a0b2aac9c20b15cc322bec85faa2ec45438415c90",
713 firstPrivKey: "DvJeEkHzJzysYFtUdgETgWHprG63ATFWRtG2R9xfBJ6bZ2fHcJSU",
0460b53f
IC
714 };
715 testNetwork(done, params);
716});
717it('Allows selection of bitcoin cash', function(done) {
718 var params = {
719 selectText: "BCH - Bitcoin Cash",
1dafc30d 720 phrase: "abandon abandon ability",
e0f91e20 721 firstAddress: "bitcoincash:qzlquk7w4hkudxypl4fgv8x279r754dkvur7jpcsps",
1dafc30d
IC
722 firstPubKey: "02b1cbe8aba996d77d4c33fa2e3bf1f6ae80576aa587aa74d87092b1dbdf2aa067",
723 firstPrivKey: "KxbCheZjSzF48zyka4QK1ToSYmz3REZiePU6FPc99qqFs8WuHyVY",
0460b53f
IC
724 };
725 testNetwork(done, params);
726});
d0889ab9 727
728it('Allows selection of simpleledger(SLP)', function(done) {
729 var params = {
730 selectText: "SLP - Simple Ledger Protocol",
1dafc30d 731 phrase: "abandon abandon ability",
d0889ab9 732 firstAddress: "simpleledger:qrtffz6ajfsn74gpur7y3epjquz42pvww5acewqmre",
1dafc30d
IC
733 firstPubKey: "03c8310ef78a379ce91ed3d7998e1f356dbcb089869f9c9d8f8571b0d8414acbdc",
734 firstPrivKey: "L2q3Bvqe6kBRSqUaJpew7pLacnWjsJdUk7hwV1bTdDu665gXHDj6",
d0889ab9 735 };
736 testNetwork(done, params);
737});
738
0460b53f
IC
739it('Allows selection of myriadcoin', function(done) {
740 var params = {
741 selectText: "XMY - Myriadcoin",
1dafc30d 742 phrase: "abandon abandon ability",
0460b53f 743 firstAddress: "MJEswvRR46wh9BoiVj9DzKYMBkCramhoBV",
1dafc30d
IC
744 firstPubKey: "037ad798b3173b0af46acddd1501ed53ce654840f29e4710c3081134b1193f811b",
745 firstPrivKey: "TMMUiQ3yqes7wjWvCro1Ghbu7eFXm8wQgX89v4Wgxm5qFZJAVEVD",
0460b53f
IC
746 };
747 testNetwork(done, params);
748});
749it('Allows selection of pivx', function(done) {
750 var params = {
751 selectText: "PIVX - PIVX",
1dafc30d 752 phrase: "abandon abandon ability",
0460b53f 753 firstAddress: "DBxgT7faCuno7jmtKuu6KWCiwqsVPqh1tS",
1dafc30d
IC
754 firstPubKey: "022583478df6a5ac35380e7cdcd9f7ab0d43f5eb82452d4aa1f74f04c810fcde8c",
755 firstPrivKey: "YVdYDdkuTbra4EVRLWoBUCCm9WMLuXZy3ZpK6iDBCi13ttreZ4cD",
0460b53f
IC
756 };
757 testNetwork(done, params);
758});
759it('Allows selection of pivx testnet', function(done) {
760 var params = {
761 selectText: "PIVX - PIVX Testnet",
1dafc30d 762 phrase: "abandon abandon ability",
0460b53f 763 firstAddress: "yB5U384n6dGkVE3by5y9VdvHHPwPg68fQj",
1dafc30d
IC
764 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
765 firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx",
0460b53f
IC
766 };
767 testNetwork(done, params);
768});
769it('Allows selection of maza', function(done) {
770 var params = {
771 selectText: "MAZA - Maza",
1dafc30d 772 phrase: "abandon abandon ability",
0460b53f 773 firstAddress: "MGW4Bmi2NEm4PxSjgeFwhP9vg18JHoRnfw",
1dafc30d
IC
774 firstPubKey: "022b9d4376588a736d43301a659ef288302472aeff6344f5d8a5bfe376733e0da8",
775 firstPrivKey: "aH9R7KaHm6D3p44zDM2Vf6vY9x7bHVdaZGkBb2rHeXAZzEKnQ66G",
0460b53f
IC
776 };
777 testNetwork(done, params);
778});
7d4e4cbe 779it('Allows selection of FIX', function(done) {
780 var params = {
781 selectText: "FIX - FIX",
1dafc30d 782 phrase: "abandon abandon ability",
7d4e4cbe 783 firstAddress: "FS5MEU8fs5dUvsaSCSusV8RQtC8j2h3JEh",
1dafc30d
IC
784 firstPubKey: "026003e9a2bc6b9bd18bd7f8826cebbfd4d0554995141920eda2cb723ae53337ee",
785 firstPrivKey: "9uFsoZFuCUCMRF93aNKsLvYTX8jwYoKPbgENtdYURH1GCJvDNkps",
7d4e4cbe 786 };
787 testNetwork(done, params);
788});
789it('Allows selection of FIX testnet', function(done) {
790 var params = {
791 selectText: "FIX - FIX Testnet",
1dafc30d 792 phrase: "abandon abandon ability",
7d4e4cbe 793 firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa",
1dafc30d
IC
794 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
795 firstPrivKey: "cBtMfPpQg4s1Ndfez7oLdedwu8CxshhWE5f7qunhLsY4ueNvKKyM",
7d4e4cbe 796 };
797 testNetwork(done, params);
798});
0460b53f
IC
799it('Allows selection of fujicoin', function(done) {
800 var params = {
801 selectText: "FJC - Fujicoin",
1dafc30d 802 phrase: "abandon abandon ability",
0460b53f 803 firstAddress: "FgiaLpG7C99DyR4WnPxXedRVHXSfKzUDhF",
1dafc30d
IC
804 firstPubKey: "022b41c7ecbae94c0c926dda9304ccf6e6b22f6f6879e2fc52823b154d118a290e",
805 firstPrivKey: "RMFbyVXUF5Ndji4H75jXrnXi9KH6QFKgA6zDfuisa57BrHCN8MSG",
0460b53f
IC
806 };
807 testNetwork(done, params);
808});
809it('Allows selection of nubits', function(done) {
810 var params = {
811 selectText: "USNBT - NuBits",
1dafc30d 812 phrase: "abandon abandon ability",
0460b53f 813 firstAddress: "BLxkabXuZSJSdesLD7KxZdqovd4YwyBTU6",
1dafc30d
IC
814 firstPubKey: "03a37da71e839af0e3fc7cef0f3a82fbff64e372eb7fd067dc452d13b7b269e858",
815 firstPrivKey: "PJ9vZVjQWXNQDbfZbmFiDTcUGpJHiWc923LcX7oKSYHuLRvWhdJ3",
0460b53f
IC
816 };
817 testNetwork(done, params);
818});
1f354b03
IC
819it('Allows selection of bitcoin gold', function(done) {
820 var params = {
821 selectText: "BTG - Bitcoin Gold",
1dafc30d 822 phrase: "abandon abandon ability",
88ae1301 823 firstAddress: "GdDqug4WUsn5syNbSTHatNn4XnuwZtzedx",
1dafc30d
IC
824 firstPubKey: "02e48e4053db573bb74fb67a47c91443ec7c0ed5f3f25aa8a408bad798f0230086",
825 firstPrivKey: "KwxCxhXq72JzuDNEj2VzzjKr1XU4tvpuksdEKBhngFuSEK8XWCBa",
1f354b03
IC
826 };
827 testNetwork(done, params);
828});
5a10834a
IC
829it('Allows selection of monacoin', function(done) {
830 var params = {
831 selectText: "MONA - Monacoin",
1dafc30d 832 phrase: "abandon abandon ability",
5a10834a 833 firstAddress: "MKMiMr7MyjDKjJbCBzgF6u4ByqTS4NkRB1",
1dafc30d
IC
834 firstPubKey: "020b104320aaeb1ec921874e96cafd5add3c0de8d785cd01dc93e5f2b31fa352f4",
835 firstPrivKey: "T45jYrkbSutUvNF1cytpmbvyLR7qWWEXg5r7udj4mqrauzEsxHAG",
5a10834a
IC
836 };
837 testNetwork(done, params);
838});
423fb969
IC
839it('Allows selection of AXE', function(done) {
840 var params = {
841 selectText: "AXE - Axe",
1dafc30d 842 phrase: "abandon abandon ability",
2ab3faf4 843 firstAddress: "PScwtLUyPiGrqtKXrHF37DGETLXLZdw4up",
1dafc30d
IC
844 firstPubKey: "0288ea360af543ff72c79560f9f0ed8ed5386681fc3cc5edc84921c1118d989bce",
845 firstPrivKey: "XJKs1GN3sABamT6daKdRSjBgE2XPrnwBurWyBSVJht6zv5kS2dZd",
423fb969
IC
846 };
847 testNetwork(done, params);
848});
048721a6
IC
849it('Allows selection of BlackCoin', function(done) {
850 var params = {
851 selectText: "BLK - BlackCoin",
1dafc30d 852 phrase: "abandon abandon ability",
048721a6 853 firstAddress: "B5MznAKwj7uQ42vDz3w4onhBXPcqhTwJ9z",
1dafc30d
IC
854 firstPubKey: "03f500b73bad9955fbe26a27bbeefa4ec00119532449eeccfb1f021cafa638d046",
855 firstPrivKey: "Piyy1AGXZ9wRJdiUMPm97WAmN1DHvSxtjCpkYrtX2qyvc4huUxe9",
048721a6
IC
856 };
857 testNetwork(done, params);
858});
e5167afe
IC
859it('Allows selection of Neblio', function(done) {
860 var params = {
861 selectText: "NEBL - Neblio",
1dafc30d 862 phrase: "abandon abandon ability",
e5167afe 863 firstAddress: "NefkeEEvhusbHMmTRrxx7H9wFnUXd8qQsE",
1dafc30d
IC
864 firstPubKey: "0274d827c4aef5b009e0c5ddd3c852a9a0bd91cb37cfb72a5f07d570e4ce7e1569",
865 firstPrivKey: "TpEwnrinfiH7AMDJLvFzNoW1duU2rg7hox6tgF4wMmcnQSmNmQZM",
e5167afe
IC
866 };
867 testNetwork(done, params);
868});
680b94c1
IC
869it('Allows selection of Beetlecoin', function(done) {
870 var params = {
871 selectText: "BEET - Beetlecoin",
1dafc30d 872 phrase: "abandon abandon ability",
680b94c1 873 firstAddress: "BVmtbEsGrjpknprmpHFq26z4kYHJUFHE71",
1dafc30d
IC
874 firstPubKey: "03e8e78daa2d96e390b55426d6b4cad887bdc028a394847308ad4910d00875b04c",
875 firstPrivKey: "Pkb5yU9mK1CzSQuYKm6CYmaJxDEiycipm426F3EhYtHPJdBJxViG",
680b94c1
IC
876 };
877 testNetwork(done, params);
878});
85f762c9 879it('Allows selection of Adcoin', function(done) {
880 var params = {
881 selectText: "ACC - Adcoin",
1dafc30d 882 phrase: "abandon abandon ability",
85f762c9 883 firstAddress: "AcEDM6V5sF4kFHC76MJjjfProtS5Sw2qcd",
1dafc30d
IC
884 firstPubKey: "026625ec7d1b747bd361a57c593fd8384fcdc65696aed5b72f64e73dbf2b24e854",
885 firstPrivKey: "T4B9YVUonpM7tQQEkqv4QjMxWJqxyqcJt78H7XqsRXRvuvd2XGog",
85f762c9 886 };
887 testNetwork(done, params);
888});
889it('Allows selection of Asiacoin', function(done) {
890 var params = {
891 selectText: "AC - Asiacoin",
1dafc30d 892 phrase: "abandon abandon ability",
85f762c9 893 firstAddress: "ALupuEEz7kJjQTAvmtcBMBVuEjPa7GqZzE",
1dafc30d
IC
894 firstPubKey: "0338b40a58e69c087f5092223555c1ce48988e5b2b6bb15f42d881109aa1499d39",
895 firstPrivKey: "PNRyYtznRQBbD3GNCt86uHdWEHyeFr7ZszqckXCt7ZXEcRF29Z4X",
85f762c9 896 };
897 testNetwork(done, params);
898});
31264e8b
PT
899it('Allows selection of Aryacoin', function(done) {
900 var params = {
901 selectText: "ARYA - Aryacoin",
1dafc30d 902 phrase: "abandon abandon ability",
31264e8b 903 firstAddress: "Abr6gX25KaU9BpwD34UfsL3A4n89NvYYSf",
1dafc30d
IC
904 firstPubKey: "03973c0669f332a69e8f0661ffddc7fd86dd7fdb768a40608fcbf0efceebf900e0",
905 firstPrivKey: "PNukdY6bBGJhFDnJGeRFrJ5ptj3WD1xZHbPv8ubjMknFz2L6sZFi",
31264e8b
PT
906 };
907 testNetwork(done, params);
908});
85f762c9 909it('Allows selection of Auroracoin', function(done) {
910 var params = {
911 selectText: "AUR - Auroracoin",
1dafc30d 912 phrase: "abandon abandon ability",
85f762c9 913 firstAddress: "ANuraS6F4Jpi413FEnavjYkKYJJRHkgYCm",
1dafc30d
IC
914 firstPubKey: "03f843b9258aa001f24ebe3a77b6746a20ffda9f60934da8ed44f83d081977fe4b",
915 firstPrivKey: "PQyDA9ewjeMNvNy6ZaUEWVwTNHFPp2J3F131msPx4XFNgMuKMaXF",
85f762c9 916 };
917 testNetwork(done, params);
918});
919it('Allows selection of Bata', function(done) {
920 var params = {
921 selectText: "BTA - Bata",
1dafc30d 922 phrase: "abandon abandon ability",
85f762c9 923 firstAddress: "BGxBdNeYPtF3GCuTtZBPQdFxCkdBYSF3fj",
1dafc30d
IC
924 firstPubKey: "033f35cba191c80f5246113ef33cd8a1e2449d304ad25afbd25e86aff333f07472",
925 firstPrivKey: "RKbjo1gnyFsuEimVGGybBfbvcp6fCCY35D9SY38xLAwrSrQ3B5v9",
85f762c9 926 };
927 testNetwork(done, params);
928});
929it('Allows selection of Belacoin', function(done) {
930 var params = {
931 selectText: "BELA - Belacoin",
1dafc30d 932 phrase: "abandon abandon ability",
85f762c9 933 firstAddress: "BEeetqpNffdzeknSpNmQp5KAFh2KK1Qx7S",
1dafc30d
IC
934 firstPubKey: "039d895165f9c8218c12499820b783d920b632b49b0ca70b9352171b2f4273bf0b",
935 firstPrivKey: "PeicG333UdMZ1t5PoHCt2Yepc7X15wHPawvsusWWspKCw99Dfqmx",
85f762c9 936 };
937 testNetwork(done, params);
938});
939it('Allows selection of Bitcoin Atom', function(done) {
940 var params = {
941 selectText: "BCA - Bitcoin Atom",
1dafc30d 942 phrase: "abandon abandon ability",
85f762c9 943 firstAddress: "AMy6qMbJeC4zsGRL6iWszmeCdQH65fgfih",
1dafc30d
IC
944 firstPubKey: "02efe1e4f85342c8c57c4d6e6f48758f7be4e059d61586f769e33dd5bf0aa78a04",
945 firstPrivKey: "Ky4hiMBLXZEj3TFknsuvceh16ttBfw9U7ReMgGWBtoYg1LPuxxUq",
85f762c9 946 };
947 testNetwork(done, params);
948});
949it('Allows selection of Bitcoinplus', function(done) {
950 var params = {
951 selectText: "XBC - Bitcoinplus",
1dafc30d 952 phrase: "abandon abandon ability",
85f762c9 953 firstAddress: "B7FSynZoDbEwTCSgsXq9nJ5ue8owYLVL8r",
1dafc30d
IC
954 firstPubKey: "03ca81fbc766f6a38c7d122facd68c87ceeb57a0ee7d58927132a77704dfe88f92",
955 firstPrivKey: "Pjjssfh7oJnFZfcxxooUvUqqxtb35oiurrDm3rEHCGpyCW1tPEG2",
85f762c9 956 };
957 testNetwork(done, params);
958});
1e2cc748 959it('Allows selection of Bitcoin Private', function(done) {
960 var params = {
961 selectText: "BTCP - Bitcoin Private",
1dafc30d 962 phrase: "abandon abandon ability",
1e2cc748 963 firstAddress: "b1M3PbiXXyN6Hdivdw5rJv5VKpLjPzhm4jM",
1dafc30d
IC
964 firstPubKey: "03b4dae910c8563ae77e4c665022f8afbf8bcc659ce3bc790a74956e5ebba932af",
965 firstPrivKey: "L5U3Rfy7otN5JQP9iveYkT1pB9va71uebx7VE8reBbiAofKCiCxk",
1e2cc748 966 };
967 testNetwork(done, params);
968});
31264e8b
PT
969it('Allows selection of Bitcoin SV', function(done) {
970 var params = {
971 selectText: "BSV - BitcoinSV",
1dafc30d 972 phrase: "abandon abandon ability",
31264e8b 973 firstAddress: "1N4mgtE5yxifch9jWs7Sds6oVqxdy2t576",
1dafc30d
IC
974 firstPubKey: "0280bbf3fd6f1c7ab4b04cca0ab6e23487fafa9c5edea3d1882d8e967111ee8b38",
975 firstPrivKey: "L3oBCYKNpT6uc5qeYGN9NFNyvQsTUGBV7v2cqeB76GfWzuGJDYeY",
31264e8b
PT
976 };
977 testNetwork(done, params);
978});
1e2cc748 979it('Allows selection of Bitcoinz', function(done) {
980 var params = {
981 selectText: "BTCZ - Bitcoinz",
1dafc30d 982 phrase: "abandon abandon ability",
1e2cc748 983 firstAddress: "t1X2YQoxs8cYRo2oaBYgVEwW5QNjCC59NYc",
1dafc30d
IC
984 firstPubKey: "033eb18e80984fa3fbaeee1096977d6b169399123641dc97ceba00910c8ad211d4",
985 firstPrivKey: "L1qcDeAXPxMSgnXvquJo5Dd4myFxxxrWNgi99Ns26GPNyRW7eVuZ",
1e2cc748 986 };
987 testNetwork(done, params);
988});
5ed5f661
D
989it('Allows selection of BitCloud', function(done) {
990 var params = {
991 selectText: "BTDX - BitCloud",
1dafc30d 992 phrase: "abandon abandon ability",
33816040 993 firstAddress: "BHbWitXCNgTf1BhsRDNMP186EeibuzmrBi",
1dafc30d
IC
994 firstPubKey: "032ca47d6a35bd01ba3832791bcb0ee5676b1a63a491b42c39a4b214d78bf64fd3",
995 firstPrivKey: "PgTZBt9exdzZSWfhdwXKVmz5WBFjAJFjNLa9552FCx1X6mnztNSL",
5ed5f661
D
996 };
997 testNetwork(done, params);
998});
85f762c9 999it('Allows selection of Bitcore', function(done) {
1000 var params = {
1001 selectText: "BTX - Bitcore",
1dafc30d 1002 phrase: "abandon abandon ability",
b7de1f3d 1003 firstAddress: "2Rgp5Znhpy34TK4QmPkfCiYs9r4KovfTH9",
1dafc30d
IC
1004 firstPubKey: "02caa73ee839b074c8d353f6869222bafd8ce5ad3bcb1c0bd404d108390b2a6438",
1005 firstPrivKey: "L4286qDXUJfVq4ebbHHUVDoFpEudJj81FUWkjwNeQ132gFCDGUBj",
85f762c9 1006 };
1007 testNetwork(done, params);
1008});
1009it('Allows selection of Bitsend', function(done) {
1010 var params = {
1011 selectText: "BSD - Bitsend",
1dafc30d 1012 phrase: "abandon abandon ability",
85f762c9 1013 firstAddress: "iBPk7LYjDun3EPk7CRR8UUmnPoceVc1bp2",
1dafc30d
IC
1014 firstPubKey: "03e6b12ed885225302fc126980e42abfee1c3350b77b61b01abcf200b5e9a9fee5",
1015 firstPrivKey: "XCTxjfV68KfXKySGJyZTYvYMBDFKSPJu41W3SN1bRpJch5R498mC",
85f762c9 1016 };
1017 testNetwork(done, params);
1018});
1019it('Allows selection of Britcoin', function(done) {
1020 var params = {
1021 selectText: "BRIT - Britcoin",
1dafc30d 1022 phrase: "abandon abandon ability",
85f762c9 1023 firstAddress: "B6Aue4J2XLs1f1dtD4H1SHYFfh4XrmEbrw",
1dafc30d
IC
1024 firstPubKey: "035dee3aad6f635aeffe61a28e82a58271b984d20cc3766f63d9acb29ecee91d3f",
1025 firstPrivKey: "PdyPdAngoD42Pe5qCd2en6nS1j4rqVyH6cFGkCDEu2nEMt8DHsoz",
85f762c9 1026 };
1027 testNetwork(done, params);
1028});
1029it('Allows selection of Canadaecoin', function(done) {
1030 var params = {
1031 selectText: "CDN - Canadaecoin",
1dafc30d 1032 phrase: "abandon abandon ability",
85f762c9 1033 firstAddress: "CanAyCfd5Rj2CQVfaoAmvDUZunPM5W1AEQ",
1dafc30d
IC
1034 firstPubKey: "03124e22733a75beba1e4f2635d08e034772bf6cbe8102404226a9402e135ff7f6",
1035 firstPrivKey: "QCEMYNRcKqGgYXhxDNZfrF9m8sqd28NujXpjDNuN7r525rrXPnLm",
85f762c9 1036 };
1037 testNetwork(done, params);
1038});
1039it('Allows selection of Cannacoin', function(done) {
1040 var params = {
1041 selectText: "CCN - Cannacoin",
1dafc30d 1042 phrase: "abandon abandon ability",
85f762c9 1043 firstAddress: "CYjW8xWB43g6krLJTmmrPk1PonoQX7h9Qd",
1dafc30d
IC
1044 firstPubKey: "03bd05a584f418aa8d65a05c7bcc301eb552f67aa380f15e4b29c0b8eec698b443",
1045 firstPrivKey: "QAM1aUWMGEDdcDsgaPQKXcMe8Z3vEfDaPSds3wTFz8USQ3yht7Kk",
85f762c9 1046 };
1047 testNetwork(done, params);
1048});
1049it('Allows selection of Clubcoin', function(done) {
1050 var params = {
1051 selectText: "CLUB - Clubcoin",
1dafc30d 1052 phrase: "abandon abandon ability",
85f762c9 1053 firstAddress: "CHMDEXN4sihpSVX4GyAa2hZ62shnby7uyN",
1dafc30d
IC
1054 firstPubKey: "0356187f1336ac2e340145478f02024ce1c318e3648cbba38262afbde7f2dc0055",
1055 firstPrivKey: "PeJx6v8h1N6GvTj7VkK7vWqjdWJb4QXzfrDgJjFao8bkpRrDiymm",
85f762c9 1056 };
1057 testNetwork(done, params);
1058});
1059it('Allows selection of Compcoin', function(done) {
1060 var params = {
1061 selectText: "CMP - Compcoin",
1dafc30d 1062 phrase: "abandon abandon ability",
85f762c9 1063 firstAddress: "CLshtw3zhxkseBJS46UF12v3AFy9Dx7JVv",
1dafc30d
IC
1064 firstPubKey: "027d1b4f1798882b8978eb3ab0e8b503aa1fb4cf058e0086cf25326fb6a8751aae",
1065 firstPrivKey: "QDq6KKEdmrzHbZHmgzsGcweUFwYA7mVvvfeAKsPSxfxHNv73ETr7",
85f762c9 1066 };
1067 testNetwork(done, params);
1068});
519e9dc7
MKA
1069it('Allows selection of CPUchain', function(done) {
1070 var params = {
1071 selectText: "CPU - CPUchain",
1dafc30d 1072 phrase: "abandon abandon ability",
8817e248 1073 firstAddress: "CWSpLpW7jS4mBHJnkz3mmL5s3yQMg93zK8",
1dafc30d
IC
1074 firstPubKey: "0390845eef5c5993069211f94d9f3990c27c380700bb92ae629d2a5afae1c08806",
1075 firstPrivKey: "L378gxzvUEX9JUFnfXBik2H4gV7XM4dzXWKM9rvR8UZr2rBphL1t",
519e9dc7
MKA
1076 };
1077 testNetwork(done, params);
1078});
85f762c9 1079it('Allows selection of Crave', function(done) {
1080 var params = {
1081 selectText: "CRAVE - Crave",
1dafc30d 1082 phrase: "abandon abandon ability",
85f762c9 1083 firstAddress: "VCYJeti6uKMNBFKCL7eP96UwuFWYHM7c85",
1dafc30d
IC
1084 firstPubKey: "02c8938f30cc46013706586753d6dca3e4ac6b7d6924dfc35d444c3605f35da4c7",
1085 firstPrivKey: "PjRdEuhRZ6rufXAdU6amoaPDRZamWmxN46qbmSPyqUKsJzChCjZT",
85f762c9 1086 };
1087 testNetwork(done, params);
1088});
1089it('Allows selection of Defcoin', function(done) {
1090 var params = {
1091 selectText: "DFC - Defcoin",
1dafc30d 1092 phrase: "abandon abandon ability",
85f762c9 1093 firstAddress: "D8swcgyaaFUrXZU3ATwbgy16buCpWqbG1M",
1dafc30d
IC
1094 firstPubKey: "02d02cc83ddfaa5aed4fb9b611b504cccbfa8397485411f16816fc28dccb51e609",
1095 firstPrivKey: "QSRhMr1B4tt7DEcgxji6NrEfS51wQ6GypfMkqgNDHuWVKo2RzTac",
85f762c9 1096 };
1097 testNetwork(done, params);
1098});
1099it('Allows selection of Diamond', function(done) {
1100 var params = {
1101 selectText: "DMD - Diamond",
1dafc30d 1102 phrase: "abandon abandon ability",
85f762c9 1103 firstAddress: "dJnrVbLL9UPjdaVRz2C8VpqHZknqAqjLek",
1dafc30d
IC
1104 firstPubKey: "03750645ffc120a0ffda07f01b0cc0d321bccf02eaedc98907672d78f2b2ef20d6",
1105 firstPrivKey: "ZKnjDNkhgCwRs8KV5Mf33k1USiiiP8AuXKM2xR4zhd3PAhtVmkEg",
85f762c9 1106 };
1107 testNetwork(done, params);
1108});
1109it('Allows selection of Digibyte', function(done) {
1110 var params = {
1111 selectText: "DGB - Digibyte",
1dafc30d 1112 phrase: "abandon abandon ability",
85f762c9 1113 firstAddress: "D85Rp9jwLtMdmP6wGjTiqHBdVQLST3YCEq",
1dafc30d
IC
1114 firstPubKey: "02f86cc0afd113956e995fb9cbe33b68e59e9175c0c89419efc4031f2e3c128288",
1115 firstPrivKey: "L1w9pD4XodykLEJxiK1R9SVELpftD9x1QtGjHEb1nWviAvYVZbwv",
85f762c9 1116 };
1117 testNetwork(done, params);
1118});
1119it('Allows selection of Digitalcoin', function(done) {
1120 var params = {
1121 selectText: "DGC - Digitalcoin",
1dafc30d 1122 phrase: "abandon abandon ability",
85f762c9 1123 firstAddress: "DKw4UGKEAZWweDNEbBFNQx4EM8x1mpUdia",
1dafc30d
IC
1124 firstPubKey: "02148710e3f09fa9e108bd90a3d53e0eeea9b6ee929c4668a7d64732e3fc839ff7",
1125 firstPrivKey: "QVBstKEkSbT4M9aDbBTkqJkpLCaGjL5zYSiiufHwMxGCn2dunbYL",
85f762c9 1126 };
1127 testNetwork(done, params);
1128});
1129it('Allows selection of Ecoin', function(done) {
1130 var params = {
1131 selectText: "ECN - Ecoin",
1dafc30d 1132 phrase: "abandon abandon ability",
85f762c9 1133 firstAddress: "e6WFPLG5gcXyF7cESFteH1hE2XSmowW5yB",
1dafc30d
IC
1134 firstPubKey: "03a74536710cba6aa02b543f1ac4a76d241b47a96e38cfd002eb975cdef4b9ec19",
1135 firstPrivKey: "ZZPUTdAqpJ3s6S6xe2RpZD3jyEqwGk5MRkJHSpar1rESp4BFEqLV",
85f762c9 1136 };
1137 testNetwork(done, params);
1138});
1139it('Allows selection of Edrcoin', function(done) {
1140 var params = {
1141 selectText: "EDRC - Edrcoin",
1dafc30d 1142 phrase: "abandon abandon ability",
85f762c9 1143 firstAddress: "eh1nUJsvgKPFv6ebMBfcwJ299GMCpjeZUG",
1dafc30d
IC
1144 firstPubKey: "02b541bdd9ff6ffc03ec4749dbe1a8a4ac8b02dc528758acac43eb1f38b5f48f27",
1145 firstPrivKey: "ZjZir6LUrg6A8WqcCeCeM249TGCxJcgGkEL6VefJJV1mGsGb7MEb",
85f762c9 1146 };
1147 testNetwork(done, params);
1148});
1149it('Allows selection of Egulden', function(done) {
1150 var params = {
1151 selectText: "EFL - Egulden",
1dafc30d 1152 phrase: "abandon abandon ability",
85f762c9 1153 firstAddress: "Lg66yt55R7edRM58cDhKzXik2kFme3viX7",
1dafc30d
IC
1154 firstPubKey: "02d8d54be535836e70b9feed7a2502c026d714894342746f15d21c6bc80e1f97e4",
1155 firstPrivKey: "T7NPtpaVXs7SBfsCzp3ooadkctNqcZW6HpNHeT3U8EAXc6NtDJ4c",
85f762c9 1156 };
1157 testNetwork(done, params);
1158});
1159it('Allows selection of Einsteinium', function(done) {
1160 var params = {
1161 selectText: "EMC2 - Einsteinium",
1dafc30d 1162 phrase: "abandon abandon ability",
85f762c9 1163 firstAddress: "EVAABm9hXKHk2MpVMbwNakRubFnNha5m8m",
1dafc30d
IC
1164 firstPubKey: "02826e69c802fbf71ca8e7daf9fdac2e371b86847b5397422997785cefb973269b",
1165 firstPrivKey: "QwySA5DiFKbvMcm7H3xXfsDUdq1Q5RPYjBAcLjZKkESxmJMXBvL2",
85f762c9 1166 };
1167 testNetwork(done, params);
1168});
0ae59396
JU
1169it('Allows selection of EOSIO', function(done) {
1170 var params = {
1171 selectText: "EOS - EOSIO",
1dafc30d 1172 phrase: "abandon abandon ability",
0ae59396 1173 firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy",
1dafc30d 1174 firstPrivKey: "5Jef4qXr3nF8cjudHNQBaComNB653dnQX4pWec32xXRVThBLiCM",
0ae59396 1175 };
1dafc30d 1176 testNetwork(done, params);
0ae59396 1177});
85f762c9 1178it('Allows selection of Europecoin', function(done) {
1179 var params = {
1180 selectText: "ERC - Europecoin",
1dafc30d 1181 phrase: "abandon abandon ability",
85f762c9 1182 firstAddress: "ESA2YwPYntAoaPrE8Fm5qkKRtkcwLcwD6R",
1dafc30d
IC
1183 firstPubKey: "038f16d567cdefac2813b64d465f5cd8d6d59df9dfe4d16302a19b5e0b7179d685",
1184 firstPrivKey: "RzXndDAzJ4Wft6HXkpopV7vRnRBeVw2o6dKp44FYQgriYWngseBu",
85f762c9 1185 };
1186 testNetwork(done, params);
1187});
1188it('Allows selection of Exclusivecoin', function(done) {
1189 var params = {
1190 selectText: "EXCL - Exclusivecoin",
1dafc30d 1191 phrase: "abandon abandon ability",
85f762c9 1192 firstAddress: "EbUa6m8UZW6nTxsYZD2FsDjkadKbp5M6JT",
1dafc30d
IC
1193 firstPubKey: "0291a6b82197e13aa2fd65bd1f2a6e905a9a2baaa36dfb5da10690022f7f9e998d",
1194 firstPrivKey: "Qu6pr1srXmEFzWSa4Ry1sjV6qDj4TEf4q2CxHBSRByiSBLsm967z",
85f762c9 1195 };
1196 testNetwork(done, params);
1197});
1198it('Allows selection of Feathercoin', function(done) {
1199 var params = {
1200 selectText: "FTC - Feathercoin",
1dafc30d 1201 phrase: "abandon abandon ability",
85f762c9 1202 firstAddress: "6gDdjAMoSgQaW8UhqK3oboHs6ftGAroKkM",
1dafc30d
IC
1203 firstPubKey: "02e9f5c37fba2b6457f3c59de5bf5be2efe524751a682a47765825cb9d82d339f3",
1204 firstPrivKey: "N5487NUGCd1JnWzZzhjX1uu6SNGnpQKjeWuK6Y1NzNHjGaLysCdi",
85f762c9 1205 };
1206 testNetwork(done, params);
1207});
d1d8699f
SA
1208it('Allows selection of FIO', function(done) {
1209 var params = {
1210 selectText: "FIO - Foundation for Interwallet Operability",
1211 phrase: "valley alien library bread worry brother bundle hammer loyal barely dune brave",
1212 firstPubKey: "FIO5kJKNHwctcfUM5XZyiWSqSTM5HTzznJP9F3ZdbhaQAHEVq575o",
1213 firstPrivKey: "5Kbb37EAqQgZ9vWUHoPiC2uXYhyGSFNbL6oiDp24Ea1ADxV1qnu",
1214 };
1215 testNetwork(done, params);
1216});
ad07c1c0 1217it('Allows selection of Firo', function(done) {
bd1ecd20 1218 var params = {
38626a2d
IC
1219 selectText: "FIRO - Firo (Zcoin rebrand)",
1220 phrase: "abandon abandon ability",
1221 firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
1222 firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
1223 firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
1224 };
1225 testNetwork(done, params);
1226});
1227it('Allows selection of Zcoin', function(done) {
1228 var params = {
1229 selectText: "XZC - Zcoin (rebranded to Firo)",
bd1ecd20
R
1230 phrase: "abandon abandon ability",
1231 firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
1232 firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
1233 firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
1234 };
1235 testNetwork(done, params);
1236});
85f762c9 1237it('Allows selection of Firstcoin', function(done) {
1238 var params = {
1239 selectText: "FRST - Firstcoin",
1dafc30d 1240 phrase: "abandon abandon ability",
85f762c9 1241 firstAddress: "FJN9GzfMm7Q8R4DJwK1H9F6A1GTghvFiMJ",
1dafc30d
IC
1242 firstPubKey: "029300108c006d1dc75847fece915138747b7bc17b515eae7458da98d2f14d7178",
1243 firstPrivKey: "RDxAN3n3k2dEZ4Ln3bbozzZ3Jgg7CQdgzYDCURmPghKQdzctX7ck",
85f762c9 1244 };
1245 testNetwork(done, params);
1246});
1247it('Allows selection of Flashcoin', function(done) {
1248 var params = {
1249 selectText: "FLASH - Flashcoin",
1dafc30d 1250 phrase: "abandon abandon ability",
85f762c9 1251 firstAddress: "UWfpf5LfMmLxZYooEb2EyvWhZ8NG7EZDRt",
1dafc30d
IC
1252 firstPubKey: "032d55eae8073e75f02e9674b0ac3f69190ad359ad37ee4c4c11d12bcfee13d439",
1253 firstPrivKey: "W6pedhBW35Twq8ZmgTQi7sHx6wczQanSk2FUpcFWtgEW29jowsvi",
85f762c9 1254 };
1255 testNetwork(done, params);
1256});
1257it('Allows selection of GCRCoin', function(done) {
1258 var params = {
1259 selectText: "GCR - GCRCoin",
1dafc30d 1260 phrase: "abandon abandon ability",
85f762c9 1261 firstAddress: "GJjF5cLwyXLacpuvXAVksxGxKvHDjx58d6",
1dafc30d
IC
1262 firstPubKey: "0356187f1336ac2e340145478f02024ce1c318e3648cbba38262afbde7f2dc0055",
1263 firstPrivKey: "Pntag5VbBX1Qtyjt3pi1igwDswWEtpoiqHqosBbgHcMU6m2e7t9J",
85f762c9 1264 };
1265 testNetwork(done, params);
1266});
1267it('Allows selection of Gobyte', function(done) {
1268 var params = {
1269 selectText: "GBX - Gobyte",
1dafc30d 1270 phrase: "abandon abandon ability",
85f762c9 1271 firstAddress: "GS813Ys2brkmvSUw1rUqGPm2HqQVDHJRyA",
1dafc30d
IC
1272 firstPubKey: "036f84f44e4c8bffe039c2d9da087b006ebbfcdcf24b32a6434b2fad708ef00ae0",
1273 firstPrivKey: "WLiSrhfqRwgNmw7rhGHFoXLEuNGXxQYuKb9PK84AZmTfiHN9dz22",
85f762c9 1274 };
1275 testNetwork(done, params);
1276});
1277it('Allows selection of Gridcoin', function(done) {
1278 var params = {
1279 selectText: "GRC - Gridcoin",
1dafc30d 1280 phrase: "abandon abandon ability",
85f762c9 1281 firstAddress: "SGrWbBPvobgqKRF8td1Kdc9vbRY7MJ78Y9",
1dafc30d
IC
1282 firstPubKey: "0377436f8c4c4d96d5ddfe6875abeb589deec595331b9a915b7e8d81a4134926ce",
1283 firstPrivKey: "V7h5EhRuWGM8uqAouxHr9uNt8ZLCQ7kmpA27tvKDbUE3zBarH81n",
85f762c9 1284 };
1285 testNetwork(done, params);
1286});
1287it('Allows selection of Gulden', function(done) {
1288 var params = {
1289 selectText: "NLG - Gulden",
1dafc30d 1290 phrase: "abandon abandon ability",
85f762c9 1291 firstAddress: "GcDP7cNEc33MPPdTFNJ8pZc6VMZJ2CbKxY",
1dafc30d
IC
1292 firstPubKey: "03ff51002146450eb68f294dbe34f3e208f8694b51079f81e3f7dbd403cc10df41",
1293 firstPrivKey: "Fc6gU4tscBk3pybMWU1ajS1tLvNerXC24hQJ1F944QqdgSSrr3XW",
85f762c9 1294 };
1295 testNetwork(done, params);
1296});
1297it('Allows selection of Helleniccoin', function(done) {
1298 var params = {
1299 selectText: "HNC - Helleniccoin",
1dafc30d 1300 phrase: "abandon abandon ability",
85f762c9 1301 firstAddress: "LbHEKe5H72zp9G1fuWNiiNePTUfJb88915",
1dafc30d
IC
1302 firstPubKey: "02e602000d65b969ac27172297ee907684bfc606f457ef0bad62c229edb17d5cb2",
1303 firstPrivKey: "T6JEq9jKLvztjhg4tJMezy1L4NjnMfLDZJe1egVzPBU3Q5XPBFrz",
85f762c9 1304 };
1305 testNetwork(done, params);
1306});
1307it('Allows selection of Hempcoin', function(done) {
1308 var params = {
1309 selectText: "THC - Hempcoin",
1dafc30d 1310 phrase: "abandon abandon ability",
85f762c9 1311 firstAddress: "H8sdWbZyJV4gyXyHtLXDaNnAuUDhK5mfTV",
1dafc30d
IC
1312 firstPubKey: "02e40aaa6bf20e32d9f5976f57e9bf7a8f75db36b96a9033c20b681c9d9454b617",
1313 firstPrivKey: "Ry5Dg2yR32uhbrPLdNmsK1TRbZ1bHLvFp7kcPgeMzVPN6ycu9Jj5",
85f762c9 1314 };
1315 testNetwork(done, params);
1316});
1317it('Allows selection of Insane', function(done) {
1318 var params = {
1319 selectText: "INSN - Insane",
1dafc30d 1320 phrase: "abandon abandon ability",
85f762c9 1321 firstAddress: "iMPqEJMiXWuxC9U2NVinCCMr4t72h58EWx",
1dafc30d
IC
1322 firstPubKey: "036ec4cf4b92300f12ff824b1eca775b27b1a728f6b57c6354ce791fd8ea0f3497",
1323 firstPrivKey: "9HA4X5kXWKxLjybjko8Z5wDo19UUJKroRrZ1BuKCtsfcfNB48K61",
85f762c9 1324 };
1325 testNetwork(done, params);
1326});
1327it('Allows selection of Iop', function(done) {
1328 var params = {
1329 selectText: "IOP - Iop",
1dafc30d 1330 phrase: "abandon abandon ability",
85f762c9 1331 firstAddress: "pGKQmcaPf95Ur5o6oHK4qdiZ52p1yaTvq1",
1dafc30d
IC
1332 firstPubKey: "02bbaa07f154d04b04dec0978a1655952e1a09a3c0e7798085902273965d93c2f6",
1333 firstPrivKey: "8MDnKDhVSp84AqzYN5g18MhMvHk3UMYnP51EVjidSas1pT62Sdpc",
85f762c9 1334 };
1335 testNetwork(done, params);
1336});
1337it('Allows selection of Ixcoin', function(done) {
1338 var params = {
1339 selectText: "IXC - Ixcoin",
1dafc30d 1340 phrase: "abandon abandon ability",
85f762c9 1341 firstAddress: "xgE9bTZ6YypT3E6ByzkTt31Hq68E9BqywH",
1dafc30d
IC
1342 firstPubKey: "0257766cea209cf52ba08776b6dfa263a4759e1e148f25d0cab3a91a60b6a52062",
1343 firstPrivKey: "KxdDep6zGCWoRt6arat5DVR5s6a8vmZtuekwHafEwRc7VGxfeD4Y",
85f762c9 1344 };
1345 testNetwork(done, params);
1346});
0a5d28a7 1347it('Allows selection of Kobocoin', function(done) {
1348 var params = {
1349 selectText: "KOBO - Kobocoin",
1dafc30d 1350 phrase: "abandon abandon ability",
0a5d28a7 1351 firstAddress: "FTVoNJETXDAM8x7MnmdE8RwWndSr9PQWhy",
1dafc30d
IC
1352 firstPubKey: "0225753a5e232b384dce73b58d25fb90172faaf4c83a8850189abd8cae86495601",
1353 firstPrivKey: "R7u1uvHmVGkGqjURaNoppFjPNBzPYt37QwttrJc6F2K1WRm1zKoQ",
0a5d28a7 1354 };
1355 testNetwork(done, params);
1356});
85f762c9 1357it('Allows selection of Landcoin', function(done) {
1358 var params = {
1359 selectText: "LDCN - Landcoin",
1dafc30d 1360 phrase: "abandon abandon ability",
85f762c9 1361 firstAddress: "LLvLwNjG1aJcn1RS4W4GJUbv8fNaRATG7c",
1dafc30d
IC
1362 firstPubKey: "020c3ab49a6de010d23ddf14dec67666d7ad46dafbae9841db7723bbb0044067cc",
1363 firstPrivKey: "T8rHy2tA1yykFgCpr6KrgcrhqbevpxG923qSZbJHALYGwy3M3qAw",
85f762c9 1364 };
1365 testNetwork(done, params);
1366});
1367it('Allows selection of Library Credits', function(done) {
1368 var params = {
1369 selectText: "LBC - Library Credits",
1dafc30d 1370 phrase: "abandon abandon ability",
85f762c9 1371 firstAddress: "bQJEQrHDJyHdqycB32uysh1SWn8Ln8LMdg",
1dafc30d
IC
1372 firstPubKey: "02abd5018c033f59f49f28ee76d93c41323890928e25c171ccc7c61ed753cde8ad",
1373 firstPrivKey: "5CWjkFs7be8vPa3CZEodPDsMDSbvyT9gAC1n1w83znRz4poNK5nZ",
85f762c9 1374 };
1375 testNetwork(done, params);
1376});
1377it('Allows selection of Linx', function(done) {
1378 var params = {
1379 selectText: "LINX - Linx",
1dafc30d 1380 phrase: "abandon abandon ability",
85f762c9 1381 firstAddress: "XGWQ3cb3LGUB3VnHmj6xYSMgnokNbf6dyk",
1dafc30d
IC
1382 firstPubKey: "0232edeec8e3e021b53982a01943dea4398e9cc4b177c5483cf0e7774be41ea094",
1383 firstPrivKey: "X8YJFxPPmwyCBQ7Rp5bqn3V8U9rsaba5Tftsh3j8qZX9hjTTURgL",
85f762c9 1384 };
1385 testNetwork(done, params);
1386});
1387it('Allows selection of Litecoincash', function(done) {
1388 var params = {
1389 selectText: "LCC - Litecoincash",
1dafc30d 1390 phrase: "abandon abandon ability",
85f762c9 1391 firstAddress: "Ce5n7fjUuQPLutJ4W5nCCfQLKdKLE1mv9A",
1dafc30d
IC
1392 firstPubKey: "033af2daadddcc976ea61023783b350f9b1ac45a056dba2d3b8c6ceec9d5817a8d",
1393 firstPrivKey: "T6qztYVwa6onx5HjCB3XZcCtegpUjVKtocRCQ8daWj2b8tbrDZqp",
85f762c9 1394 };
1395 testNetwork(done, params);
1396});
1397it('Allows selection of Lynx', function(done) {
1398 var params = {
1399 selectText: "LYNX - Lynx",
1dafc30d 1400 phrase: "abandon abandon ability",
85f762c9 1401 firstAddress: "KUeY3ZdZkg96p4W98pj1JjygCFU1XqWdw3",
1dafc30d
IC
1402 firstPubKey: "0340435307cc0831d85adb70ceb518297cdebee8f25574d8eca0ff94e35fa759da",
1403 firstPrivKey: "SdwVFsLjH2wbWziEZTLPQ2iCBrt9vXHWr7X333RbFZG7hZg88u5V",
85f762c9 1404 };
1405 testNetwork(done, params);
1406});
5ed5f661
D
1407it('Allows selection of Megacoin', function(done) {
1408 var params = {
1409 selectText: "MEC - Megacoin",
1dafc30d 1410 phrase: "abandon abandon ability",
33816040 1411 firstAddress: "MDfAj9CzkC1HpcUiVGnHp8yKTa7WXgu8AY",
1dafc30d
IC
1412 firstPubKey: "02e560b00165c939ba08f5096201794a32e6de66216cdc5763472abf09a5e62380",
1413 firstPrivKey: "TSw7if5qV6HzW2hKhPjVvQBVUXt5aD17mM34PkueLrHQiXwMwcp4",
5ed5f661
D
1414 };
1415 testNetwork(done, params);
1416});
85f762c9 1417it('Allows selection of Minexcoin', function(done) {
1418 var params = {
1419 selectText: "MNX - Minexcoin",
1dafc30d 1420 phrase: "abandon abandon ability",
85f762c9 1421 firstAddress: "XC1VnyJVfiMDwWgFtAHDp41cgY3AHk3dJT",
1dafc30d
IC
1422 firstPubKey: "0232a31bee17b806941c419cea385d427f0d6c6fbd564fb2f366faa008aa15822c",
1423 firstPrivKey: "KzouDFGCydewfP2pGdGv62vwP7KBtaaSgBW28B94YuksV5y8jGyE",
85f762c9 1424 };
1425 testNetwork(done, params);
1426});
1427it('Allows selection of Navcoin', function(done) {
1428 var params = {
1429 selectText: "NAV - Navcoin",
1dafc30d 1430 phrase: "abandon abandon ability",
85f762c9 1431 firstAddress: "NTQVTPK3NWSQLKoffkiQw99T8PifkF1Y2U",
1dafc30d
IC
1432 firstPubKey: "0345105cc449c627cfee118bcd7804465669e6b32e751a61e39737f5693f56d5f4",
1433 firstPrivKey: "PKXWZeQCqutM4vawyuNAHuAAkfEuWLVhwtszCRuWTecyJ92EMEE2",
85f762c9 1434 };
1435 testNetwork(done, params);
1436});
491948db 1437it('Allows selection of Nebulas', function(done) {
1438 var params = {
1439 selectText: "NAS - Nebulas",
1dafc30d 1440 phrase: "abandon abandon ability",
491948db 1441 firstAddress: "n1PbK61DGBfDoDusLw621G6sVSMfLLHdfnm",
1dafc30d
IC
1442 firstPubKey: "3a3ffb88114f54ed7525c987a3124dc5eefc221806bc049e1e08371cca5fbebea38c2ce791ee32912c1f7799fad99db91f6a3724def5e715b4ff64bc06fe4537",
1443 firstPrivKey: "78d2df373c54efe1bfda371ee7532892ea8ec046f45e5c7e2dfa8371ad190f8b",
491948db 1444 };
1445 testNetwork(done, params);
1446});
85f762c9 1447it('Allows selection of Neoscoin', function(done) {
1448 var params = {
1449 selectText: "NEOS - Neoscoin",
1dafc30d 1450 phrase: "abandon abandon ability",
85f762c9 1451 firstAddress: "NgATz6QbQNXvayHQ4CpZayugb9HeaPDdby",
1dafc30d
IC
1452 firstPubKey: "021bf6bd94ac773ed78b6e682bf6509a08944b67925a3ea9ec94f500479f637f63",
1453 firstPrivKey: "TBebkUs87R1WLhMPHMzCYF2FmiHzuVcCrhgf2rRwsSpi35SGZPMc",
85f762c9 1454 };
1455 testNetwork(done, params);
1456});
10980ed6 1457it('Allows selection of Nix', function(done) {
1458 var params = {
1459 selectText: "NIX - NIX Platform",
1dafc30d 1460 phrase: "abandon abandon ability",
10980ed6 1461 firstAddress: "GgcNW2SQQXB4LWHRQTHKkQF3GzXNSLqS8u",
1dafc30d
IC
1462 firstPubKey: "02438f5277bc74be69e99eee406cda968705a8ab26b9aecfaa1bbc9d3700fa2eae",
1463 firstPrivKey: "L44wVS6tPZhVGfnJhXTfEyBZwLggW61GKKRVDaEKSaWAt2HkALyT",
10980ed6 1464 };
1465 testNetwork(done, params);
1466});
85f762c9 1467it('Allows selection of Neurocoin', function(done) {
1468 var params = {
1469 selectText: "NRO - Neurocoin",
1dafc30d 1470 phrase: "abandon abandon ability",
85f762c9 1471 firstAddress: "NVdYErQ3mFpDuF5DquW9WMiT7sLc8ufFTn",
1dafc30d
IC
1472 firstPubKey: "03a3690f587d97dee95393d6dfe9daa81d60354657f84a75fb6733335a1c0588db",
1473 firstPrivKey: "Tn3LK6WyQRczahRsf3cZCpS12VxvbdhM6zSARDvGxhNoxCCN7oKv",
85f762c9 1474 };
1475 testNetwork(done, params);
1476});
1477it('Allows selection of Newyorkc', function(done) {
1478 var params = {
1479 selectText: "NYC - Newyorkc",
1dafc30d 1480 phrase: "abandon abandon ability",
85f762c9 1481 firstAddress: "RSVMfyH1fKfy3puADJEhut2vfkRyon6imm",
1dafc30d
IC
1482 firstPubKey: "02c1f71b4e74098cf6dc66c5c0e386c695002093e986698e53f50162493b2deec8",
1483 firstPrivKey: "UqWMjJsXSsC4X7vgCTxLwxV21yA8vDosyGW2rBTYnn7MfFUbKZFy",
85f762c9 1484 };
1485 testNetwork(done, params);
1486});
1487it('Allows selection of Novacoin', function(done) {
1488 var params = {
1489 selectText: "NVC - Novacoin",
1dafc30d 1490 phrase: "abandon abandon ability",
85f762c9 1491 firstAddress: "4JRvUmxcKCJmaMXZyvRoSS1cmG2XvnZfHN",
1dafc30d
IC
1492 firstPubKey: "0252531247a5e26a866909467ce552a3433b00f86319446aa3584723ad637be28a",
1493 firstPrivKey: "MD2NsZQtBdXGvox6VzpZfnhHyDJ2NHzzdSE6jUeUjQuaBRQ3LXUg",
85f762c9 1494 };
1495 testNetwork(done, params);
1496});
1497it('Allows selection of Nushares', function(done) {
1498 var params = {
1499 selectText: "NSR - Nushares",
1dafc30d 1500 phrase: "abandon abandon ability",
85f762c9 1501 firstAddress: "SecjXzU3c7EecdT7EbC4vvmbdtBBokWh6J",
1dafc30d
IC
1502 firstPubKey: "02e0e94d07415703fd89b8a72f22fc28e7b916c0649bea2c53e6600377a4d125b5",
1503 firstPrivKey: "P5SXdUhciyemKJojb5tBFPKjVyX4Ymf1wdKDPmYHRigxPAnDNudM",
85f762c9 1504 };
1505 testNetwork(done, params);
1506});
1507it('Allows selection of Okcash', function(done) {
1508 var params = {
1509 selectText: "OK - Okcash",
1dafc30d 1510 phrase: "abandon abandon ability",
85f762c9 1511 firstAddress: "PV4Qp1TUYuGv4TqVtLZtqvrsWWRycfx1Yi",
1dafc30d
IC
1512 firstPubKey: "02ab6d1d1b2c6f19f9c13cf0cd48e352e04245026d25de014cde0493c773f27789",
1513 firstPrivKey: "WuuneUUV8naqRRs1mSAdSVfZ9g6VXLWRV7NVEYdugts8vT2iNXR",
85f762c9 1514 };
1515 testNetwork(done, params);
1516});
1517it('Allows selection of Omnicore', function(done) {
1518 var params = {
1519 selectText: "OMNI - Omnicore",
1dafc30d 1520 phrase: "abandon abandon ability",
85f762c9 1521 firstAddress: "1Q1t3gonjCT3rW38TsTsCvgSc3hh7zBGbi",
1dafc30d
IC
1522 firstPubKey: "02a8cadac7ee1d034f968c1441481fc2c941c8f529a17b6810e917f9ccc893fa3a",
1523 firstPrivKey: "KyvFh1tWTBsLWxJTVjpTpfjJ7eha81iks7NiD6FvrC23o24oAhcs",
85f762c9 1524 };
1525 testNetwork(done, params);
1526});
af14981d
A
1527it('Allows selection of DeepOnion', function(done) {
1528 var params = {
1529 selectText: "ONION - DeepOnion",
1dafc30d 1530 phrase: "abandon abandon ability",
858c29e3 1531 firstAddress: "DYREY7XCFXVqJ3x5UuN43k2JwD2s1kif48",
1dafc30d
IC
1532 firstPubKey: "030ed256ea98edd15006a57fd4d3c60b2b811ecd74107c3fa1ac36558107c139b3",
1533 firstPrivKey: "QZZHsJF9C9okF5JV2qx4H1NgCCQqeio6k8cryKyrpU3TPnDhSzwV",
af14981d
A
1534 };
1535 testNetwork(done, params);
1536});
85f762c9 1537it('Allows selection of Pesobit', function(done) {
1538 var params = {
1539 selectText: "PSB - Pesobit",
1dafc30d 1540 phrase: "abandon abandon ability",
85f762c9 1541 firstAddress: "PDePsF7ALyXP7JaywokdYiRTDtKa14MAr1",
1dafc30d
IC
1542 firstPubKey: "023dd8af1b0196275ee2fb450279656ab16f86221d47f62094c78088200d67e90f",
1543 firstPrivKey: "U9eg6xGhoA9H4aHmQtXPP1uR3dR3EjbdmTr3ejVK5jdhWFoJotSj",
85f762c9 1544 };
1545 testNetwork(done, params);
1546});
1547it('Allows selection of Pinkcoin', function(done) {
1548 var params = {
1549 selectText: "PINK - Pinkcoin",
1dafc30d 1550 phrase: "abandon abandon ability",
85f762c9 1551 firstAddress: "2TgjYQffjbzUHJghNaVbdsjHbRwruC3yzC",
1dafc30d
IC
1552 firstPubKey: "02fcc7a9d26b78c1ef3149dc3fcb9fbd68293fe5627a9099a01e5acf5f848d029d",
1553 firstPrivKey: "LX84Cjro1aRwwqTDu2jqNTPvproSm7VJCyMFLCeEKa4LTFGzXgks",
85f762c9 1554 };
1555 testNetwork(done, params);
1556});
1557it('Allows selection of POSWcoin', function(done) {
1558 var params = {
1559 selectText: "POSW - POSWcoin",
1dafc30d 1560 phrase: "abandon abandon ability",
85f762c9 1561 firstAddress: "PNxewmZoPnGBvoEbH6hgQZCK1igDiBCdgC",
1dafc30d
IC
1562 firstPubKey: "0358e511140f2f2bc96debf22639b36cc9b12addc386ac7a1de7dca05896ec0162",
1563 firstPrivKey: "UCs7SQEhD8r3GwXL99M8sBuxcqB9uke6kRSh7qQfbH9VdS6g919B",
85f762c9 1564 };
1565 testNetwork(done, params);
1566});
1567it('Allows selection of Potcoin', function(done) {
1568 var params = {
1569 selectText: "POT - Potcoin",
1dafc30d 1570 phrase: "abandon abandon ability",
85f762c9 1571 firstAddress: "PEo7Vg2ctXgpP4vuLPeY9aGJtZotyrmiHc",
1dafc30d
IC
1572 firstPubKey: "02b86d3f153eac657f140a8ce9ae530504eea3c9894e594b9c9ddf0cfe393dc8ab",
1573 firstPrivKey: "U89dfzjfUtTSEKaRzr3FPw7ark3bjZAzTVw5kedjBcFj1UAdBcdE",
85f762c9 1574 };
1575 testNetwork(done, params);
1576});
1577it('Allows selection of Putincoin', function(done) {
1578 var params = {
1579 selectText: "PUT - Putincoin",
1dafc30d 1580 phrase: "abandon abandon ability",
85f762c9 1581 firstAddress: "PViWnfr2uFtovd6e7joM49C94CsGSnqJis",
1dafc30d
IC
1582 firstPubKey: "0387bbd868cb20682619733e63205c66d460014714db26593d55c916c34f7e7970",
1583 firstPrivKey: "UBB9nGXWEMjhmvWqta83YkSYLLc1vjkqsnP289jbwMPG72LpAiUg",
85f762c9 1584 };
1585 testNetwork(done, params);
1586});
31264e8b
PT
1587it('Allows selection of Rapids', function(done) {
1588 var params = {
1589 selectText: "RPD - Rapids",
1dafc30d 1590 phrase: "abandon abandon ability",
31264e8b 1591 firstAddress: "Ri8XxUdZaXS5LqxmFJcFEjFinkaMbmhSUp",
1dafc30d
IC
1592 firstPubKey: "03cf69b270c1d03bbedb39f21d70a0a2aa0192b7dfb26bff4bf9a4ed8315d90f4e",
1593 firstPrivKey: "7sgLTht7XHwAkEgEpm7FJE6Tkv7GqCXxSSKPsr4hWYDNePUhBx6t",
31264e8b
PT
1594 };
1595 testNetwork(done, params);
1596});
1fe8f519 1597it('Allows selection of Ravencoin', function(done) {
1598 var params = {
1599 selectText: "RVN - Ravencoin",
1dafc30d 1600 phrase: "abandon abandon ability",
1fe8f519 1601 firstAddress: "RBuDoVNnzvFsEcX8XKPm8ic4mgiCzjUCNk",
1dafc30d
IC
1602 firstPubKey: "02135446ddfa13617ada02187702b51c3ae17a671773aa7ab7100a3cb89b7c9eb1",
1603 firstPrivKey: "KwRpyD9EmoyjQQRKtFVYL1WkS9Ywue8zSpebRPtXViiGR8kWUEJV",
1fe8f519 1604 };
1605 testNetwork(done, params);
1606});
85f762c9 1607it('Allows selection of Reddcoin', function(done) {
1608 var params = {
1609 selectText: "RDD - Reddcoin",
1dafc30d 1610 phrase: "abandon abandon ability",
2ab3faf4 1611 firstAddress: "RtgRvXMBng1y51ftteveFqwNfyRG18HpxQ",
1dafc30d
IC
1612 firstPubKey: "026565dd8a2e6f75e6391fbe16e6fb7dfab8b9cba85ea56b63f015d98c13d8f46d",
1613 firstPrivKey: "V1cNKW3ZYbRXosccyG9d3t4g7nGCBGyQJi7zLe6WZ3tExXMUqqK1",
85f762c9 1614 };
1615 testNetwork(done, params);
1616});
1617it('Allows selection of RevolutionVR', function(done) {
1618 var params = {
1619 selectText: "RVR - RevolutionVR",
1dafc30d 1620 phrase: "abandon abandon ability",
85f762c9 1621 firstAddress: "VXeeoP2jkzZnMFxtc66ZBZK1NHN5QJnnjL",
1dafc30d
IC
1622 firstPubKey: "03c107f37ffb305d70a690ecd89254a67099d8855a4162762c62e3ad72e78c50e4",
1623 firstPrivKey: "WQdDNS6ZPZcFfBn7AwFMu1GHkm5jScBwpVDqNjmC16PEU7yG97vP",
85f762c9 1624 };
1625 testNetwork(done, params);
1626});
1627it('Allows selection of Rubycoin', function(done) {
1628 var params = {
1629 selectText: "RBY - Rubycoin",
1dafc30d 1630 phrase: "abandon abandon ability",
85f762c9 1631 firstAddress: "RV76JDtjTs11JdMDRToYn6CHecMRPLnKS6",
1dafc30d
IC
1632 firstPubKey: "037828022748cf1f2107e9d99f7a19b8b44ebb24b332c51c0ca1cecec301cf1797",
1633 firstPrivKey: "UwQPqs31g9AKQzLjHNqgXN66tout2i6F7VSiCsSsR3LVHq7aToVL",
85f762c9 1634 };
1635 testNetwork(done, params);
1636});
7878bb32
S
1637it('Allows selection of Salus', function(done) {
1638 var params = {
1639 selectText: "SLS - Salus",
1dafc30d 1640 phrase: "abandon abandon ability",
65afae0b 1641 firstAddress: "SNzPi1CafHFm3WWjRo43aMgiaEEj3ogjww",
1dafc30d
IC
1642 firstPubKey: "020c3ab49a6de010d23ddf14dec67666d7ad46dafbae9841db7723bbb0044067cc",
1643 firstPrivKey: "VMYkYTHeeHiosSQM9EFFdEH1a7fiMEL3TgBPxQVhXWqxAvyQ3uJL",
7878bb32 1644 };
65afae0b 1645 testNetwork(done, params);
c4086c24 1646});
85f762c9 1647it('Allows selection of Smileycoin', function(done) {
1648 var params = {
1649 selectText: "SMLY - Smileycoin",
1dafc30d 1650 phrase: "abandon abandon ability",
85f762c9 1651 firstAddress: "BEZVnEBCAyFByrgKpwAgYgtvP4rKAd9Sj2",
1dafc30d
IC
1652 firstPubKey: "02145f25ab87def3ce6decffc6bf740037dc467a32ff8e62f147c70f5092074f2b",
1653 firstPrivKey: "pC32pZDfv3L3vegrv8gptiyc3SkJEZ6BigioGjLmD3wFw2h1qcz",
85f762c9 1654 };
1655 testNetwork(done, params);
1656});
1657it('Allows selection of Solarcoin', function(done) {
1658 var params = {
1659 selectText: "SLR - Solarcoin",
1dafc30d 1660 phrase: "abandon abandon ability",
85f762c9 1661 firstAddress: "8LZ13HbnjtaMJWSvvVFNTLf71zFfDrhwLu",
1dafc30d
IC
1662 firstPubKey: "0305dbadd4fd239ecfca9239c9405e3b12178d46bdaf7520d511339a05367a3c88",
1663 firstPrivKey: "NeNfMe2zy5R6eUVJ3pZ4hs17s4xtm7xHjLJoe1hgCwVoYsfHx5Jy",
85f762c9 1664 };
1665 testNetwork(done, params);
1666});
ae51db39
B
1667it('Allows selection of stash', function(done) {
1668 var params = {
1669 selectText: "STASH - Stash",
1dafc30d 1670 phrase: "abandon abandon ability",
ae51db39 1671 firstAddress: "XxwAsWB7REDKmAvHA85SbEZQQtpxeUDxS3",
1dafc30d
IC
1672 firstPubKey: "030caa120ce0fbd2c2d08a24c15086bafcf55d3862f423b0e55fd376474a0e7160",
1673 firstPrivKey: "XF3r4xQozRKvRUNgQG1bx8MGCuSLzV82XrNfB52Utpaixm8tWmWz",
ae51db39
B
1674 };
1675 testNetwork(done, params);
1676});
1677it('Allows selection of stash testnet', function(done) {
1678 var params = {
1679 selectText: "STASH - Stash Testnet",
1dafc30d 1680 phrase: "abandon abandon ability",
f40c5c24 1681 firstAddress: "yWQCTSkUst7ddYuebKsqa1kSoXEjpCkGKR",
1dafc30d
IC
1682 firstPubKey: "02a709b853a4ac1739c036c3d2bcf03b3e8c54b64927c57a07ac05c8e903545dd0",
1683 firstPrivKey: "cNrt5ghh7pPGQZVZkL5FJFNsWQQTKQPtLJz2JT7KnsfpzeAPYSp3",
ae51db39
B
1684 };
1685 testNetwork(done, params);
1686});
85f762c9 1687it('Allows selection of Stratis', function(done) {
1688 var params = {
1689 selectText: "STRAT - Stratis",
1dafc30d 1690 phrase: "abandon abandon ability",
85f762c9 1691 firstAddress: "ScfJnq3QDhKgDMEds6sqUE1ot6ShfhmXXq",
1dafc30d
IC
1692 firstPubKey: "0269cea528e4ed01b44729287c831fe1889b196fee6202956a7e5c9486c3bc5c00",
1693 firstPrivKey: "VLx3VXEsVzWVeZjHvrgCJ8N1H7JCEWTSHiEGsYUEZCedHR6yBqDU",
85f762c9 1694 };
1695 testNetwork(done, params);
1696});
e96d3876
AD
1697it('Allows selection of Stratis Test', function(done) {
1698 var params = {
c990aff8 1699 selectText: "TSTRAT - Stratis Testnet",
1dafc30d 1700 phrase: "abandon abandon ability",
e96d3876 1701 firstAddress: "TRLWm3dye4FRrDWouwYUSUZP96xb76mBE3",
1dafc30d
IC
1702 firstPubKey: "0269cea528e4ed01b44729287c831fe1889b196fee6202956a7e5c9486c3bc5c00",
1703 firstPrivKey: "VLx3VXEsVzWVeZjHvrgCJ8N1H7JCEWTSHiEGsYUEZCedHR6yBqDU",
e96d3876
AD
1704 };
1705 testNetwork(done, params);
1706});
4958ea80
JC
1707it('Allows selection of Sugarchain', function(done) {
1708 var params = {
1709 selectText: "SUGAR - Sugarchain",
1710 phrase: "abandon abandon ability",
1711 firstAddress: "SYnd31fYr39VgKju87Vz1sYBmEeHg5cudk",
1712 firstPubKey: "035bc9fa22eff2246ec07bb09c9e32f5f9fee517b4f49a8f117508f8fb41905b25",
1713 firstPrivKey: "L2G3axGdZv5EV8osAsBPMese74i4dTHaGvxDh7DsRF5Ky6hKkPDY",
1714 };
1715 testNetwork(done, params);
1716});
75944050
JC
1717it('Allows selection of Sugarchain Testnet', function(done) {
1718 var params = {
1719 selectText: "TUGAR - Sugarchain Testnet",
1720 phrase: "abandon abandon ability",
1721 firstAddress: "TkoRzLZQyaY88dAACNVwUFMYekR7pv6CbY",
1722 firstPubKey: "035bc9fa22eff2246ec07bb09c9e32f5f9fee517b4f49a8f117508f8fb41905b25",
1723 firstPrivKey: "cSd33sGUzymVeaH8ZGzWiyNhjJ1UHuPGLy6goXgNvMjLDqioARWW",
1724 };
1725 testNetwork(done, params);
1726});
85f762c9 1727it('Allows selection of Syscoin', function(done) {
1728 var params = {
1729 selectText: "SYS - Syscoin",
1dafc30d 1730 phrase: "abandon abandon ability",
85f762c9 1731 firstAddress: "SZwJi42Pst3VAMomyK5DG4157WM5ofRmSj",
1dafc30d
IC
1732 firstPubKey: "02219514722373a337c6425ca5ccc423e160f0abf66b57a71fba4db7aca6957f6a",
1733 firstPrivKey: "L36rm7aHFTz571YY87nA3ZLace8NcqPYZsyuyREuT4wXFtTBqLrc",
85f762c9 1734 };
1735 testNetwork(done, params);
1736});
1737it('Allows selection of Toa', function(done) {
1738 var params = {
1739 selectText: "TOA - Toa",
1dafc30d 1740 phrase: "abandon abandon ability",
85f762c9 1741 firstAddress: "TSe1QAnUwQzUfbBusDzRJ9URttrRGKoNKF",
1dafc30d
IC
1742 firstPubKey: "0332facd2ea64c2f1e6152961340b7e51ca77f1bffa0f950442b4ef5021f7ee86c",
1743 firstPrivKey: "VdSdDaM1Kjw1SzzW7KCzFEFi7Zf5egUHVofSiLkrSh7K6bbYZhnb",
85f762c9 1744 };
1745 testNetwork(done, params);
82e3938a 1746});
1747it('Allows selection of TWINS', function(done) {
1748 var params = {
1749 selectText: "TWINS - TWINS",
1dafc30d 1750 phrase: "abandon abandon ability",
82e3938a 1751 firstAddress: "WPpJnfLLubNmF7HLNxg8d8zH5haxn4wri8",
1dafc30d
IC
1752 firstPubKey: "02a4b9bda2a7a2e4540d54c4afb3a3007f6f22f8cd2df67d5c69388fd8ddc16a07",
1753 firstPrivKey: "Au5fg7nYMXHmNT9BSfQVNxaUduP9cgJASeNDMrP9qfoWi2ZTmR48",
82e3938a 1754 };
1755 testNetwork(done, params);
1756});
1757it('Allows selection of TWINS testnet', function(done) {
1758 var params = {
1759 selectText: "TWINS - TWINS Testnet",
1dafc30d 1760 phrase: "abandon abandon ability",
82e3938a 1761 firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa",
1dafc30d
IC
1762 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
1763 firstPrivKey: "cBtMfPpQg4s1Ndfez7oLdedwu8CxshhWE5f7qunhLsY4ueNvKKyM",
82e3938a 1764 };
1765 testNetwork(done, params);
85f762c9 1766});
1767it('Allows selection of Ultimatesecurecash', function(done) {
1768 var params = {
1769 selectText: "USC - Ultimatesecurecash",
1dafc30d 1770 phrase: "abandon abandon ability",
85f762c9 1771 firstAddress: "UPyLAZU2Che5fiy7Ed8xVJFmXAUhitA4ug",
1dafc30d
IC
1772 firstPubKey: "03a529111ee6d54965962b289f7537db1edb57863e2e10dd96939f8d3501ecebd4",
1773 firstPrivKey: "VG1ZbBExPyeeT72EL1jQU8SvXkpK6heTept76wLiGCuMgRHqrz9L",
85f762c9 1774 };
1775 testNetwork(done, params);
1776});
1777it('Allows selection of Unobtanium', function(done) {
1778 var params = {
1779 selectText: "UNO - Unobtanium",
1dafc30d 1780 phrase: "abandon abandon ability",
85f762c9 1781 firstAddress: "uUBMPVMXrR6qhqornJqKTWgr8L69vihSL9",
1dafc30d
IC
1782 firstPubKey: "026dd108ff43d425ad923f2107f5fc166cbb90dd0bd04b157c1ebdc9c04a423e0f",
1783 firstPrivKey: "aAf6LmMJpWQMZbHVSHtkKDCNViknGD4TQ3y1rwvJe2L55dwpbqBV",
85f762c9 1784 };
1785 testNetwork(done, params);
1786});
1787it('Allows selection of Vcash', function(done) {
1788 var params = {
1789 selectText: "XVC - Vcash",
1dafc30d 1790 phrase: "abandon abandon ability",
85f762c9 1791 firstAddress: "VuL53MSY6KjvAjKSeRkh3NDnKykacDVeps",
1dafc30d
IC
1792 firstPubKey: "03ab245795cf39c4084684d039a01c387472c3626d93d24289d229c27ce9eeeace",
1793 firstPrivKey: "WVC2yAf2rFHzjbKKJeZWNFjMqQ9ATRg3xdtG2FfVDQATpNj5fHy9",
85f762c9 1794 };
1795 testNetwork(done, params);
1796});
1797it('Allows selection of Verge', function(done) {
1798 var params = {
1799 selectText: "XVG - Verge",
1dafc30d 1800 phrase: "abandon abandon ability",
85f762c9 1801 firstAddress: "DCrVuGkMjLJpTGgwAgv9AcMdeb1nkWbjZA",
1dafc30d
IC
1802 firstPubKey: "03cd21de72f291cd5a3632a23a710616416743f60b4667a0f8d3fc03c7fd6e0c77",
1803 firstPrivKey: "QRpRGbTRC7P12PyhiFqyZpVwK5XCGe5Lmr9hbV7ujcjg9cjUGqF7",
85f762c9 1804 };
1805 testNetwork(done, params);
1806});
1807it('Allows selection of Vertcoin', function(done) {
1808 var params = {
1809 selectText: "VTC - Vertcoin",
1dafc30d 1810 phrase: "abandon abandon ability",
85f762c9 1811 firstAddress: "Vf6koGuiWdXQfx8tNqxoNeEDxh4xh5cxsG",
1dafc30d
IC
1812 firstPubKey: "02f15155bc5445fc764db199da5e7ac92112ab9f2a5e408904f145ea29d169010a",
1813 firstPrivKey: "Kxu4LwEJZooaVWGT9ZLzJBuaUFr1hLjuottjT7eTNNWJKk7Hur1u",
85f762c9 1814 };
1815 testNetwork(done, params);
1816});
1817it('Allows selection of Vivo', function(done) {
1818 var params = {
1819 selectText: "VIVO - Vivo",
1dafc30d 1820 phrase: "abandon abandon ability",
85f762c9 1821 firstAddress: "VFmBwuXXGhJe7MarQG2GfzHMFebRHgfSpB",
1dafc30d
IC
1822 firstPubKey: "02d24546a74522e0dc8bbfde66e65201ae81b0f6e2b60239c8baf09c1a53b73f8c",
1823 firstPrivKey: "WLSLMqZjuwzibyhPfaYvxG4z1tRnmVX4yYFtbQmHhU4eKt12Nuqq",
85f762c9 1824 };
1825 testNetwork(done, params);
1826});
1827it('Allows selection of Vpncoin', function(done) {
1828 var params = {
1829 selectText: "VASH - Vpncoin",
1dafc30d 1830 phrase: "abandon abandon ability",
85f762c9 1831 firstAddress: "VoEmH1qXC4TsSgBAStR21QYetwnFqbqCx9",
1dafc30d
IC
1832 firstPubKey: "039e579dd18157ef1dff74d46f0bdb95f729d3985f0d4f9167fed4095b1aba846c",
1833 firstPrivKey: "WTbS2wjqeTzs8nk1E1N8RxpPUow8wNkgCjfDCuvDLRHaWFuNhxMz",
85f762c9 1834 };
1835 testNetwork(done, params);
1836});
881fbe22
MR
1837it('Allows selection of VeChain', function(done) {
1838 var params = {
1839 selectText: "VET - VeChain",
1dafc30d 1840 phrase: "abandon abandon ability",
c394ec3c 1841 firstAddress: "0xdba55B1B6070f3a733D5eDFf35F0da4A00E455F2",
1dafc30d
IC
1842 firstPubKey: "0x0386911777255ed1d57906dcc85ca7fd4ba9eb4c8160ced97817933919d1ffe7ad",
1843 firstPrivKey: "0x3ec2b392952fe8a82a319c8ca9a4bb9c1db7beb09c64799da7693615ba1a787e",
881fbe22
MR
1844 };
1845 testNetwork(done, params);
1846});
85f762c9 1847it('Allows selection of Whitecoin', function(done) {
1848 var params = {
1849 selectText: "XWC - Whitecoin",
1dafc30d 1850 phrase: "abandon abandon ability",
85f762c9 1851 firstAddress: "WcSwCAUqrSgeSYbsaS3SSWWhsx8KRYTFDR",
1dafc30d
IC
1852 firstPubKey: "03d3f4fa758f6260bfb39664d248a32258b53a90a71224db056ee79abaa3e9f208",
1853 firstPrivKey: "WrGUVSubUyDx5wzjfwi3EhhUwf5anHFW7Dv9kAaTu39CtDDBJWM9",
85f762c9 1854 };
1855 testNetwork(done, params);
1856});
1857it('Allows selection of Wincoin', function(done) {
1858 var params = {
1859 selectText: "WC - Wincoin",
1dafc30d 1860 phrase: "abandon abandon ability",
85f762c9 1861 firstAddress: "WaDVCESMGgyKgNESdn3u43NnwmGSkZED3Z",
1dafc30d
IC
1862 firstPubKey: "02d10b29f6d88dd86f733b2140ba2207a9dfb5d014bb287541c66a41e467e231a7",
1863 firstPrivKey: "WmLWUvbz8UF1s7PrHyeQBMLbt4LpmQrwbzatvusvx6SRoNASbWtW",
85f762c9 1864 };
85f762c9 1865 testNetwork(done, params);
1866});
0702ecd3 1867it('Allows selection of Zcash', function(done) {
1868 var params = {
1869 selectText: "ZEC - Zcash",
1dafc30d 1870 phrase: "abandon abandon ability",
0702ecd3 1871 firstAddress: "t1Sz8AneMcVuzUg3tPJ8et5AS5LFJ7K2EF9",
1dafc30d
IC
1872 firstPubKey: "035864cede8db462f7ccfda96bd7358156e198a894032cfc87505d82abb6d48b48",
1873 firstPrivKey: "L1eU2kCeBQBZTQKKt7uYu4pb6Z1ZMy1Km1VMznUvGyH64GTxMqfL",
0702ecd3 1874 };
1875 testNetwork(done, params);
1876});
1e2cc748 1877it('Allows selection of Zclassic', function(done) {
1878 var params = {
1879 selectText: "ZCL - Zclassic",
1dafc30d 1880 phrase: "abandon abandon ability",
1e2cc748 1881 firstAddress: "t1TBMxTvVJRybUbMLGWq8H4A8F4VUL7czEc",
1dafc30d
IC
1882 firstPubKey: "02fbdf32c4d9e692d4a94aa09f830a2a3b7b73f5c4f313b8234fc39a8b151c9ab7",
1883 firstPrivKey: "L5N7BBrrAweLcbAQGVDLZAaX9DnfAiD2VCZBBU1U3HBftFsRfHm7",
1e2cc748 1884 };
1885 testNetwork(done, params);
1886});
ec38b3a2 1887it('Allows selection of Horizen', function(done) {
1e2cc748 1888 var params = {
ec38b3a2 1889 selectText: "ZEN - Horizen",
1dafc30d 1890 phrase: "abandon abandon ability",
1e2cc748 1891 firstAddress: "znWh9XASyW2dZq5tck84wFjiwuqVysi7q3p",
1dafc30d
IC
1892 firstPubKey: "0326a78c08ef8a2b6c0d0d3959ffeddaad64fc921b0e714baeafff4785db31ff7a",
1893 firstPrivKey: "L25L6Ctvb4fr6fTaVVECE2CVoeGuttfUJqk1HQxfuejgb5QZHu8y",
1e2cc748 1894 };
1895 testNetwork(done, params);
1896});
1897it('Allows selection of Energi', function(done) {
1898 var params = {
1899 selectText: "NRG - Energi",
1dafc30d 1900 phrase: "abandon abandon ability",
1e2cc748 1901 firstAddress: "EejRy4t4nidzhGGzkJUgFP3z4HYBjhTsRt",
1dafc30d
IC
1902 firstPubKey: "03a4aa1d4d5bdce7c18df69b123ef292e7e9b6069948b14bf3ee089188076e7c80",
1903 firstPrivKey: "GkMWjZtHh9RXFeNL2m5GKPp3wdNmiaSqqUWVLunR766TjbigK4FC",
1e2cc748 1904 };
1905 testNetwork(done, params);
1906});
bb381a72 1907it('Allows selection of Ethereum Classic', function(done) {
1908 var params = {
1909 selectText: "ETC - Ethereum Classic",
1dafc30d 1910 phrase: "abandon abandon ability",
c394ec3c 1911 firstAddress: "0x3c05e5556693808367afB62eF3b63e35d6eD249A",
1dafc30d
IC
1912 firstPubKey: "0x02afa443029a20b62fe90c3eaa772d440d8e2ddc1ad247c3473b3ff34dc0583f3f",
1913 firstPrivKey: "0x5253e43358ddb97c8c710a2f51fcbdf7c07aad193ddd29c8b57dbab50d6141f2",
bb381a72 1914 };
1915 testNetwork(done, params);
1916});
1917it('Allows selection of Pirl', function(done) {
1918 var params = {
1919 selectText: "PIRL - Pirl",
1dafc30d 1920 phrase: "abandon abandon ability",
c394ec3c 1921 firstAddress: "0xe77FC0723dA122B5025CA79193c28563eB47e776",
1dafc30d
IC
1922 firstPubKey: "0x039b4d13ecf9ef299546ba0d486969e0b659baa0cb71278501a46dce4381f612de",
1923 firstPrivKey: "0xe76ed1cffd0572b31be2ada6848d46e267b8b2242b30f1a92142f64ee4772460",
bb381a72 1924 };
1925 testNetwork(done, params);
1926});
1927it('Allows selection of MIX', function(done) {
1928 var params = {
1929 selectText: "MIX - MIX",
1dafc30d 1930 phrase: "abandon abandon ability",
c394ec3c 1931 firstAddress: "0x98BC5e63aeb6A4e82d72850d20710F07E29A29F1",
1dafc30d
IC
1932 firstPubKey: "0x02686ad3d73950627c46b73cd0c0d3b17e0bdcb89c094ce68b2f4219c09016c547",
1933 firstPrivKey: "0x70deca38fff7d8a2490491deb1bb7fbc979d6a0b97000b9f1eddefdd214eb7da",
bb381a72 1934 };
1935 testNetwork(done, params);
1936});
31264e8b
PT
1937it('Allows selection of Monkey Project', function(done) {
1938 var params = {
1939 selectText: "MONK - Monkey Project",
1dafc30d 1940 phrase: "abandon abandon ability",
31264e8b 1941 firstAddress: "MnLrcnnUzKnf7TzufjRe5DLZqQJz18oYyu",
1dafc30d
IC
1942 firstPubKey: "03a3f72bd9023fa12b22e5255d74e80420a968b577efbc52cea283da0f6690d4fc",
1943 firstPrivKey: "9B4CknHTfmvPS3oEG6AjJUMz1SZtJKN6rmEoaFoZNCJd1EU1xVdS",
31264e8b
PT
1944 };
1945 testNetwork(done, params);
1946});
1947
f3101bd3
LL
1948it('Allows selection of MOAC', function(done) {
1949 var params = {
1950 selectText: "MOAC - MOAC",
1951 phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
1952 firstAddress: "0xa1350EA5707247e0092Ab780A0CDbeA9c8C7Acb5",
1953 firstPubKey: "0x0376b024c6068c9fda7e91779e115dcd3a70584fd6984e6dd25da144c46ca259c6",
1954 firstPrivKey: "0x2515f9db03c1e56de393648eabf35d288f730aadce5d30865c52e72b28e303c9",
1955 };
1956 testNetwork(done, params);
1957});
bb381a72 1958it('Allows selection of Musicoin', function(done) {
1959 var params = {
1960 selectText: "MUSIC - Musicoin",
1dafc30d 1961 phrase: "abandon abandon ability",
c394ec3c 1962 firstAddress: "0xDc060e4A0b0313ea83Cf6B3A39B9db2D29004897",
1dafc30d
IC
1963 firstPubKey: "0x02a17278d54548e7cf0c1e6120646174f42e380ae5a0080f1a0d09f118305d6f9f",
1964 firstPrivKey: "0xaea8683b8bfd56b6fc68c19b88eee4ccd2f00430bc466741d0297aa65c7b56a5",
bb381a72 1965 };
1966 testNetwork(done, params);
1967});
1968it('Allows selection of Poa', function(done) {
1969 var params = {
1970 selectText: "POA - Poa",
1dafc30d 1971 phrase: "abandon abandon ability",
c394ec3c 1972 firstAddress: "0x53aF28d754e106210C3d0467Dd581eaf7e3C5e60",
1dafc30d
IC
1973 firstPubKey: "0x02cda40cf7f21f370afe0206cbf219f963369d7c7229dc7ba64137358489d96567",
1974 firstPrivKey: "0xed0a44cff8e44fa978f339af3308ee439c30f4170671ad0e1ccd7e4bfff70ed9",
bb381a72 1975 };
1976 testNetwork(done, params);
1977});
1978it('Allows selection of Expanse', function(done) {
1979 var params = {
1980 selectText: "EXP - Expanse",
1dafc30d 1981 phrase: "abandon abandon ability",
c394ec3c 1982 firstAddress: "0xf57FeAbf26582b6E3E666559d3B1Cc6fB2b2c5F6",
1dafc30d
IC
1983 firstPubKey: "0x0232fa15f0971f93c182afea54cb28a3180f5a4c31759235ca6ceca47a5a777335",
1984 firstPrivKey: "0x9f96418f9ec3672b52c2a6421272650b2d5992d524a48905a4ff0ed9ce347c9b",
bb381a72 1985 };
1986 testNetwork(done, params);
1987});
1988it('Allows selection of Callisto', function(done) {
1989 var params = {
1990 selectText: "CLO - Callisto",
1dafc30d 1991 phrase: "abandon abandon ability",
c394ec3c 1992 firstAddress: "0x4f9364F7420B317266C51Dc8eB979717D4dE3f4E",
1dafc30d
IC
1993 firstPubKey: "0x0313d9db8d77249c768630a5a8315e08e3a3284d7e18774476d15e073931ddc15e",
1994 firstPrivKey: "0x02bbf00719f3730baf989f7392b8d55548dd349abd744c68242c69bd016ce28d",
bb381a72 1995 };
1996 testNetwork(done, params);
1997});
0afecfc7
IC
1998it('Allows selection of HUSH', function(done) {
1999 var params = {
318ec4dc 2000 selectText: "HUSH - Hush (Legacy)",
1dafc30d 2001 phrase: "abandon abandon ability",
0afecfc7 2002 firstAddress: "t1g6rLXUnJaiJuu4q4zmJjoa9Gk4fwKpiuA",
1dafc30d
IC
2003 firstPubKey: "038702683b2d7bbb5c35e18e01cd18483cda8485fb919f34c0186ae31a05007755",
2004 firstPrivKey: "Kx99fhLCDHPsBsZAJDH7v8vgGDch4rNr9VjhAUMfVevJWnoGr8WD",
0afecfc7
IC
2005 };
2006 testNetwork(done, params);
2007});
318ec4dc
PC
2008it('Allows selection of HUSH3', function(done) {
2009 var params = {
2010 selectText: "HUSH - Hush3",
1dafc30d 2011 phrase: "abandon abandon ability",
318ec4dc 2012 firstAddress: "RXWSQhwvw5jHPGP8bjwJhWoRnMLBnuPDKD",
1dafc30d
IC
2013 firstPubKey: "038702683b2d7bbb5c35e18e01cd18483cda8485fb919f34c0186ae31a05007755",
2014 firstPrivKey: "UpvyyNxAiWN7evMFUkxhgabuCHfq9xeTv17Wjj9LxN91QegKs6RR",
318ec4dc
PC
2015 };
2016 testNetwork(done, params);
2017});
a44c45e3 2018it('Allows selection of ExchangeCoin', function(done) {
2019 var params = {
2020 selectText: "EXCC - ExchangeCoin",
1dafc30d 2021 phrase: "abandon abandon ability",
a44c45e3 2022 firstAddress: "22txYKpFN5fwGwdSs2UBf7ywewbLM92YqK7E",
1dafc30d
IC
2023 firstPubKey: "033f5aed5f6cfbafaf223188095b5980814897295f723815fea5d3f4b648d0d0b3",
2024 firstPrivKey: "L26cVSpWFkJ6aQkPkKmTzLqTdLJ923e6CzrVh9cmx21QHsoUmrEE",
a44c45e3 2025 };
2026 testNetwork(done, params);
2027});
2575538b
PC
2028it('Allows selection of Artax', function(done) {
2029 var params = {
2030 selectText: "XAX - Artax",
1dafc30d 2031 phrase: "abandon abandon ability",
2575538b 2032 firstAddress: "AYxaQPY7XLidG31V7F3yNzwxPYpYzRqG4q",
1dafc30d
IC
2033 firstPubKey: "02edef928ec3951112452119f9a63d9479741ea0fc497682bd13064cfc5d1cc4e3",
2034 firstPrivKey: "PMcqFx52ipYy9gZynEi5LYVD3XUC8YbQr2Neg6e3LFnh4yTBQ9yJ",
2575538b
PC
2035 };
2036 testNetwork(done, params);
2037});
8b2a093c
PC
2038it('Allows selection of BitcoinGreen', function(done) {
2039 var params = {
2040 selectText: "BITG - Bitcoin Green",
1dafc30d 2041 phrase: "abandon abandon ability",
8b2a093c 2042 firstAddress: "GeNGm9SkEfwbsws3UrrUSE2sJeyWYjzraY",
1dafc30d
IC
2043 firstPubKey: "02a8e34c2599a14ca861285b734750432a7ce10caf7f1ff5a366a94264c636a12b",
2044 firstPrivKey: "7uf6WeVgBqKR1WyUcaz1TLSKabyov9SfQDghyvfaCy6VZPwLNeku",
8b2a093c
PC
2045 };
2046 testNetwork(done, params);
2047});
45588661
KP
2048it('Allows selection of ANON', function(done) {
2049 var params = {
2050 selectText: "ANON - ANON",
1dafc30d 2051 phrase: "abandon abandon ability",
45588661 2052 firstAddress: "AnU6pijpEeUZFWSTyM2qTqZQn996Zq1Xard",
1dafc30d
IC
2053 firstPubKey: "032742ff4eaf9188d84d38dfb4a2fdbb541bfd3ca9ee533a7d1092940a1ea60bb4",
2054 firstPrivKey: "L2w3aoZExc9eHh1KMnDzrzaSVmfgQMvBxxFbtcegKNvrHVa4r81m",
45588661
KP
2055 };
2056 testNetwork(done, params);
2057});
d2ba3871
PC
2058it('Allows selection of ProjectCoin', function(done) {
2059 var params = {
2060 selectText: "PRJ - ProjectCoin",
1dafc30d 2061 phrase: "abandon abandon ability",
d2ba3871 2062 firstAddress: "PXZG97saRseSCftfe1mcFmfAA7pf6qBbaz",
1dafc30d
IC
2063 firstPubKey: "025f84297a93a33bccb735c931140ddb4279fe9d55a571ee7731259e3e19d0c7fe",
2064 firstPrivKey: "JRR5uB6daEtSCLNnv7hKSgZ5KmFdHMUcpTzJGtEAi9sWSiQd4hVQ",
d2ba3871
PC
2065 };
2066 testNetwork(done, params);
2067});
38d1b296
PC
2068it('Allows selection of Phore', function(done) {
2069 var params = {
2070 selectText: "PHR - Phore",
1dafc30d 2071 phrase: "abandon abandon ability",
38d1b296 2072 firstAddress: "PJThxpoXAG6hqrmdeQQbVDX4TJtFTMMymC",
1dafc30d
IC
2073 firstPubKey: "022ef3c4cbc0481fd925ecac51f09f2976ea024b0863b543b1b481181e1ef34265",
2074 firstPrivKey: "YPzQxHMA2Pm5S2p8Xwhmhm2PnH6ooYHrWNXiAKCCA2CjMtHyNzuh",
38d1b296
PC
2075 };
2076 testNetwork(done, params);
2077});
f1f1e39f
E
2078it('Allows selection of Safecoin', function(done) {
2079 var params = {
2080 selectText: "SAFE - Safecoin",
1dafc30d 2081 phrase: "abandon abandon ability",
869f5375 2082 firstAddress: "RtxHpnhJz6RY8k9owP3ua5QWraunmewB1G",
1dafc30d
IC
2083 firstPubKey: "0383956cd23c1124324c92ac69f4bcf71ad973892a83aceb4085041afb082f6db9",
2084 firstPrivKey: "Uznk2AHWqpSGRw8dmG3t3Q3rJJwyn3TcjzWh9EgDCQ9jU34DWF6m",
f1f1e39f
E
2085 };
2086 testNetwork(done, params);
2087 });
6f435817
U
2088it('Allows selection of Blocknode', function(done) {
2089 var params = {
2090 selectText: "BND - Blocknode",
1dafc30d 2091 phrase: "abandon abandon ability",
6f435817 2092 firstAddress: "BG8xZSAur2jYLG9VXt8dYfkKxxeR7w9bSe",
1dafc30d
IC
2093 firstPubKey: "03e91c00dcfca87c80f57691e34e0e4c55a18eb79048dbdd5f6d9c83daefea6459",
2094 firstPrivKey: "C6gySxND85cLnLgsjTfUxXmMzh8JrSR24vpQnUHqVMqGYy36k4ho",
6f435817
U
2095 };
2096 testNetwork(done, params);
2097});
2098it('Allows selection of Blocknode Testnet', function(done) {
2099 var params = {
2100 selectText: "tBND - Blocknode Testnet",
1dafc30d 2101 phrase: "abandon abandon ability",
6f435817 2102 firstAddress: "bSptsFyDktFSKpWveRywJsDoJA2TC6qfHv",
1dafc30d
IC
2103 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
2104 firstPrivKey: "MPuJVFnTAhFFvtLqgYL32FBF1g7jPraowuN5tV9EF2AtkYXCfkE3",
6f435817
U
2105 };
2106 testNetwork(done, params);
2107});
d4fcdda9
PC
2108it('Allows selection of LitecoinZ', function(done) {
2109 var params = {
2110 selectText: "LTZ - LitecoinZ",
1dafc30d 2111 phrase: "abandon abandon ability",
d4fcdda9 2112 firstAddress: "L1VTXju7hLgKV4T7fGXS9sKsnm2gmtRCmyw",
1dafc30d
IC
2113 firstPubKey: "03ea84a1cc8b43ea8330bc2f363e706a9ff2d48858185c42c296d06ddcb94bc827",
2114 firstPrivKey: "L1PktmLfTgVRQZsqs2ZoFBBqnVXi5hVAimJt8tmfT2ye95WH9zEd",
d4fcdda9
PC
2115 };
2116 testNetwork(done, params);
2117});
f22f7677
PC
2118it('Allows selection of BlockStamp', function(done) {
2119 var params = {
2120 selectText: "BST - BlockStamp",
1dafc30d 2121 phrase: "abandon abandon ability",
f22f7677 2122 firstAddress: "15gypKtim4cVTj137ApfryG17RkvSbPazZ",
1dafc30d
IC
2123 firstPubKey: "0277bc537f8354004f8a77e07fb78b38f291df7bc07819c2d7eab049b8d10b3f7f",
2124 firstPrivKey: "L1NmycTQz17fXBMzK25aBTnN7v5U6rz3AURjL72xyKg21zmAmgt7",
f22f7677
PC
2125 };
2126 testNetwork(done, params);
2127});
6cbd3bc8
HL
2128it('Allows selection of DEXON', function(done) {
2129 var params = {
2130 selectText: "DXN - DEXON",
1dafc30d 2131 phrase: "abandon abandon ability",
c394ec3c 2132 firstAddress: "0x136a58788033E028CCd740FbDec6734358DB56Ec",
1dafc30d
IC
2133 firstPubKey: "0x028d7fa8c3417904cec37946db8d12bba51d85dde25156651f216260e0ff641cf4",
2134 firstPrivKey: "0x8d7d8479dac38e786d4e493159dd655e116871d17ed803af6bb70207c60298ff",
6cbd3bc8
HL
2135 };
2136 testNetwork(done, params);
2137});
2885ddd5 2138it('Allows selection of Ellaism', function(done) {
2139 var params = {
2140 selectText: "ELLA - Ellaism",
1dafc30d 2141 phrase: "abandon abandon ability",
c394ec3c 2142 firstAddress: "0xa8B0BeA09eeBc41062308546a01d6E544277e2Ca",
1dafc30d
IC
2143 firstPubKey: "0x03698fee21c52ad4b4772df3da92ddf0278da529da231c2ebfb167c9e3cc88f29f",
2144 firstPrivKey: "0xe10bc99fcea6f5bca20c1b6e5386a18991b8d16d658b36881b7aca792e06bac2",
2885ddd5 2145 };
2146 testNetwork(done, params);
2147});
16afe3ec 2148it('Allows selection of Ethersocial Network', function(done) {
2149 var params = {
2150 selectText: "ESN - Ethersocial Network",
1dafc30d 2151 phrase: "abandon abandon ability",
c394ec3c 2152 firstAddress: "0x6EE99Be2A0C7F887a71e21C8608ACF0aa0D2b767",
1dafc30d
IC
2153 firstPubKey: "0x028df59c64daa4f1036fe0dc832c4e36d9df0692a7ed9a062d48a4662a01d2c7b3",
2154 firstPrivKey: "0x44e0316578fd8168022039d5dfd5838e70826686a4b05dec9c88100c30049fce",
16afe3ec 2155 };
2156 testNetwork(done, params);
2157});
152f0ce9
IC
2158it('Allows selection of Stellar', function(done) {
2159 var params = {
2160 selectText: "XLM - Stellar",
1dafc30d 2161 phrase: "abandon abandon ability",
152f0ce9 2162 firstAddress: "GCUK3NYYUXA2QGN6KU5RR36WAKN3Y5EANZV65XNAWN4XM4CHQ3G4DMO2",
1dafc30d
IC
2163 firstPubKey: "GCUK3NYYUXA2QGN6KU5RR36WAKN3Y5EANZV65XNAWN4XM4CHQ3G4DMO2",
2164 firstPrivKey: "SA35HYGAHWYYLCW2P5EDHGWAYQW2C5F25KH4KFWEXLG5I4CPKPZTLRM5",
152f0ce9
IC
2165 };
2166 testNetwork(done, params);
2167});
e0863058
J
2168it('Allows selection of Nano', function(done) {
2169 var params = {
2170 selectText: "NANO - Nano",
2171 phrase: "deal wedding panda forum property artist whip total word student sea middle",
2172 firstAddress: "nano_15fum9n68681dz73qyu37fuc9tro84gqm86eptdqpm9jutkfnt34agkoqpw5",
4566751b
IC
2173 firstPubKey: "0dbb99e84310c05fca1bfb612b76a3eb15309d79988cb6977b4cf1dea4da6822",
2174 firstPrivKey: "30633c8497cc47e0aefd52c7971ffd45e6c5d166274c7978feca3482a859c0af",
e0863058
J
2175 };
2176 testNetwork(done, params);
2177});
67f18e2a
C
2178it('Allows selection of Wagerr', function(done) {
2179 var params = {
2180 selectText: "WGR - Wagerr",
1dafc30d 2181 phrase: "abandon abandon ability",
67f18e2a 2182 firstAddress: "WYiVgQU39VcQxcnacoCiaZHZZLjDCJoS95",
1dafc30d
IC
2183 firstPubKey: "0343cfa1ed85e02fdc782c3c8b0b5febe7653c30a0c4319bef2e7d462e67245e46",
2184 firstPrivKey: "WagfoYsRKgtBwBMgwYWuboY2DpGjJBpFcneqzSegZg4ppvYLWcry",
67f18e2a
C
2185 };
2186 testNetwork(done, params);
2187});
76120cb0
H
2188it('Allows selection of Groestlcoin', function(done) {
2189 var params = {
2190 selectText: "GRS - Groestlcoin",
1dafc30d 2191 phrase: "abandon abandon ability",
76120cb0 2192 firstAddress: "FZycsFvZ1eH1hbtyjBpAgJSukVw1bN6PBN",
1dafc30d
IC
2193 firstPubKey: "03c1d0c7b272a762b4b697bdb1b3b36e26add3215e69f7251db16c5a51c84b7b4c",
2194 firstPrivKey: "KzQVqEsQrKjb4K6bViRqqQJc9nXrvEAxDy2AiPf6tfEkRW7rgNfg",
76120cb0
H
2195 };
2196 testNetwork(done, params);
2197});
2198it('Allows selection of Groestlcoin Testnet', function(done) {
2199 var params = {
2200 selectText: "GRS - Groestlcoin Testnet",
1dafc30d 2201 phrase: "abandon abandon ability",
76120cb0 2202 firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiygRPne9",
1dafc30d
IC
2203 firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
2204 firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJpRHpNq",
76120cb0
H
2205 };
2206 testNetwork(done, params);
2207});
36523e0d
NJ
2208it('Allows selection of Elastos', function(done) {
2209 var params = {
2210 selectText: "ELA - Elastos",
1dafc30d 2211 phrase: "abandon abandon ability",
1ba58161 2212 firstAddress: "EMccDcsn3SwPDcfeQMf3w7utqi8ioWYtkg",
1dafc30d
IC
2213 firstPubKey: "02c936d5025b06acc283bf9562700279fd1ea3ce7ee204afca0c07be77bc3b4822",
2214 firstPrivKey: "608f7e64b46a1df51ba6b5b38b0599196afd1f36572b1ec696d7aae65d05045d",
36523e0d
NJ
2215 };
2216 testNetwork(done, params);
2217});
3799728c 2218it('Allows selection of Energyweb', function(done) {
bfe1963e
IC
2219 var params = {
2220 selectText: "EWT - EnergyWeb",
1dafc30d 2221 phrase: "abandon abandon ability",
c845ee6f 2222 firstAddress: "0x22171474844Fc7E8E99A3A69CCf1eDb5574FdD4c",
1dafc30d
IC
2223 firstPubKey: "0x03eee63d4d201168802b43f392e61f148a478935055cd990549452c741f4c34b84",
2224 firstPrivKey: "0x325aa9e82d03b3773859d84bece81a598df8478d361cfbc59efc27385e0e3611",
bfe1963e
IC
2225 };
2226 testNetwork(done, params);
2227});
93f3a286
IC
2228it('Allows selection of Thought', function(done) {
2229 var params = {
2230 selectText: "THT - Thought",
1dafc30d 2231 phrase: "abandon abandon ability",
93f3a286 2232 firstAddress: "4B1Bh9GibDarFQrhtYU8krpc7WSjgGfYvo",
1dafc30d
IC
2233 firstPubKey: "0390e4598e7924f3b0369020394b133545db6bd37fa3aa4648aafbce46330c28cc",
2234 firstPrivKey: "KCwL3y6VVrgzJFqtCkh2RV9M1zruX9NymKsWheb7by1dWLd2QkFx",
93f3a286
IC
2235 };
2236 testNetwork(done, params);
2237});
9e04576e
EC
2238it('Allows selection of EtherCore', function(done) {
2239 var params = {
2240 selectText: "ERE - EtherCore",
1dafc30d 2241 phrase: "abandon abandon ability",
0bc6361d 2242 firstAddress: "0x119e6EAC3Ce1b473D62d9fD847fb0ea222eF1D9e",
1dafc30d
IC
2243 firstPubKey: "0x02cfeb9a4d8003b5c919c1eb67c91e06b3c08e602a336f74017fc7c756a2550ca9",
2244 firstPrivKey: "0x6bb6e036aaf39326d3c74345ec34ef0c73b1608acb409306c9ba73d22de6abf0",
9e04576e
EC
2245 };
2246 testNetwork(done, params);
2247});
a67554c6
IC
2248it('Allows selection of RBTC - RSK', function(done) {
2249 var params = {
a748c4b5 2250 selectText: "R-BTC - RSK",
1dafc30d 2251 phrase: "abandon abandon ability",
a748c4b5
IC
2252 firstAddress: "0x37CA764c4b2fe819108448b80d2F35921b035931",
2253 firstPubKey: "0x0219d9b5087ab68edc8a714969d8cb70e7159417b47a05932b227e6f417c7962b9",
2254 firstPrivKey: "0x6e6f48cc422825f7fd68f2200d3dde757849f15342f252eeb0bc4ebc46089fe1",
a67554c6
IC
2255 };
2256 testNetwork(done, params);
2257});
2258it('Allows selection of tRBTC - RSK Testnet', function(done) {
2259 var params = {
a748c4b5 2260 selectText: "tR-BTC - RSK Testnet",
1dafc30d 2261 phrase: "abandon abandon ability",
a748c4b5
IC
2262 firstAddress: "0x176484B5a155Fe802aCB26055eb1c193D5A576d5",
2263 firstPubKey: "0x03f77eb7bd83e92ef47be1abddae7f71fb0bc8a7a1ee4b193662a86ed2705ffc5b",
2264 firstPrivKey: "0x18c2400d2f818d28b80d0e31235873bfeef644fc45fd702f54ae0d422cff6ab3",
a67554c6
IC
2265 };
2266 testNetwork(done, params);
2267});
46054e44
OS
2268it('Allows selection of Argoneum', function(done) {
2269 var params = {
2270 selectText: "AGM - Argoneum",
2271 phrase: "abandon abandon ability",
2272 firstAddress: "MWgLPvJkaJwH6hrXFs1MimAC4FwC1kYRhe",
2273 firstPubKey: "0348e5252045fee1d3b1e5bce25dbc16284d5b6c3bfff9c305d4ffa6078c16f3f8",
2274 firstPrivKey: "VJXpuMEFnK8USLyo5tgF7M4cBXU44U8MUor1KRTQ6t9DVno9AAgg",
2275 };
2276 testNetwork(done, params);
2277});
26767a2c
IC
2278it('Allows selection of CranePay', function(done) {
2279 var params = {
2280 selectText: "CRP - CranePay",
2281 phrase: "abandon abandon ability",
2282 firstAddress: "CcUHPqgmef1BmgWFa9g3YNc8scgVXVh8ip",
2283 firstPubKey: "0392af9ea9dc78170c6f68c50bac926f960e50769295f539ac6382a3af2b928740",
2284 firstPrivKey: "KHTCAvKHKg1WdLoDSg3VjjyZK5Wk1ihzJENpp2YMb1RmAxrCZrXX",
2285 };
2286 testNetwork(done, params);
2287});
4729ecca 2288it('Allows selection of Scribe', function(done) {
2289 var params = {
2290 selectText: "SCRIBE - Scribe",
2291 phrase: "abandon abandon ability",
2292 firstAddress: "RYAnPeBLD8veZ9Tw8xugeTC2f9PeZonLHM",
2293 firstPubKey: "02c912bc4759c8a209475502fb5352ff5be8a8f13eb72f1732ee25125cd53edc1e",
2294 firstPrivKey: "HLZWvNCEUv4ghygjH9A2EYCa9HNRcxe5CS42kzUTmoxJYp3z96QE",
2295 };
2296 testNetwork(done, params);
2297});
995bc587
MRV
2298it('Allows selection of Binance Smart Chain', function(done) {
2299 var params = {
2300 selectText: "BSC - Binance Smart Chain",
2301 phrase: "abandon abandon ability",
2302 firstAddress: "0xe5815d5902Ad612d49283DEdEc02100Bd44C2772",
2303 firstPubKey: "0x03e723e5b3aa7d72213f01139aa4783e1b34f74e1a04534e3fd8e29bfe2768af8a",
2304 firstPrivKey: "0x8f253078b73d7498302bb78c171b23ce7a8fb511987d2b2702b731638a4a15e7",
2305 };
2306 testNetwork(done, params);
2307});
0460b53f 2308
47dbf58b 2309it('Allows selection of TRX on Tron', function(done) {
2310 var params = {
2311 selectText: "TRX - Tron",
2312 phrase: "abandon abandon ability",
2313 firstAddress: "TA891Fu7vVz595BGQpNX2MCzr7yBcxuoC7",
2314 firstPubKey: "0337bbb060e6166066f7f9e59e52f67bc23a6c9d0cbc815b82b6d89112444842e7",
2315 firstPrivKey: "3a8fbd0379a815764979de86a3fcda759cb62d49e784e7b2a9a03206c90cfae2",
2316 };
2317 testNetwork(done, params);
2318});
0460b53f
IC
2319
2320// BIP39 seed is set from phrase
2321it('Sets the bip39 seed from the prhase', function(done) {
2322 driver.findElement(By.css('.phrase'))
2323 .sendKeys('abandon abandon ability');
2324 driver.sleep(generateDelay).then(function() {
2325 driver.findElement(By.css('.seed'))
2326 .getAttribute("value")
2327 .then(function(seed) {
2328 expect(seed).toBe("20da140d3dd1df8713cefcc4d54ce0e445b4151027a1ab567b832f6da5fcc5afc1c3a3f199ab78b8e0ab4652efd7f414ac2c9a3b81bceb879a70f377aa0a58f3");
2329 done();
2330 })
2331 });
2332});
2333
2334// BIP32 root key is set from phrase
2335it('Sets the bip39 root key from the prhase', function(done) {
2336 driver.findElement(By.css('.phrase'))
2337 .sendKeys('abandon abandon ability');
2338 driver.sleep(generateDelay).then(function() {
2339 driver.findElement(By.css('.root-key'))
2340 .getAttribute("value")
2341 .then(function(seed) {
2342 expect(seed).toBe("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi");
2343 done();
2344 })
2345 });
2346});
2347
2348// Tabs show correct addresses when changed
2349it('Shows the correct address when tab is changed', function(done) {
2350 driver.findElement(By.css('.phrase'))
2351 .sendKeys('abandon abandon ability');
2352 driver.sleep(generateDelay).then(function() {
2353 driver.findElement(By.css('#bip32-tab a'))
2354 .click();
2355 driver.sleep(generateDelay).then(function() {
2356 getFirstAddress(function(address) {
2357 expect(address).toBe("17uQ7s2izWPwBmEVFikTmZUjbBKWYdJchz");
2358 done();
2359 });
2360 });
2361 });
2362});
2363
2364// BIP44 derivation path is shown
2365it('Shows the derivation path for bip44 tab', function(done) {
2366 driver.findElement(By.css('.phrase'))
2367 .sendKeys('abandon abandon ability');
2368 driver.sleep(generateDelay).then(function() {
2369 driver.findElement(By.css('#bip44 .path'))
2370 .getAttribute("value")
2371 .then(function(path) {
2372 expect(path).toBe("m/44'/0'/0'/0");
2373 done();
2374 })
2375 });
2376});
2377
2378// BIP44 extended private key is shown
2379it('Shows the extended private key for bip44 tab', function(done) {
2380 driver.findElement(By.css('.phrase'))
2381 .sendKeys('abandon abandon ability');
2382 driver.sleep(generateDelay).then(function() {
2383 driver.findElement(By.css('.extended-priv-key'))
2384 .getAttribute("value")
2385 .then(function(path) {
2386 expect(path).toBe("xprvA2DxxvPZcyRvYgZMGS53nadR32mVDeCyqQYyFhrCVbJNjPoxMeVf7QT5g7mQASbTf9Kp4cryvcXnu2qurjWKcrdsr91jXymdCDNxKgLFKJG");
2387 done();
2388 })
2389 });
2390});
2391
2392// BIP44 extended public key is shown
2393it('Shows the extended public key for bip44 tab', function(done) {
2394 driver.findElement(By.css('.phrase'))
2395 .sendKeys('abandon abandon ability');
2396 driver.sleep(generateDelay).then(function() {
2397 driver.findElement(By.css('.extended-pub-key'))
2398 .getAttribute("value")
2399 .then(function(path) {
2400 expect(path).toBe("xpub6FDKNRvTTLzDmAdpNTc49ia9b4byd6vqCdUa46Fp3vqMcC96uBoufCmZXQLiN5AK3iSCJMhf9gT2sxkpyaPepRuA7W3MujV5tGmF5VfbueM");
2401 done();
2402 })
2403 });
2404});
2405
2406// BIP44 account field changes address list
2407it('Changes the address list if bip44 account is changed', function(done) {
2408 driver.findElement(By.css('#bip44 .account'))
2409 .sendKeys('1');
2410 driver.findElement(By.css('.phrase'))
2411 .sendKeys('abandon abandon ability');
2412 driver.sleep(generateDelay).then(function() {
2413 getFirstAddress(function(address) {
2414 expect(address).toBe("1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H");
2415 done();
2416 });
2417 });
2418});
2419
2420// BIP44 change field changes address list
2421it('Changes the address list if bip44 change is changed', function(done) {
2422 driver.findElement(By.css('#bip44 .change'))
2423 .sendKeys('1');
2424 driver.findElement(By.css('.phrase'))
2425 .sendKeys('abandon abandon ability');
2426 driver.sleep(generateDelay).then(function() {
2427 getFirstAddress(function(address) {
2428 expect(address).toBe("1KAGfWgqfVbSSXY56fNQ7YnhyKuoskHtYo");
2429 done();
2430 });
2431 });
2432});
2433
2434// BIP32 derivation path can be set
2435it('Can use a custom bip32 derivation path', function(done) {
2436 driver.findElement(By.css('#bip32-tab a'))
2437 .click();
2438 driver.findElement(By.css('#bip32 .path'))
2439 .clear();
2440 driver.findElement(By.css('#bip32 .path'))
2441 .sendKeys('m/1');
2442 driver.findElement(By.css('.phrase'))
2443 .sendKeys('abandon abandon ability');
2444 driver.sleep(generateDelay).then(function() {
2445 getFirstAddress(function(address) {
2446 expect(address).toBe("16pYQQdLD1hH4hwTGLXBaZ9Teboi1AGL8L");
2447 done();
2448 });
2449 });
2450});
2451
2452// BIP32 can use hardened derivation paths
2453it('Can use a hardened derivation paths', function(done) {
2454 driver.findElement(By.css('#bip32-tab a'))
2455 .click();
2456 driver.findElement(By.css('#bip32 .path'))
2457 .clear();
2458 driver.findElement(By.css('#bip32 .path'))
2459 .sendKeys("m/0'");
2460 driver.findElement(By.css('.phrase'))
2461 .sendKeys('abandon abandon ability');
2462 driver.sleep(generateDelay).then(function() {
2463 getFirstAddress(function(address) {
2464 expect(address).toBe("14aXZeprXAE3UUKQc4ihvwBvww2LuEoHo4");
2465 done();
2466 });
2467 });
2468});
2469
2470// BIP32 extended private key is shown
2471it('Shows the BIP32 extended private key', function(done) {
2472 driver.findElement(By.css('#bip32-tab a'))
2473 .click();
2474 driver.findElement(By.css('.phrase'))
2475 .sendKeys('abandon abandon ability');
2476 driver.sleep(generateDelay).then(function() {
2477 driver.findElement(By.css('.extended-priv-key'))
2478 .getAttribute("value")
2479 .then(function(privKey) {
2480 expect(privKey).toBe("xprv9va99uTVE5aLiutUVLTyfxfe8v8aaXjSQ1XxZbK6SezYVuikA9MnjQVTA8rQHpNA5LKvyQBpLiHbBQiiccKiBDs7eRmBogsvq3THFeLHYbe");
2481 done();
2482 });
2483 });
2484});
2485
2486// BIP32 extended public key is shown
2487it('Shows the BIP32 extended public key', function(done) {
2488 driver.findElement(By.css('#bip32-tab a'))
2489 .click();
2490 driver.findElement(By.css('.phrase'))
2491 .sendKeys('abandon abandon ability');
2492 driver.sleep(generateDelay).then(function() {
2493 driver.findElement(By.css('.extended-pub-key'))
2494 .getAttribute("value")
2495 .then(function(pubKey) {
2496 expect(pubKey).toBe("xpub69ZVZQzP4T8dwPxwbMzz36cNgwy4yzTHmETZMyihzzXXNi3thgg3HCow1RtY252wdw5rS8369xKnraN5Q93y3FkFfJp2XEHWUrkyXsjS93P");
2497 done();
2498 });
2499 });
2500});
2501
2502// Derivation path is shown in table
2503it('Shows the derivation path in the table', function(done) {
2504 driver.findElement(By.css('.phrase'))
2505 .sendKeys('abandon abandon ability');
2506 driver.sleep(generateDelay).then(function() {
2507 getFirstPath(function(path) {
2508 expect(path).toBe("m/44'/0'/0'/0/0");
2509 done();
2510 });
2511 });
2512});
2513
2514// Derivation path for address can be hardened
2515it('Can derive hardened addresses', function(done) {
2516 driver.findElement(By.css('#bip32-tab a'))
2517 .click();
2518 driver.executeScript(function() {
2519 $(".hardened-addresses").prop("checked", true);
2520 });
2521 driver.findElement(By.css('.phrase'))
2522 .sendKeys('abandon abandon ability');
2523 driver.sleep(generateDelay).then(function() {
2524 getFirstAddress(function(address) {
2525 expect(address).toBe("18exLzUv7kfpiXRzmCjFDoC9qwNLFyvwyd");
2526 done();
2527 });
2528 });
2529});
2530
2531// Derivation path visibility can be toggled
2532it('Can toggle visibility of the derivation path column', function(done) {
2533 driver.findElement(By.css('.phrase'))
2534 .sendKeys('abandon abandon ability');
2535 driver.sleep(generateDelay).then(function() {
2536 driver.findElement(By.css('.index-toggle'))
2537 .click();
2538 testColumnValuesAreInvisible(done, "index");
2539 });
2540});
2541
2542// Address is shown
2543it('Shows the address in the table', function(done) {
2544 driver.findElement(By.css('.phrase'))
2545 .sendKeys('abandon abandon ability');
2546 driver.sleep(generateDelay).then(function() {
2547 getFirstAddress(function(address) {
2548 expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug");
2549 done();
2550 });
2551 });
2552});
2553
2554// Addresses are shown in order of derivation path
2555it('Shows the address in order of derivation path', function(done) {
2556 driver.findElement(By.css('.phrase'))
2557 .sendKeys('abandon abandon ability');
2558 driver.sleep(generateDelay).then(function() {
2559 testRowsAreInCorrectOrder(done);
2560 });
2561});
2562
2563// Address visibility can be toggled
2564it('Can toggle visibility of the address column', function(done) {
2565 driver.findElement(By.css('.phrase'))
2566 .sendKeys('abandon abandon ability');
2567 driver.sleep(generateDelay).then(function() {
2568 driver.findElement(By.css('.address-toggle'))
2569 .click();
2570 testColumnValuesAreInvisible(done, "address");
2571 });
2572});
2573
2574// Public key is shown in table
2575it('Shows the public key in the table', function(done) {
2576 driver.findElement(By.css('.phrase'))
2577 .sendKeys('abandon abandon ability');
2578 driver.sleep(generateDelay).then(function() {
2579 driver.findElements(By.css('.pubkey'))
2580 .then(function(els) {
2581 els[0].getText()
2582 .then(function(pubkey) {
2583 expect(pubkey).toBe("033f5aed5f6cfbafaf223188095b5980814897295f723815fea5d3f4b648d0d0b3");
2584 done();
2585 });
2586 });
2587 });
2588});
2589
2590// Public key visibility can be toggled
2591it('Can toggle visibility of the public key column', function(done) {
2592 driver.findElement(By.css('.phrase'))
2593 .sendKeys('abandon abandon ability');
2594 driver.sleep(generateDelay).then(function() {
2595 driver.findElement(By.css('.public-key-toggle'))
2596 .click();
2597 testColumnValuesAreInvisible(done, "pubkey");
2598 });
2599});
2600
2601// Private key is shown in table
2602it('Shows the private key in the table', function(done) {
2603 driver.findElement(By.css('.phrase'))
2604 .sendKeys('abandon abandon ability');
2605 driver.sleep(generateDelay).then(function() {
2606 driver.findElements(By.css('.privkey'))
2607 .then(function(els) {
2608 els[0].getText()
2609 .then(function(pubkey) {
2610 expect(pubkey).toBe("L26cVSpWFkJ6aQkPkKmTzLqTdLJ923e6CzrVh9cmx21QHsoUmrEE");
2611 done();
2612 });
2613 });
2614 });
2615});
2616
2617// Private key visibility can be toggled
2618it('Can toggle visibility of the private key column', function(done) {
2619 driver.findElement(By.css('.phrase'))
2620 .sendKeys('abandon abandon ability');
2621 driver.sleep(generateDelay).then(function() {
2622 driver.findElement(By.css('.private-key-toggle'))
2623 .click();
2624 testColumnValuesAreInvisible(done, "privkey");
2625 });
2626});
2627
2628// More addresses can be generated
2629it('Can generate more rows in the table', function(done) {
2630 driver.findElement(By.css('.phrase'))
2631 .sendKeys('abandon abandon ability');
2632 driver.sleep(generateDelay).then(function() {
2633 driver.findElement(By.css('.more'))
2634 .click();
2635 driver.sleep(generateDelay).then(function() {
2636 driver.findElements(By.css('.address'))
2637 .then(function(els) {
2638 expect(els.length).toBe(40);
2639 done();
2640 });
2641 });
2642 });
2643});
2644
2645// A custom number of additional addresses can be generated
2646it('Can generate more rows in the table', function(done) {
0460b53f
IC
2647 driver.findElement(By.css('.phrase'))
2648 .sendKeys('abandon abandon ability');
2649 driver.sleep(generateDelay).then(function() {
5dfe77e4
IC
2650 driver.findElement(By.css('.rows-to-add'))
2651 .clear();
2652 driver.findElement(By.css('.rows-to-add'))
2653 .sendKeys('1');
0460b53f
IC
2654 driver.findElement(By.css('.more'))
2655 .click();
2656 driver.sleep(generateDelay).then(function() {
2657 driver.findElements(By.css('.address'))
2658 .then(function(els) {
2659 expect(els.length).toBe(21);
2660 done();
2661 });
2662 });
2663 });
2664});
2665
2666// Additional addresses are shown in order of derivation path
2667it('Shows additional addresses in order of derivation path', function(done) {
2668 driver.findElement(By.css('.phrase'))
2669 .sendKeys('abandon abandon ability');
2670 driver.sleep(generateDelay).then(function() {
2671 driver.findElement(By.css('.more'))
2672 .click();
2673 driver.sleep(generateDelay).then(function() {
2674 testRowsAreInCorrectOrder(done);
2675 });
2676 });
2677});
2678
2679// BIP32 root key can be set by the user
2680it('Allows the user to set the BIP32 root key', function(done) {
2681 driver.findElement(By.css('.root-key'))
2682 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi');
2683 driver.sleep(generateDelay).then(function() {
2684 getFirstAddress(function(address) {
2685 expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug");
2686 done();
2687 });
2688 });
2689});
2690
2691// Setting BIP32 root key clears the existing phrase, passphrase and seed
0460b53f 2692it('Confirms the existing phrase should be cleared', function(done) {
0460b53f
IC
2693 driver.findElement(By.css('.phrase'))
2694 .sendKeys('A non-blank but invalid value');
2695 driver.findElement(By.css('.root-key'))
2696 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi');
2697 driver.switchTo().alert().accept();
2698 driver.findElement(By.css('.phrase'))
2699 .getAttribute("value").then(function(value) {
2700 expect(value).toBe("");
2701 done();
2702 });
2703});
2704
2705// Clearing of phrase, passphrase and seed can be cancelled by user
0460b53f 2706it('Allows the clearing of the phrase to be cancelled', function(done) {
0460b53f
IC
2707 driver.findElement(By.css('.phrase'))
2708 .sendKeys('abandon abandon ability');
2709 driver.sleep(generateDelay).then(function() {
2710 driver.findElement(By.css('.root-key'))
2711 .clear();
2712 driver.findElement(By.css('.root-key'))
2713 .sendKeys('x');
2714 driver.switchTo().alert().dismiss();
2715 driver.findElement(By.css('.phrase'))
2716 .getAttribute("value").then(function(value) {
2717 expect(value).toBe("abandon abandon ability");
2718 done();
2719 });
2720 });
2721});
2722
2723// Custom BIP32 root key is used when changing the derivation path
2724it('Can set derivation path for root key instead of phrase', function(done) {
2725 driver.findElement(By.css('#bip44 .account'))
2726 .sendKeys('1');
2727 driver.findElement(By.css('.root-key'))
2728 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi');
2729 driver.sleep(generateDelay).then(function() {
2730 getFirstAddress(function(address) {
2731 expect(address).toBe("1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H");
2732 done();
2733 });
2734 });
2735});
2736
2737// Incorrect mnemonic shows error
2738it('Shows an error for incorrect mnemonic', function(done) {
2739 driver.findElement(By.css('.phrase'))
2740 .sendKeys('abandon abandon abandon');
2741 driver.sleep(feedbackDelay).then(function() {
2742 driver.findElement(By.css('.feedback'))
2743 .getText()
2744 .then(function(feedback) {
2745 expect(feedback).toBe("Invalid mnemonic");
2746 done();
2747 });
2748 });
2749});
2750
2751// Incorrect word shows suggested replacement
2752it('Shows word suggestion for incorrect word', function(done) {
2753 driver.findElement(By.css('.phrase'))
2754 .sendKeys('abandon abandon abiliti');
2755 driver.sleep(feedbackDelay).then(function() {
2756 driver.findElement(By.css('.feedback'))
2757 .getText()
2758 .then(function(feedback) {
2759 var msg = "abiliti not in wordlist, did you mean ability?";
2760 expect(feedback).toBe(msg);
2761 done();
2762 });
2763 });
2764});
2765
2766// Github pull request 48
2767// First four letters of word shows that word, not closest
2768// since first four letters gives unique word in BIP39 wordlist
2769// eg ille should show illegal, not idle
2770it('Shows word suggestion based on first four chars', function(done) {
2771 driver.findElement(By.css('.phrase'))
2772 .sendKeys('ille');
2773 driver.sleep(feedbackDelay).then(function() {
2774 driver.findElement(By.css('.feedback'))
2775 .getText()
2776 .then(function(feedback) {
2777 var msg = "ille not in wordlist, did you mean illegal?";
2778 expect(feedback).toBe(msg);
2779 done();
2780 });
2781 });
2782});
2783
2784// Incorrect BIP32 root key shows error
2785it('Shows error for incorrect root key', function(done) {
2786 driver.findElement(By.css('.root-key'))
2787 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpj');
2788 driver.sleep(feedbackDelay).then(function() {
2789 driver.findElement(By.css('.feedback'))
2790 .getText()
2791 .then(function(feedback) {
2792 var msg = "Invalid root key";
2793 expect(feedback).toBe(msg);
2794 done();
2795 });
2796 });
2797});
2798
2799// Derivation path not starting with m shows error
2800it('Shows error for derivation path not starting with m', function(done) {
2801 driver.findElement(By.css('#bip32-tab a'))
2802 .click();
2803 driver.findElement(By.css('#bip32 .path'))
2804 .clear();
2805 driver.findElement(By.css('#bip32 .path'))
2806 .sendKeys('n/0');
2807 driver.findElement(By.css('.phrase'))
2808 .sendKeys('abandon abandon ability');
2809 driver.sleep(feedbackDelay).then(function() {
2810 driver.findElement(By.css('.feedback'))
2811 .getText()
2812 .then(function(feedback) {
2813 var msg = "First character must be 'm'";
2814 expect(feedback).toBe(msg);
2815 done();
2816 });
2817 });
2818});
2819
2820// Derivation path containing invalid characters shows useful error
2821it('Shows error for derivation path not starting with m', function(done) {
2822 driver.findElement(By.css('#bip32-tab a'))
2823 .click();
2824 driver.findElement(By.css('#bip32 .path'))
2825 .clear();
2826 driver.findElement(By.css('#bip32 .path'))
2827 .sendKeys('m/1/0wrong1/1');
2828 driver.findElement(By.css('.phrase'))
2829 .sendKeys('abandon abandon ability');
2830 driver.sleep(feedbackDelay).then(function() {
2831 driver.findElement(By.css('.feedback'))
2832 .getText()
2833 .then(function(feedback) {
2834 var msg = "Invalid characters 0wrong1 found at depth 2";
2835 expect(feedback).toBe(msg);
2836 done();
2837 });
2838 });
2839});
2840
2841// Github Issue 11: Default word length is 15
2842// https://github.com/iancoleman/bip39/issues/11
2843it('Sets the default word length to 15', function(done) {
2844 driver.findElement(By.css('.strength'))
2845 .getAttribute("value")
2846 .then(function(strength) {
2847 expect(strength).toBe("15");
2848 done();
2849 });
2850});
2851
2852// Github Issue 12: Generate more rows with private keys hidden
2853// https://github.com/iancoleman/bip39/issues/12
2854it('Sets the correct hidden column state on new rows', function(done) {
2855 driver.findElement(By.css('.phrase'))
2856 .sendKeys("abandon abandon ability");
2857 driver.sleep(generateDelay).then(function() {
2858 driver.findElement(By.css('.private-key-toggle'))
2859 .click();
2860 driver.findElement(By.css('.more'))
2861 .click();
2862 driver.sleep(generateDelay).then(function() {
2863 driver.findElements(By.css('.privkey'))
2864 .then(function(els) {
2865 expect(els.length).toBe(40);
2866 });
2867 testColumnValuesAreInvisible(done, "privkey");
2868 });
2869 });
2870});
2871
2872// Github Issue 19: Mnemonic is not sensitive to whitespace
2873// https://github.com/iancoleman/bip39/issues/19
2874it('Ignores excess whitespace in the mnemonic', function(done) {
2875 var doublespace = " ";
2876 var mnemonic = "urge cat" + doublespace + "bid";
2877 driver.findElement(By.css('.phrase'))
2878 .sendKeys(mnemonic);
2879 driver.sleep(generateDelay).then(function() {
2880 driver.findElement(By.css('.root-key'))
2881 .getAttribute("value")
2882 .then(function(seed) {
2883 expect(seed).toBe("xprv9s21ZrQH143K3isaZsWbKVoTtbvd34Y1ZGRugGdMeBGbM3AgBVzTH159mj1cbbtYSJtQr65w6L5xy5L9SFC7c9VJZWHxgAzpj4mun5LhrbC");
2884 done();
2885 });
2886 });
2887});
2888
2889// Github Issue 23: Part 1: Use correct derivation path when changing tabs
2890// https://github.com/iancoleman/bip39/issues/23
b6035722 2891// This test was failing for default timeout of 5000ms so changed it to +10s
0460b53f
IC
2892it('Uses the correct derivation path when changing tabs', function(done) {
2893 // 1) and 2) set the phrase
2894 driver.findElement(By.css('.phrase'))
2895 .sendKeys("abandon abandon ability");
2896 driver.sleep(generateDelay).then(function() {
2897 // 3) select bip32 tab
2898 driver.findElement(By.css('#bip32-tab a'))
2899 .click();
2900 driver.sleep(generateDelay).then(function() {
2901 // 4) switch from bitcoin to litecoin
2902 selectNetwork("LTC - Litecoin");
2903 driver.sleep(generateDelay).then(function() {
2904 // 5) Check address is displayed correctly
2905 getFirstAddress(function(address) {
2906 expect(address).toBe("LS8MP5LZ5AdzSZveRrjm3aYVoPgnfFh5T5");
2907 // 5) Check derivation path is displayed correctly
2908 getFirstPath(function(path) {
2909 expect(path).toBe("m/0/0");
2910 done();
2911 });
2912 });
2913 });
2914 });
2915 });
b6035722 2916}, generateDelay + 10000);
0460b53f
IC
2917
2918// Github Issue 23 Part 2: Coin selection in derivation path
2919// https://github.com/iancoleman/bip39/issues/23#issuecomment-238011920
2920it('Uses the correct derivation path when changing coins', function(done) {
2921 // set the phrase
2922 driver.findElement(By.css('.phrase'))
2923 .sendKeys("abandon abandon ability");
2924 driver.sleep(generateDelay).then(function() {
2925 // switch from bitcoin to clam
2926 selectNetwork("CLAM - Clams");
2927 driver.sleep(generateDelay).then(function() {
2928 // check derivation path is displayed correctly
2929 getFirstPath(function(path) {
2930 expect(path).toBe("m/44'/23'/0'/0/0");
2931 done();
2932 });
2933 });
2934 });
2935});
2936
2937// Github Issue 26: When using a Root key derrived altcoins are incorrect
2938// https://github.com/iancoleman/bip39/issues/26
2939it('Uses the correct derivation for altcoins with root keys', function(done) {
2940 // 1) 2) and 3) set the root key
2941 driver.findElement(By.css('.root-key'))
2942 .sendKeys("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi");
2943 driver.sleep(generateDelay).then(function() {
2944 // 4) switch from bitcoin to viacoin
2945 selectNetwork("VIA - Viacoin");
2946 driver.sleep(generateDelay).then(function() {
2947 // 5) ensure the derived address is correct
2948 getFirstAddress(function(address) {
2949 expect(address).toBe("Vq9Eq4N5SQnjqZvxtxzo7hZPW5XnyJsmXT");
2950 done();
2951 });
2952 });
2953 });
2954});
2955
2956// Selecting a language with no existing phrase should generate a phrase in
2957// that language.
2958it('Generate a random phrase when language is selected and no current phrase', function(done) {
2959 driver.findElement(By.css("a[href='#japanese']"))
2960 .click();
2961 driver.sleep(generateDelay).then(function() {
2962 driver.findElement(By.css(".phrase"))
2963 .getAttribute("value").then(function(phrase) {
2964 expect(phrase.search(/[a-z]/)).toBe(-1);
2965 expect(phrase.length).toBeGreaterThan(0);
2966 done();
2967 });
2968 });
2969});
2970
2971// Selecting a language with existing phrase should update the phrase to use
2972// that language.
2973it('Updates existing phrases when the language is changed', function(done) {
2974 driver.findElement(By.css(".phrase"))
2975 .sendKeys("abandon abandon ability");
2976 driver.sleep(generateDelay).then(function() {
2977 driver.findElement(By.css("a[href='#italian']"))
2978 .click();
2979 driver.sleep(generateDelay).then(function() {
2980 driver.findElement(By.css(".phrase"))
2981 .getAttribute("value").then(function(phrase) {
2982 // Check only the language changes, not the phrase
2983 expect(phrase).toBe("abaco abaco abbaglio");
2984 getFirstAddress(function(address) {
2985 // Check the address is correct
2986 expect(address).toBe("1Dz5TgDhdki9spa6xbPFbBqv5sjMrx3xgV");
2987 done();
2988 });
2989 });
2990 });
2991 });
2992});
2993
2994// Suggested replacement for erroneous word in non-English language
2995it('Shows word suggestion for incorrect word in non-English language', function(done) {
2996 driver.findElement(By.css('.phrase'))
2997 .sendKeys('abaco abaco zbbaglio');
2998 driver.sleep(feedbackDelay).then(function() {
2999 driver.findElement(By.css('.feedback'))
3000 .getText()
3001 .then(function(feedback) {
3002 var msg = "zbbaglio not in wordlist, did you mean abbaglio?";
3003 expect(feedback).toBe(msg);
3004 done();
3005 });
3006 });
3007});
3008
3009// Japanese word does not break across lines.
3010// Point 2 from
3011// https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md#japanese
3012it('Does not break Japanese words across lines', function(done) {
3013 driver.findElement(By.css('.phrase'))
3014 .getCssValue("word-break")
3015 .then(function(value) {
3016 expect(value).toBe("keep-all");
3017 done();
3018 });
3019});
3020
3021// Language can be specified at page load using hash value in url
3022it('Can set the language from the url hash', function(done) {
3023 driver.get(url + "#japanese").then(function() {
3024 driver.findElement(By.css('.generate')).click();
3025 driver.sleep(generateDelay).then(function() {
3026 driver.findElement(By.css(".phrase"))
3027 .getAttribute("value").then(function(phrase) {
3028 expect(phrase.search(/[a-z]/)).toBe(-1);
3029 expect(phrase.length).toBeGreaterThan(0);
3030 done();
3031 });
3032 });
3033 });
3034});
3035
3036// Entropy can be entered by the user
3037it('Allows entropy to be entered', function(done) {
3038 driver.findElement(By.css('.use-entropy'))
3039 .click();
3040 driver.findElement(By.css('.entropy'))
3041 .sendKeys('00000000 00000000 00000000 00000000');
3042 driver.sleep(generateDelay).then(function() {
3043 driver.findElement(By.css(".phrase"))
3044 .getAttribute("value").then(function(phrase) {
3045 expect(phrase).toBe("abandon abandon ability");
3046 getFirstAddress(function(address) {
3047 expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug");
3048 done();
3049 })
3050 });
3051 });
3052});
3053
3054// A warning about entropy is shown to the user, with additional information
3055it('Shows a warning about using entropy', function(done) {
3056 driver.findElement(By.css('.use-entropy'))
3057 .click();
3058 driver.findElement(By.css('.entropy-container'))
3059 .getText()
3060 .then(function(containerText) {
3061 var warning = "mnemonic may be insecure";
3062 expect(containerText).toContain(warning);
3063 driver.findElement(By.css('#entropy-notes'))
3064 .findElement(By.xpath("parent::*"))
3065 .getText()
3066 .then(function(notesText) {
3067 var detail = "flipping a fair coin, rolling a fair dice, noise measurements etc";
3068 expect(notesText).toContain(detail);
3069 done();
3070 });
3071 });
3072});
3073
3074// The types of entropy available are described to the user
3075it('Shows the types of entropy available', function(done) {
3076 driver.findElement(By.css('.entropy'))
3077 .getAttribute("placeholder")
3078 .then(function(placeholderText) {
3079 var options = [
3080 "binary",
3081 "base 6",
3082 "dice",
3083 "base 10",
3084 "hexadecimal",
3085 "cards",
3086 ];
3087 for (var i=0; i<options.length; i++) {
3088 var option = options[i];
3089 expect(placeholderText).toContain(option);
3090 }
3091 done();
3092 });
3093});
3094
3095// The actual entropy used is shown to the user
3096it('Shows the actual entropy used', function(done) {
3097 driver.findElement(By.css('.use-entropy'))
3098 .click();
3099 driver.findElement(By.css('.entropy'))
3100 .sendKeys('Not A Very Good Entropy Source At All');
3101 driver.sleep(generateDelay).then(function() {
3102 driver.findElement(By.css('.entropy-container'))
3103 .getText()
3104 .then(function(text) {
3105 expect(text).toMatch(/Filtered Entropy\s+AedEceAA/);
3106 done();
3107 });
3108 });
3109});
3110
3111// Binary entropy can be entered
3112it('Allows binary entropy to be entered', function(done) {
3113 testEntropyType(done, "01", "binary");
3114});
3115
3116// Base 6 entropy can be entered
3117it('Allows base 6 entropy to be entered', function(done) {
3118 testEntropyType(done, "012345", "base 6");
3119});
3120
3121// Base 6 dice entropy can be entered
3122it('Allows base 6 dice entropy to be entered', function(done) {
3123 testEntropyType(done, "123456", "base 6 (dice)");
3124});
3125
3126// Base 10 entropy can be entered
3127it('Allows base 10 entropy to be entered', function(done) {
3128 testEntropyType(done, "789", "base 10");
3129});
3130
3131// Hexadecimal entropy can be entered
3132it('Allows hexadecimal entropy to be entered', function(done) {
3133 testEntropyType(done, "abcdef", "hexadecimal");
3134});
3135
3136// Dice entropy value is shown as the converted base 6 value
3137// ie 123456 is converted to 123450
3138it('Shows dice entropy as base 6', function(done) {
3139 driver.findElement(By.css('.use-entropy'))
3140 .click();
3141 driver.findElement(By.css('.entropy'))
3142 .sendKeys("123456");
3143 driver.sleep(generateDelay).then(function() {
3144 driver.findElement(By.css('.entropy-container'))
3145 .getText()
3146 .then(function(text) {
3147 expect(text).toMatch(/Filtered Entropy\s+123450/);
3148 done();
3149 });
3150 });
3151});
3152
3153// The number of bits of entropy accumulated is shown
3154it("Shows the number of bits of entropy for 20 bits of binary", function(done) {
3155 testEntropyBits(done, "0000 0000 0000 0000 0000", "20");
3156});
3157it("Shows the number of bits of entropy for 1 bit of binary", function(done) {
3158 testEntropyBits(done, "0", "1");
3159});
3160it("Shows the number of bits of entropy for 4 bits of binary", function(done) {
3161 testEntropyBits(done, "0000", "4");
3162});
3163it("Shows the number of bits of entropy for 1 character of base 6 (dice)", function(done) {
bf96267f 3164 // 6 in card is 0 in base 6, 0 is mapped to 00 by entropy.js
0460b53f
IC
3165 testEntropyBits(done, "6", "2");
3166});
3167it("Shows the number of bits of entropy for 1 character of base 10 with 3 bits", function(done) {
3168 // 7 in base 10 is 111 in base 2, no leading zeros
3169 testEntropyBits(done, "7", "3");
3170});
3171it("Shows the number of bits of entropy for 1 character of base 10 with 4 bis", function(done) {
bf96267f
IC
3172 // 8 in base 10 is mapped to 0 by entropy.js
3173 testEntropyBits(done, "8", "1");
0460b53f
IC
3174});
3175it("Shows the number of bits of entropy for 1 character of hex", function(done) {
3176 testEntropyBits(done, "F", "4");
3177});
3178it("Shows the number of bits of entropy for 2 characters of base 10", function(done) {
bf96267f
IC
3179 // 2 as base 10 is binary 010, 9 is mapped to binary 1 by entropy.js
3180 testEntropyBits(done, "29", "4");
0460b53f
IC
3181});
3182it("Shows the number of bits of entropy for 2 characters of hex", function(done) {
3183 testEntropyBits(done, "0A", "8");
3184});
3185it("Shows the number of bits of entropy for 2 characters of hex with 3 leading zeros", function(done) {
3186 // hex is always multiple of 4 bits of entropy
3187 testEntropyBits(done, "1A", "8");
3188});
3189it("Shows the number of bits of entropy for 2 characters of hex with 2 leading zeros", function(done) {
3190 testEntropyBits(done, "2A", "8");
3191});
3192it("Shows the number of bits of entropy for 2 characters of hex with 1 leading zero", function(done) {
3193 testEntropyBits(done, "4A", "8");
3194});
3195it("Shows the number of bits of entropy for 2 characters of hex with no leading zeros", function(done) {
3196 testEntropyBits(done, "8A", "8");
3197});
3198it("Shows the number of bits of entropy for 2 characters of hex starting with F", function(done) {
3199 testEntropyBits(done, "FA", "8");
3200});
3201it("Shows the number of bits of entropy for 4 characters of hex with leading zeros", function(done) {
3202 testEntropyBits(done, "000A", "16");
3203});
3204it("Shows the number of bits of entropy for 4 characters of base 6", function(done) {
bf96267f
IC
3205 // 5 in base 6 is mapped to binary 1
3206 testEntropyBits(done, "5555", "4");
0460b53f
IC
3207});
3208it("Shows the number of bits of entropy for 4 characters of base 6 dice", function(done) {
3209 // uses dice, so entropy is actually 0000 in base 6, which is 4 lots of
bf96267f
IC
3210 // binary 00
3211 testEntropyBits(done, "6666", "8");
0460b53f
IC
3212});
3213it("Shows the number of bits of entropy for 4 charactes of base 10", function(done) {
bf96267f
IC
3214 // 2 in base 10 is binary 010 and 7 is binary 111 so is 4 events of 3 bits
3215 testEntropyBits(done, "2227", "12");
0460b53f
IC
3216});
3217it("Shows the number of bits of entropy for 4 characters of hex with 2 leading zeros", function(done) {
3218 testEntropyBits(done, "222F", "16");
3219});
3220it("Shows the number of bits of entropy for 4 characters of hex starting with F", function(done) {
3221 testEntropyBits(done, "FFFF", "16");
3222});
3223it("Shows the number of bits of entropy for 10 characters of base 10", function(done) {
bf96267f
IC
3224 // 10 events with 3 bits for each event
3225 testEntropyBits(done, "0000101017", "30");
3226});
3227it("Shows the number of bits of entropy for 10 characters of base 10 account for bias", function(done) {
3228 // 9 events with 3 bits per event and 1 event with 1 bit per event
3229 testEntropyBits(done, "0000101018", "28");
0460b53f
IC
3230});
3231it("Shows the number of bits of entropy for a full deck of cards", function(done) {
bf96267f
IC
3232 // removing bias is 32*5 + 16*4 + 4*2
3233 testEntropyBits(done, "ac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks", "232");
0460b53f
IC
3234});
3235
3236it("Shows details about the entered entropy", function(done) {
3237 testEntropyFeedback(done,
3238 {
3239 entropy: "A",
3240 filtered: "A",
3241 type: "hexadecimal",
3242 events: "1",
3243 bits: "4",
3244 words: 0,
3245 strength: "less than a second",
3246 }
3247 );
3248});
3249it("Shows details about the entered entropy", function(done) {
3250 testEntropyFeedback(done,
3251 {
3252 entropy: "AAAAAAAA",
3253 filtered: "AAAAAAAA",
3254 type: "hexadecimal",
3255 events: "8",
3256 bits: "32",
3257 words: 3,
3258 strength: "less than a second - Repeats like \"aaa\" are easy to guess",
3259 }
3260 );
3261});
3262it("Shows details about the entered entropy", function(done) {
3263 testEntropyFeedback(done,
3264 {
3265 entropy: "AAAAAAAA B",
3266 filtered: "AAAAAAAAB",
3267 type: "hexadecimal",
3268 events: "9",
3269 bits: "36",
3270 words: 3,
3271 strength: "less than a second - Repeats like \"aaa\" are easy to guess",
3272 }
3273 );
3274});
3275it("Shows details about the entered entropy", function(done) {
3276 testEntropyFeedback(done,
3277 {
3278 entropy: "AAAAAAAA BBBBBBBB",
3279 filtered: "AAAAAAAABBBBBBBB",
3280 type: "hexadecimal",
3281 events: "16",
3282 bits: "64",
3283 words: 6,
3284 strength: "less than a second - Repeats like \"aaa\" are easy to guess",
3285 }
3286 );
3287});
3288it("Shows details about the entered entropy", function(done) {
3289 testEntropyFeedback(done,
3290 {
3291 entropy: "AAAAAAAA BBBBBBBB CCCCCCCC",
3292 filtered: "AAAAAAAABBBBBBBBCCCCCCCC",
3293 type: "hexadecimal",
3294 events: "24",
3295 bits: "96",
3296 words: 9,
3297 strength: "less than a second",
3298 }
3299 );
3300});
3301it("Shows details about the entered entropy", function(done) {
3302 testEntropyFeedback(done,
3303 {
3304 entropy: "AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD",
3305 filtered: "AAAAAAAABBBBBBBBCCCCCCCCDDDDDDDD",
3306 type: "hexadecimal",
3307 events: "32",
3308 bits: "128",
3309 words: 12,
3310 strength: "2 minutes",
3311 }
3312 );
3313});
3314it("Shows details about the entered entropy", function(done) {
3315 testEntropyFeedback(done,
3316 {
3317 entropy: "AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDA",
3318 filtered: "AAAAAAAABBBBBBBBCCCCCCCCDDDDDDDA",
3319 type: "hexadecimal",
3320 events: "32",
3321 bits: "128",
3322 words: 12,
3323 strength: "2 days",
3324 }
3325 );
3326});
3327it("Shows details about the entered entropy", function(done) {
3328 testEntropyFeedback(done,
3329 {
3330 entropy: "AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDA EEEEEEEE",
3331 filtered: "AAAAAAAABBBBBBBBCCCCCCCCDDDDDDDAEEEEEEEE",
3332 type: "hexadecimal",
3333 events: "40",
3334 bits: "160",
3335 words: 15,
3336 strength: "3 years",
3337 }
3338 );
3339});
3340it("Shows details about the entered entropy", function(done) {
3341 testEntropyFeedback(done,
3342 {
3343 entropy: "AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDA EEEEEEEE FFFFFFFF",
3344 filtered: "AAAAAAAABBBBBBBBCCCCCCCCDDDDDDDAEEEEEEEEFFFFFFFF",
3345 type: "hexadecimal",
3346 events: "48",
3347 bits: "192",
3348 words: 18,
3349 strength: "centuries",
3350 }
3351 );
3352});
3353it("Shows details about the entered entropy", function(done) {
3354 testEntropyFeedback(done,
3355 {
3356 entropy: "7d",
3357 type: "card",
3358 events: "1",
bf96267f 3359 bits: "5",
0460b53f
IC
3360 words: 0,
3361 strength: "less than a second",
3362 }
3363 );
3364});
3365it("Shows details about the entered entropy", function(done) {
3366 testEntropyFeedback(done,
3367 {
3368 entropy: "ac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks",
3369 type: "card (full deck)",
3370 events: "52",
bf96267f 3371 bits: "232",
0460b53f
IC
3372 words: 21,
3373 strength: "centuries",
3374 }
3375 );
3376});
3377it("Shows details about the entered entropy", function(done) {
3378 testEntropyFeedback(done,
3379 {
3380 entropy: "ac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks3d",
3381 type: "card (full deck, 1 duplicate: 3d)",
3382 events: "53",
bf96267f 3383 bits: "237",
0460b53f
IC
3384 words: 21,
3385 strength: "centuries",
3386 }
3387 );
3388});
3389it("Shows details about the entered entropy", function(done) {
3390 testEntropyFeedback(done,
3391 {
3392 entropy: "ac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqs3d4d",
3393 type: "card (2 duplicates: 3d 4d, 1 missing: KS)",
3394 events: "53",
bf96267f 3395 bits: "240",
0460b53f
IC
3396 words: 21,
3397 strength: "centuries",
3398 }
3399 );
3400});
3401it("Shows details about the entered entropy", function(done) {
3402 testEntropyFeedback(done,
3403 {
3404 entropy: "ac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqs3d4d5d6d",
3405 type: "card (4 duplicates: 3d 4d 5d..., 1 missing: KS)",
3406 events: "55",
bf96267f
IC
3407 bits: "250",
3408 words: 21,
0460b53f
IC
3409 strength: "centuries",
3410 }
3411 );
3412});
3413it("Shows details about the entered entropy", function(done) {
3414 testEntropyFeedback(done,
3415 // Next test was throwing uncaught error in zxcvbn
0460b53f
IC
3416 {
3417 entropy: "ac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsksac2c3c4c5c6c7c8c9ctcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks",
3418 type: "card (full deck, 52 duplicates: ac 2c 3c...)",
3419 events: "104",
bf96267f
IC
3420 bits: "464",
3421 words: 42,
0460b53f
IC
3422 strength: "centuries",
3423 }
3424 );
3425});
3426it("Shows details about the entered entropy", function(done) {
3427 testEntropyFeedback(done,
3428 // Case insensitivity to duplicate cards
3429 {
3430 entropy: "asAS",
3431 type: "card (1 duplicate: AS)",
3432 events: "2",
bf96267f 3433 bits: "8",
0460b53f
IC
3434 words: 0,
3435 strength: "less than a second",
3436 }
3437 );
3438});
3439it("Shows details about the entered entropy", function(done) {
3440 testEntropyFeedback(done,
3441 {
3442 entropy: "ASas",
3443 type: "card (1 duplicate: as)",
3444 events: "2",
bf96267f 3445 bits: "8",
0460b53f
IC
3446 words: 0,
3447 strength: "less than a second",
3448 }
3449 );
3450});
3451it("Shows details about the entered entropy", function(done) {
3452 testEntropyFeedback(done,
3453 // Missing cards are detected
3454 {
3455 entropy: "ac2c3c4c5c6c7c8c tcjcqckcad2d3d4d5d6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks",
3456 type: "card (1 missing: 9C)",
3457 events: "51",
bf96267f
IC
3458 bits: "227",
3459 words: 21,
0460b53f
IC
3460 strength: "centuries",
3461 }
3462 );
3463});
3464it("Shows details about the entered entropy", function(done) {
3465 testEntropyFeedback(done,
3466 {
3467 entropy: "ac2c3c4c5c6c7c8c tcjcqckcad2d3d4d 6d7d8d9dtdjdqdkdah2h3h4h5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks",
3468 type: "card (2 missing: 9C 5D)",
3469 events: "50",
bf96267f 3470 bits: "222",
0460b53f
IC
3471 words: 18,
3472 strength: "centuries",
3473 }
3474 );
3475});
3476it("Shows details about the entered entropy", function(done) {
3477 testEntropyFeedback(done,
3478 {
3479 entropy: "ac2c3c4c5c6c7c8c tcjcqckcad2d3d4d 6d7d8d9dtdjd kdah2h3h 5h6h7h8h9hthjhqhkhas2s3s4s5s6s7s8s9stsjsqsks",
3480 type: "card (4 missing: 9C 5D QD...)",
3481 events: "48",
bf96267f 3482 bits: "212",
0460b53f
IC
3483 words: 18,
3484 strength: "centuries",
3485 }
3486 );
3487});
3488it("Shows details about the entered entropy", function(done) {
3489 testEntropyFeedback(done,
3490 // More than six missing cards does not show message
3491 {
3492 entropy: "ac2c3c4c5c6c7c8c tcjcqckcad2d3d4d 6d 8d9d jd kdah2h3h 5h6h7h8h9hthjhqhkh 2s3s4s5s6s7s8s9stsjsqsks",
3493 type: "card",
3494 events: "45",
bf96267f 3495 bits: "198",
0460b53f
IC
3496 words: 18,
3497 strength: "centuries",
3498 }
3499 );
3500});
3501it("Shows details about the entered entropy", function(done) {
bf96267f
IC
3502 // multiple decks does not affect the bits per event
3503 // since the bits are hardcoded in entropy.js
0460b53f 3504 testEntropyFeedback(done,
0460b53f
IC
3505 {
3506 entropy: "3d",
3507 events: "1",
bf96267f
IC
3508 bits: "5",
3509 bitsPerEvent: "4.46",
0460b53f
IC
3510 }
3511 );
3512});
3513it("Shows details about the entered entropy", function(done) {
3514 testEntropyFeedback(done,
3515 {
3516 entropy: "3d3d",
3517 events: "2",
bf96267f
IC
3518 bits: "10",
3519 bitsPerEvent: "4.46",
0460b53f
IC
3520 }
3521 );
3522});
3523it("Shows details about the entered entropy", function(done) {
3524 testEntropyFeedback(done,
3525 {
3526 entropy: "3d3d3d",
3527 events: "3",
3528 bits: "15",
bf96267f 3529 bitsPerEvent: "4.46",
0460b53f
IC
3530 }
3531 );
3532});
3533it("Shows details about the entered entropy", function(done) {
3534 testEntropyFeedback(done,
3535 {
3536 entropy: "3d3d3d3d",
3537 events: "4",
3538 bits: "20",
bf96267f 3539 bitsPerEvent: "4.46",
0460b53f
IC
3540 }
3541 );
3542});
3543it("Shows details about the entered entropy", function(done) {
3544 testEntropyFeedback(done,
3545 {
3546 entropy: "3d3d3d3d3d",
3547 events: "5",
bf96267f
IC
3548 bits: "25",
3549 bitsPerEvent: "4.46",
0460b53f
IC
3550 }
3551 );
3552});
3553it("Shows details about the entered entropy", function(done) {
3554 testEntropyFeedback(done,
3555 {
3556 entropy: "3d3d3d3d3d3d",
3557 events: "6",
bf96267f
IC
3558 bits: "30",
3559 bitsPerEvent: "4.46",
0460b53f
IC
3560 }
3561 );
3562});
3563it("Shows details about the entered entropy", function(done) {
3564 testEntropyFeedback(done,
3565 {
3566 entropy: "3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d",
3567 events: "33",
bf96267f
IC
3568 bits: "165",
3569 bitsPerEvent: "4.46",
0460b53f
IC
3570 strength: 'less than a second - Repeats like "abcabcabc" are only slightly harder to guess than "abc"',
3571 }
3572 );
3573});
3574
3575// Entropy is truncated from the left
3576it('Truncates entropy from the left', function(done) {
3577 // Truncate from left means 0000 is removed from the start
3578 // which gives mnemonic 'avocado zoo zone'
3579 // not 1111 removed from the end
3580 // which gives the mnemonic 'abstract zoo zoo'
3581 var entropy = "00000000 00000000 00000000 00000000";
3582 entropy += "11111111 11111111 11111111 1111"; // Missing last byte
3583 driver.findElement(By.css('.use-entropy'))
3584 .click();
3585 driver.findElement(By.css('.entropy'))
3586 .sendKeys(entropy);
3587 driver.sleep(generateDelay).then(function() {
3588 driver.findElement(By.css(".phrase"))
3589 .getAttribute("value").then(function(phrase) {
3590 expect(phrase).toBe("avocado zoo zone");
3591 done();
3592 });
3593 });
3594});
3595
3596// Very large entropy results in very long mnemonics
3597it('Converts very long entropy to very long mnemonics', function(done) {
3598 var entropy = "";
3599 for (var i=0; i<33; i++) {
3600 entropy += "AAAAAAAA"; // 3 words * 33 iterations = 99 words
3601 }
3602 driver.findElement(By.css('.use-entropy'))
3603 .click();
3604 driver.findElement(By.css('.entropy'))
3605 .sendKeys(entropy);
3606 driver.sleep(generateDelay).then(function() {
3607 driver.findElement(By.css(".phrase"))
3608 .getAttribute("value").then(function(phrase) {
3609 var wordCount = phrase.split(/\s+/g).length;
3610 expect(wordCount).toBe(99);
3611 done();
3612 });
3613 });
3614});
3615
3616// Is compatible with bip32jp entropy
3617// https://bip32jp.github.io/english/index.html
3618// NOTES:
3619// Is incompatible with:
bf96267f 3620// base 6
0460b53f
IC
3621// base 20
3622it('Is compatible with bip32jp.github.io', function(done) {
bf96267f
IC
3623 var entropy = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
3624 var expectedPhrase = "primary fetch primary fetch primary fetch primary fetch primary fetch primary fetch primary fetch primary fetch primary fetch primary fetch primary fetch primary foster";
0460b53f
IC
3625 driver.findElement(By.css('.use-entropy'))
3626 .click();
3627 driver.findElement(By.css('.entropy'))
3628 .sendKeys(entropy);
3629 driver.sleep(generateDelay).then(function() {
3630 driver.findElement(By.css(".phrase"))
3631 .getAttribute("value").then(function(phrase) {
3632 expect(phrase).toBe(expectedPhrase);
3633 done();
3634 });
3635 });
3636});
3637
3638// Blank entropy does not generate mnemonic or addresses
3639it('Does not generate mnemonic for blank entropy', function(done) {
3640 driver.findElement(By.css('.use-entropy'))
3641 .click();
3642 driver.findElement(By.css('.entropy'))
3643 .clear();
3644 // check there is no mnemonic
3645 driver.sleep(generateDelay).then(function() {
3646 driver.findElement(By.css(".phrase"))
3647 .getAttribute("value").then(function(phrase) {
3648 expect(phrase).toBe("");
3649 // check there is no mnemonic
3650 driver.findElements(By.css(".address"))
3651 .then(function(addresses) {
3652 expect(addresses.length).toBe(0);
3653 // Check the feedback says 'blank entropy'
3654 driver.findElement(By.css(".feedback"))
3655 .getText()
3656 .then(function(feedbackText) {
3657 expect(feedbackText).toBe("Blank entropy");
3658 done();
3659 });
3660 })
3661 });
3662 });
3663});
3664
3665// Mnemonic length can be selected even for weak entropy
3666it('Allows selection of mnemonic length even for weak entropy', function(done) {
3667 driver.findElement(By.css('.use-entropy'))
3668 .click();
3669 driver.executeScript(function() {
3670 $(".mnemonic-length").val("18").trigger("change");
3671 });
3672 driver.findElement(By.css('.entropy'))
3673 .sendKeys("012345");
3674 driver.sleep(generateDelay).then(function() {
3675 driver.findElement(By.css(".phrase"))
3676 .getAttribute("value").then(function(phrase) {
3677 var wordCount = phrase.split(/\s+/g).length;
3678 expect(wordCount).toBe(18);
3679 done();
3680 });
3681 });
3682});
3683
3684// Github issue 33
3685// https://github.com/iancoleman/bip39/issues/33
3686// Final cards should contribute entropy
3687it('Uses as much entropy as possible for the mnemonic', function(done) {
3688 driver.findElement(By.css('.use-entropy'))
3689 .click();
3690 driver.findElement(By.css('.entropy'))
3691 .sendKeys("7S 9H 9S QH 8C KS AS 7D 7C QD 4S 4D TC 2D 5S JS 3D 8S 8H 4C 3C AC 3S QC 9C JC 7H AD TD JD 6D KH 5C QS 2S 6S 6H JH KD 9D-6C TS TH 4H KC 5H 2H AH 2C 8D 3H 5D");
3692 driver.sleep(generateDelay).then(function() {
3693 // Get mnemonic
3694 driver.findElement(By.css(".phrase"))
3695 .getAttribute("value").then(function(originalPhrase) {
3696 // Set the last 12 cards to be AS
3697 driver.findElement(By.css('.entropy'))
3698 .clear();
3699 driver.findElement(By.css('.entropy'))
3700 .sendKeys("7S 9H 9S QH 8C KS AS 7D 7C QD 4S 4D TC 2D 5S JS 3D 8S 8H 4C 3C AC 3S QC 9C JC 7H AD TD JD 6D KH 5C QS 2S 6S 6H JH KD 9D-AS AS AS AS AS AS AS AS AS AS AS AS");
3701 driver.sleep(generateDelay).then(function() {
3702 // Get new mnemonic
3703 driver.findElement(By.css(".phrase"))
3704 .getAttribute("value").then(function(newPhrase) {
3705 expect(originalPhrase).not.toEqual(newPhrase);
3706 done();
3707 });
3708 });
3709 });
3710 });
3711});
3712
3713// Github issue 35
3714// https://github.com/iancoleman/bip39/issues/35
3715// QR Code support
3716// TODO this doesn't work in selenium with firefox
3717// see https://stackoverflow.com/q/40360223
3718it('Shows a qr code on hover for the phrase', function(done) {
3719 if (browser == "firefox") {
3720 pending("Selenium + Firefox bug for mouseMove, see https://stackoverflow.com/q/40360223");
3721 }
3722 // generate a random mnemonic
3723 var generateEl = driver.findElement(By.css('.generate'));
3724 generateEl.click();
3725 // toggle qr to show (hidden by default)
3726 var phraseEl = driver.findElement(By.css(".phrase"));
3727 phraseEl.click();
3728 var rootKeyEl = driver.findElement(By.css(".root-key"));
3729 driver.sleep(generateDelay).then(function() {
3730 // hover over the root key
3731 driver.actions().mouseMove(rootKeyEl).perform().then(function() {
3732 // check the qr code shows
3733 driver.executeScript(function() {
3734 return $(".qr-container").find("canvas").length > 0;
3735 })
3736 .then(function(qrShowing) {
3737 expect(qrShowing).toBe(true);
3738 // hover away from the phrase
3739 driver.actions().mouseMove(generateEl).perform().then(function() {;
3740 // check the qr code hides
3741 driver.executeScript(function() {
3742 return $(".qr-container").find("canvas").length == 0;
3743 })
3744 .then(function(qrHidden) {
3745 expect(qrHidden).toBe(true);
3746 done();
3747 });
3748 });
3749 });
3750 });
3751 });
3752});
3753
3754// BIP44 account extendend private key is shown
3755// github issue 37 - compatibility with electrum
3756it('Shows the bip44 account extended private key', function(done) {
3757 driver.findElement(By.css(".phrase"))
3758 .sendKeys("abandon abandon ability");
3759 driver.sleep(generateDelay).then(function() {
3760 driver.findElement(By.css("#bip44 .account-xprv"))
3761 .getAttribute("value")
3762 .then(function(xprv) {
3763 expect(xprv).toBe("xprv9yzrnt4zWVJUr1k2VxSPy9ettKz5PpeDMgaVG7UKedhqnw1tDkxP2UyYNhuNSumk2sLE5ctwKZs9vwjsq3e1vo9egCK6CzP87H2cVYXpfwQ");
3764 done();
3765 });
3766 });
3767});
3768
3769// BIP44 account extendend public key is shown
3770// github issue 37 - compatibility with electrum
3771it('Shows the bip44 account extended public key', function(done) {
3772 driver.findElement(By.css(".phrase"))
3773 .sendKeys("abandon abandon ability");
3774 driver.sleep(generateDelay).then(function() {
3775 driver.findElement(By.css("#bip44 .account-xpub"))
3776 .getAttribute("value")
3777 .then(function(xprv) {
3778 expect(xprv).toBe("xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf");
3779 done();
3780 });
3781 });
3782});
3783
3784// github issue 40
3785// BIP32 root key can be set as an xpub
3786it('Generates addresses from xpub as bip32 root key', function(done) {
3787 driver.findElement(By.css('#bip32-tab a'))
3788 .click();
3789 // set xpub for account 0 of bip44 for 'abandon abandon ability'
3790 driver.findElement(By.css("#root-key"))
3791 .sendKeys("xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf");
3792 driver.sleep(generateDelay).then(function() {
3793 // check the addresses are generated
3794 getFirstAddress(function(address) {
3795 expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug");
3796 // check the xprv key is not set
3797 driver.findElement(By.css(".extended-priv-key"))
3798 .getAttribute("value")
3799 .then(function(xprv) {
3800 expect(xprv).toBe("NA");
3801 // check the private key is not set
3802 driver.findElements(By.css(".privkey"))
3803 .then(function(els) {
3804 els[0]
3805 .getText()
3806 .then(function(privkey) {
3807 expect(xprv).toBe("NA");
3808 done();
3809 });
3810 });
3811 });
3812 });
3813 });
3814});
3815
3816// github issue 40
3817// xpub for bip32 root key will not work with hardened derivation paths
3818it('Shows error for hardened derivation paths with xpub root key', function(done) {
3819 // set xpub for account 0 of bip44 for 'abandon abandon ability'
3820 driver.findElement(By.css("#root-key"))
3821 .sendKeys("xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf");
3822 driver.sleep(feedbackDelay).then(function() {
3823 // Check feedback is correct
3824 driver.findElement(By.css('.feedback'))
3825 .getText()
3826 .then(function(feedback) {
3827 var msg = "Hardened derivation path is invalid with xpub key";
3828 expect(feedback).toBe(msg);
3829 // Check no addresses are shown
3830 driver.findElements(By.css('.addresses tr'))
3831 .then(function(rows) {
3832 expect(rows.length).toBe(0);
3833 done();
3834 });
3835 });
3836 });
3837});
3838
3839// github issue 39
3840// no root key shows feedback
3841it('Shows feedback for no root key', function(done) {
3842 // set xpub for account 0 of bip44 for 'abandon abandon ability'
3843 driver.findElement(By.css('#bip32-tab a'))
3844 .click();
3845 driver.sleep(feedbackDelay).then(function() {
3846 // Check feedback is correct
3847 driver.findElement(By.css('.feedback'))
3848 .getText()
3849 .then(function(feedback) {
3850 expect(feedback).toBe("Invalid root key");
3851 done();
3852 });
3853 });
3854});
3855
3856// Github issue 44
3857// display error switching tabs while addresses are generating
3858it('Can change details while old addresses are still being generated', function(done) {
3859 // Set to generate 199 more addresses.
3860 // This will take a long time allowing a new set of addresses to be
3861 // generated midway through this lot.
3862 // The newly generated addresses should not include any from the old set.
3863 // Any more than 199 will show an alert which needs to be accepted.
3864 driver.findElement(By.css('.rows-to-add'))
3865 .clear();
3866 driver.findElement(By.css('.rows-to-add'))
3867 .sendKeys('199');
3868 // set the prhase
3869 driver.findElement(By.css('.phrase'))
3870 .sendKeys("abandon abandon ability");
3871 driver.sleep(generateDelay).then(function() {
0460b53f 3872 // change tabs which should cancel the previous generating
5dfe77e4
IC
3873 driver.findElement(By.css('.rows-to-add'))
3874 .clear();
3875 driver.findElement(By.css('.rows-to-add'))
3876 .sendKeys('20');
0460b53f
IC
3877 driver.findElement(By.css('#bip32-tab a'))
3878 .click()
3879 driver.sleep(generateDelay).then(function() {
3880 driver.findElements(By.css('.index'))
3881 .then(function(els) {
3882 // check the derivation paths have the right quantity
3883 expect(els.length).toBe(20);
3884 // check the derivation paths are in order
3885 testRowsAreInCorrectOrder(done);
3886 });
3887 });
3888 });
628a2f53 3889}, generateDelay + 10000);
0460b53f
IC
3890
3891// Github issue 49
3892// padding for binary should give length with multiple of 256
3893// hashed entropy 1111 is length 252, so requires 4 leading zeros
3894// prior to issue 49 it would only generate 2 leading zeros, ie missing 2
3895it('Pads hashed entropy with leading zeros', function(done) {
3896 driver.findElement(By.css('.use-entropy'))
3897 .click();
3898 driver.executeScript(function() {
3899 $(".mnemonic-length").val("15").trigger("change");
3900 });
3901 driver.findElement(By.css('.entropy'))
3902 .sendKeys("1111");
3903 driver.sleep(generateDelay).then(function() {
3904 driver.findElement(By.css('.phrase'))
3905 .getAttribute("value")
3906 .then(function(phrase) {
3907 expect(phrase).toBe("avocado valid quantum cross link predict excuse edit street able flame large galaxy ginger nuclear");
3908 done();
3909 });
3910 });
3911});
3912
3913// Github pull request 55
3914// https://github.com/iancoleman/bip39/pull/55
3915// Client select
3916it('Can set the derivation path on bip32 tab for bitcoincore', function(done) {
3917 testClientSelect(done, {
3918 selectValue: "0",
3919 bip32path: "m/0'/0'",
3920 useHardenedAddresses: "true",
3921 });
3922});
3923it('Can set the derivation path on bip32 tab for multibit', function(done) {
3924 testClientSelect(done, {
3925 selectValue: "2",
3926 bip32path: "m/0'/0",
3927 useHardenedAddresses: null,
3928 });
3929});
44a5d363
IC
3930it('Can set the derivation path on bip32 tab for coinomi/ledger', function(done) {
3931 testClientSelect(done, {
3932 selectValue: "3",
3933 bip32path: "m/44'/0'/0'",
3934 useHardenedAddresses: null,
3935 });
3936});
0460b53f
IC
3937
3938// github issue 58
3939// https://github.com/iancoleman/bip39/issues/58
3940// bip32 derivation is correct, does not drop leading zeros
3941// see also
3942// https://medium.com/@alexberegszaszi/why-do-my-bip32-wallets-disagree-6f3254cc5846
3943it('Retains leading zeros for bip32 derivation', function(done) {
3944 driver.findElement(By.css(".phrase"))
3945 .sendKeys("fruit wave dwarf banana earth journey tattoo true farm silk olive fence");
3946 driver.findElement(By.css(".passphrase"))
3947 .sendKeys("banana");
3948 driver.sleep(generateDelay).then(function() {
3949 getFirstAddress(function(address) {
3950 // Note that bitcore generates an incorrect address
3951 // 13EuKhffWkBE2KUwcbkbELZb1MpzbimJ3Y
3952 // see the medium.com link above for more details
3953 expect(address).toBe("17rxURoF96VhmkcEGCj5LNQkmN9HVhWb7F");
3954 done();
3955 });
3956 });
3957});
3958
3959// github issue 60
3960// Japanese mnemonics generate incorrect bip32 seed
3961// BIP39 seed is set from phrase
3962it('Generates correct seed for Japanese mnemonics', function(done) {
3963 driver.findElement(By.css(".phrase"))
3964 .sendKeys("あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あおぞら");
3965 driver.findElement(By.css(".passphrase"))
3966 .sendKeys("メートルガバヴァぱばぐゞちぢ十人十色");
3967 driver.sleep(generateDelay).then(function() {
3968 driver.findElement(By.css(".seed"))
3969 .getAttribute("value")
3970 .then(function(seed) {
3971 expect(seed).toBe("a262d6fb6122ecf45be09c50492b31f92e9beb7d9a845987a02cefda57a15f9c467a17872029a9e92299b5cbdf306e3a0ee620245cbd508959b6cb7ca637bd55");
3972 done();
3973 });
3974 });
3975});
3976
3977// BIP49 official test vectors
3978// https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki#test-vectors
3979it('Generates BIP49 addresses matching the official test vectors', function(done) {
3980 driver.findElement(By.css('#bip49-tab a'))
3981 .click();
3982 selectNetwork("BTC - Bitcoin Testnet");
3983 driver.findElement(By.css(".phrase"))
3984 .sendKeys("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about");
3985 driver.sleep(generateDelay).then(function() {
3986 getFirstAddress(function(address) {
3987 expect(address).toBe("2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2");
3988 done();
3989 });
3990 });
3991});
3992
3993// BIP49 derivation path is shown
3994it('Shows the bip49 derivation path', function(done) {
3995 driver.findElement(By.css('#bip49-tab a'))
3996 .click();
3997 driver.findElement(By.css(".phrase"))
3998 .sendKeys("abandon abandon ability");
3999 driver.sleep(generateDelay).then(function() {
4000 driver.findElement(By.css('#bip49 .path'))
4001 .getAttribute("value")
4002 .then(function(path) {
4003 expect(path).toBe("m/49'/0'/0'/0");
4004 done();
4005 });
4006 });
4007});
4008
4009// BIP49 extended private key is shown
4010it('Shows the bip49 extended private key', function(done) {
4011 driver.findElement(By.css('#bip49-tab a'))
4012 .click();
4013 driver.findElement(By.css(".phrase"))
4014 .sendKeys("abandon abandon ability");
4015 driver.sleep(generateDelay).then(function() {
4016 driver.findElement(By.css('.extended-priv-key'))
4017 .getAttribute("value")
4018 .then(function(xprv) {
4019 expect(xprv).toBe("yprvALYB4DYRG6CzzVgzQZwwqjAA2wjBGC3iEd7KYYScpoDdmf75qMRWZWxoFcRXBJjgEXdFqJ9vDRGRLJQsrL22Su5jMbNFeM9vetaGVqy9Qy2");
4020 done();
4021 });
4022 });
4023});
4024
4025// BIP49 extended public key is shown
4026it('Shows the bip49 extended public key', function(done) {
4027 driver.findElement(By.css('#bip49-tab a'))
4028 .click();
4029 driver.findElement(By.css(".phrase"))
4030 .sendKeys("abandon abandon ability");
4031 driver.sleep(generateDelay).then(function() {
4032 driver.findElement(By.css('.extended-pub-key'))
4033 .getAttribute("value")
4034 .then(function(xprv) {
4035 expect(xprv).toBe("ypub6ZXXTj5K6TmJCymTWbUxCs6tayZffemZbr2vLvrEP8kceTSENtjm7KHH6thvAKxVar9fGe8rgsPEX369zURLZ68b4f7Vexz7RuXsjQ69YDt");
4036 done();
4037 });
4038 });
4039});
4040
4041// BIP49 account field changes address list
4042it('Can set the bip49 account field', function(done) {
4043 driver.findElement(By.css('#bip49-tab a'))
4044 .click();
4045 driver.findElement(By.css('#bip49 .account'))
4046 .clear();
4047 driver.findElement(By.css('#bip49 .account'))
4048 .sendKeys("1");
4049 driver.findElement(By.css(".phrase"))
4050 .sendKeys("abandon abandon ability");
4051 driver.sleep(generateDelay).then(function() {
4052 getFirstAddress(function(address) {
4053 expect(address).toBe("381wg1GGN4rP88rNC9v7QWsiww63yLVPsn");
4054 done();
4055 });
4056 });
4057});
4058
4059// BIP49 change field changes address list
4060it('Can set the bip49 change field', function(done) {
4061 driver.findElement(By.css('#bip49-tab a'))
4062 .click();
4063 driver.findElement(By.css('#bip49 .change'))
4064 .clear();
4065 driver.findElement(By.css('#bip49 .change'))
4066 .sendKeys("1");
4067 driver.findElement(By.css(".phrase"))
4068 .sendKeys("abandon abandon ability");
4069 driver.sleep(generateDelay).then(function() {
4070 getFirstAddress(function(address) {
4071 expect(address).toBe("3PEM7MiKed5konBoN66PQhK8r3hjGhy9dT");
4072 done();
4073 });
4074 });
4075});
4076
4077// BIP49 account extendend private key is shown
4078it('Shows the bip49 account extended private key', function(done) {
4079 driver.findElement(By.css('#bip49-tab a'))
4080 .click();
4081 driver.findElement(By.css(".phrase"))
4082 .sendKeys("abandon abandon ability");
4083 driver.sleep(generateDelay).then(function() {
4084 driver.findElement(By.css('#bip49 .account-xprv'))
4085 .getAttribute("value")
4086 .then(function(xprv) {
4087 expect(xprv).toBe("yprvAHtB1M5Wp675aLzFy9TJYK2mSsLkg6mcBRh5DZTR7L4EnYSmYPaL63KFA4ycg1PngW5LfkmejxzosCs17TKZMpRFKc3z5SJar6QAKaFcaZL");
4088 done();
4089 });
4090 });
4091});
4092
4093// BIP49 account extendend public key is shown
4094it('Shows the bip49 account extended public key', function(done) {
4095 driver.findElement(By.css('#bip49-tab a'))
4096 .click();
4097 driver.findElement(By.css(".phrase"))
4098 .sendKeys("abandon abandon ability");
4099 driver.sleep(generateDelay).then(function() {
4100 driver.findElement(By.css('#bip49 .account-xpub'))
4101 .getAttribute("value")
4102 .then(function(xprv) {
4103 expect(xprv).toBe("ypub6WsXQrcQeTfNnq4j5AzJuSyVzuBF5ZVTYecg1ws2ffbDfLmv5vtadqdj1NgR6C6gufMpMfJpHxvb6JEQKvETVNWCRanNedfJtnTchZiJtsL");
4104 done();
4105 });
4106 });
4107});
4108
4109// Test selecting coin where bip49 is unavailable (eg CLAM)
4110it('Shows an error on bip49 tab for coins without bip49', function(done) {
4111 driver.findElement(By.css('#bip49-tab a'))
4112 .click();
4113 driver.findElement(By.css(".phrase"))
4114 .sendKeys("abandon abandon ability");
4115 driver.sleep(generateDelay).then(function() {
4116 selectNetwork("CLAM - Clams");
4117 // bip49 available is hidden
4118 driver.findElement(By.css('#bip49 .available'))
4119 .getAttribute("class")
4120 .then(function(classes) {
4121 expect(classes).toContain("hidden");
4122 // bip49 unavailable is shown
4123 driver.findElement(By.css('#bip49 .unavailable'))
4124 .getAttribute("class")
4125 .then(function(classes) {
4126 expect(classes).not.toContain("hidden");
4127 // check there are no addresses shown
4128 driver.findElements(By.css('.addresses tr'))
4129 .then(function(rows) {
4130 expect(rows.length).toBe(0);
4131 // check the derived private key is blank
4132 driver.findElement(By.css('.extended-priv-key'))
4133 .getAttribute("value")
4134 .then(function(xprv) {
4135 expect(xprv).toBe('');
4136 // check the derived public key is blank
4137 driver.findElement(By.css('.extended-pub-key'))
4138 .getAttribute("value")
4139 .then(function(xpub) {
4140 expect(xpub).toBe('');
4141 done();
4142 });
4143 });
4144 })
4145 });
4146 });
4147 });
4148});
4149
4150// github issue 43
4151// Cleared mnemonic and root key still allows addresses to be generated
4152// https://github.com/iancoleman/bip39/issues/43
4153it('Clears old root keys from memory when mnemonic is cleared', function(done) {
4154 // set the phrase
4155 driver.findElement(By.css(".phrase"))
4156 .sendKeys("abandon abandon ability");
4157 driver.sleep(generateDelay).then(function() {
4158 // clear the mnemonic and root key
4159 // using selenium .clear() doesn't seem to trigger the 'input' event
4160 // so clear it using keys instead
4161 driver.findElement(By.css('.phrase'))
4162 .sendKeys(Key.CONTROL,"a");
4163 driver.findElement(By.css('.phrase'))
4164 .sendKeys(Key.DELETE);
4165 driver.findElement(By.css('.root-key'))
4166 .sendKeys(Key.CONTROL,"a");
4167 driver.findElement(By.css('.root-key'))
4168 .sendKeys(Key.DELETE);
4169 driver.sleep(generateDelay).then(function() {
4170 // try to generate more addresses
4171 driver.findElement(By.css('.more'))
4172 .click();
4173 driver.sleep(generateDelay).then(function() {
4174 driver.findElements(By.css(".addresses tr"))
4175 .then(function(els) {
4176 // check there are no addresses shown
4177 expect(els.length).toBe(0);
4178 done();
4179 });
4180 });
4181 });
4182 });
4183});
4184
4185// Github issue 95
4186// error trying to generate addresses from xpub with hardened derivation
4187it('Shows error for hardened addresses with xpub root key', function(done) {
4188 driver.findElement(By.css('#bip32-tab a'))
4189 .click()
4190 driver.executeScript(function() {
4191 $(".hardened-addresses").prop("checked", true);
4192 });
4193 // set xpub for account 0 of bip44 for 'abandon abandon ability'
4194 driver.findElement(By.css("#root-key"))
4195 .sendKeys("xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf");
4196 driver.sleep(feedbackDelay).then(function() {
4197 // Check feedback is correct
4198 driver.findElement(By.css('.feedback'))
4199 .getText()
4200 .then(function(feedback) {
4201 var msg = "Hardened derivation path is invalid with xpub key";
4202 expect(feedback).toBe(msg);
4203 done();
4204 });
4205 });
4206});
4207
1c2b8c6b 4208// Litecoin uses ltub by default, and can optionally be set to xprv
0460b53f
IC
4209// github issue 96
4210// https://github.com/iancoleman/bip39/issues/96
4211// Issue with extended keys on Litecoin
1c2b8c6b 4212it('Uses ltub by default for litecoin, but can be set to xprv', function(done) {
0460b53f
IC
4213 driver.findElement(By.css('.phrase'))
4214 .sendKeys("abandon abandon ability");
4215 selectNetwork("LTC - Litecoin");
4216 driver.sleep(generateDelay).then(function() {
4217 // check the extended key is generated correctly
4218 driver.findElement(By.css('.root-key'))
4219 .getAttribute("value")
4220 .then(function(rootKey) {
1c2b8c6b 4221 expect(rootKey).toBe("Ltpv71G8qDifUiNesiPqf6h5V6eQ8ic77oxQiYtawiACjBEx3sTXNR2HGDGnHETYxESjqkMLFBkKhWVq67ey1B2MKQXannUqNy1RZVHbmrEjnEU");
0460b53f
IC
4222 // set litecoin to use ltub
4223 driver.executeScript(function() {
1c2b8c6b 4224 $(".litecoin-use-ltub").prop("checked", false);
0460b53f
IC
4225 $(".litecoin-use-ltub").trigger("change");
4226 });
4227 driver.sleep(generateDelay).then(function() {
4228 driver.findElement(By.css('.root-key'))
4229 .getAttribute("value")
4230 .then(function(rootKey) {
1c2b8c6b 4231 expect(rootKey).toBe("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi");
0460b53f
IC
4232 done();
4233 });
4234 })
4235 });
4236 });
0460b53f
IC
4237});
4238
4239// github issue 99
4240// https://github.com/iancoleman/bip39/issues/99#issuecomment-327094159
4241// "warn me emphatically when they have detected invalid input" to the entropy field
4242// A warning is shown when entropy is filtered and discarded
4243it('Warns when entropy is filtered and discarded', function(done) {
4244 driver.findElement(By.css('.use-entropy'))
4245 .click();
4246 // set entropy to have no filtered content
4247 driver.findElement(By.css('.entropy'))
4248 .sendKeys("00000000 00000000 00000000 00000000");
4249 driver.sleep(generateDelay).then(function() {
4250 // check the filter warning does not show
4251 driver.findElement(By.css('.entropy-container .filter-warning'))
4252 .getAttribute("class")
4253 .then(function(classes) {
4254 expect(classes).toContain("hidden");
4255 // set entropy to have some filtered content
4256 driver.findElement(By.css('.entropy'))
4257 .sendKeys("10000000 zxcvbn 00000000 00000000 00000000");
4258 driver.sleep(entropyFeedbackDelay).then(function() {
4259 // check the filter warning shows
4260 driver.findElement(By.css('.entropy-container .filter-warning'))
4261 .getAttribute("class")
4262 .then(function(classes) {
4263 expect(classes).not.toContain("hidden");
4264 done();
4265 });
4266 });
4267 });
4268 });
4269});
4270
e0f91e20
IC
4271// Bitcoin Cash address can be set to use cashaddr format
4272it('Can use cashaddr format for bitcoin cash addresses', function(done) {
4273 driver.executeScript(function() {
4274 $(".use-bch-cashaddr-addresses").prop("checked", true);
4275 });
4276 driver.findElement(By.css('.phrase'))
4277 .sendKeys("abandon abandon ability");
4278 selectNetwork("BCH - Bitcoin Cash");
4279 driver.sleep(generateDelay).then(function() {
4280 getFirstAddress(function(address) {
4281 expect(address).toBe("bitcoincash:qzlquk7w4hkudxypl4fgv8x279r754dkvur7jpcsps");
4282 done();
4283 });
4284 });
4285});
4286
0460b53f
IC
4287// Bitcoin Cash address can be set to use bitpay format
4288it('Can use bitpay format for bitcoin cash addresses', function(done) {
4289 driver.executeScript(function() {
e0f91e20 4290 $(".use-bch-bitpay-addresses").prop("checked", true);
0460b53f
IC
4291 });
4292 driver.findElement(By.css('.phrase'))
4293 .sendKeys("abandon abandon ability");
4294 selectNetwork("BCH - Bitcoin Cash");
4295 driver.sleep(generateDelay).then(function() {
4296 getFirstAddress(function(address) {
4297 expect(address).toBe("CZnpA9HPmvhuhLLPWJP8rNDpLUYXy1LXFk");
4298 done();
4299 });
4300 });
4301});
4302
e0f91e20
IC
4303// Bitcoin Cash address can be set to use legacy format
4304it('Can use legacy format for bitcoin cash addresses', function(done) {
4305 driver.executeScript(function() {
4306 $(".use-bch-legacy-addresses").prop("checked", true);
4307 });
4308 driver.findElement(By.css('.phrase'))
4309 .sendKeys("abandon abandon ability");
4310 selectNetwork("BCH - Bitcoin Cash");
4311 driver.sleep(generateDelay).then(function() {
4312 getFirstAddress(function(address) {
4313 expect(address).toBe("1JKvb6wKtsjNoCRxpZ4DGrbniML7z5U16A");
4314 done();
4315 });
4316 });
4317});
4318
9183f9f6
IC
4319// End of tests ported from old suit, so no more comments above each test now
4320
4321it('Can generate more addresses from a custom index', function(done) {
4322 var expectedIndexes = [
4323 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
4324 40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59
4325 ];
4326 driver.findElement(By.css('.phrase'))
4327 .sendKeys("abandon abandon ability");
4328 driver.sleep(generateDelay).then(function() {
4329 // Set start of next lot of rows to be from index 40
4330 // which means indexes 20-39 will not be in the table.
4331 driver.findElement(By.css('.more-rows-start-index'))
4332 .sendKeys("40");
4333 driver.findElement(By.css('.more'))
4334 .click();
4335 driver.sleep(generateDelay).then(function() {
4336 // Check actual indexes in the table match the expected pattern
4337 driver.findElements(By.css(".index"))
4338 .then(function(els) {
4339 expect(els.length).toBe(expectedIndexes.length);
4340 var testRowAtIndex = function(i) {
4341 if (i >= expectedIndexes.length) {
4342 done();
4343 }
4344 else {
4345 els[i].getText()
4346 .then(function(actualPath) {
4347 var noHardened = actualPath.replace(/'/g, "");
4348 var pathBits = noHardened.split("/")
4349 var lastBit = pathBits[pathBits.length-1];
4350 var actualIndex = parseInt(lastBit);
4351 var expectedIndex = expectedIndexes[i];
4352 expect(actualIndex).toBe(expectedIndex);
4353 testRowAtIndex(i+1);
4354 });
4355 }
4356 }
4357 testRowAtIndex(0);
4358 });
4359 });
4360 });
4361});
4362
c49e8812
IC
4363it('Can generate BIP141 addresses with P2WPKH-in-P2SH semanitcs', function(done) {
4364 // Sourced from BIP49 official test specs
4365 driver.findElement(By.css('#bip141-tab a'))
4366 .click();
4367 driver.findElement(By.css('.bip141-path'))
4368 .clear();
4369 driver.findElement(By.css('.bip141-path'))
4370 .sendKeys("m/49'/1'/0'/0");
4371 selectNetwork("BTC - Bitcoin Testnet");
4372 driver.findElement(By.css(".phrase"))
4373 .sendKeys("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about");
4374 driver.sleep(generateDelay).then(function() {
4375 getFirstAddress(function(address) {
4376 expect(address).toBe("2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2");
4377 done();
4378 });
4379 });
4380});
4381
5c203fab
IC
4382it('Can generate BIP141 addresses with P2WSH semanitcs', function(done) {
4383 driver.findElement(By.css('#bip141-tab a'))
4384 .click();
4385 // Choose P2WSH
4386 driver.executeScript(function() {
4387 $(".bip141-semantics option[selected]").removeAttr("selected");
4388 $(".bip141-semantics option").filter(function(i,e) {
f7e9fdf0 4389 return $(e).html() == "P2WSH (1-of-1 multisig)";
5c203fab
IC
4390 }).prop("selected", true);
4391 $(".bip141-semantics").trigger("change");
4392 });
4393 driver.findElement(By.css(".phrase"))
4394 .sendKeys("abandon abandon ability");
4395 driver.sleep(generateDelay).then(function() {
4396 driver.findElement(By.css("#root-key"))
4397 .getAttribute("value")
4398 .then(function(rootKey) {
4399 expect(rootKey).toBe("ZprvAhadJRUYsNge9uHspaggavxU1BUQ8QwfT4Z9UGq5sKF2mSt1mVy8EckLAaoBdmLHyP5eYDJ3LxtmzMNnLg2MRFe7QN2ueF4NCH4s5PrCDR6");
f7e9fdf0
IC
4400 getFirstAddress(function(address) {
4401 expect(address).toBe("bc1q2qhee847pv438tgg8hc7mjy38n8dklleshettn344l0tgs0kj5hskz9p9r");
4402 done();
4403 });
5c203fab
IC
4404 })
4405 });
4406});
4407
4408it('Can generate BIP141 addresses with P2WSH-in-P2SH semanitcs', function(done) {
4409 driver.findElement(By.css('#bip141-tab a'))
4410 .click();
4411 // Choose P2WSH-in-P2SH
4412 driver.executeScript(function() {
4413 $(".bip141-semantics option[selected]").removeAttr("selected");
4414 $(".bip141-semantics option").filter(function(i,e) {
f7e9fdf0 4415 return $(e).html() == "P2WSH nested in P2SH (1-of-1 multisig)";
5c203fab
IC
4416 }).prop("selected", true);
4417 $(".bip141-semantics").trigger("change");
4418 });
4419 driver.findElement(By.css(".phrase"))
4420 .sendKeys("abandon abandon ability");
4421 driver.sleep(generateDelay).then(function() {
4422 driver.findElement(By.css("#root-key"))
4423 .getAttribute("value")
4424 .then(function(rootKey) {
4425 expect(rootKey).toBe("YprvANkMzkodih9AJc6kzDu4NqrxqDKxBnxAXx2vgswCVJs9iM4nWqoZcZ6C9NqbdrgNZjxqnjhUtJYE74mDcycLd1xWY2LV4LEsvZ1DgqxuAKe");
f7e9fdf0
IC
4426 getFirstAddress(function(address) {
4427 expect(address).toBe("343DLC4vGDyHBbBr9myL8zzZA1MdN9TM1G");
4428 done();
4429 });
5c203fab
IC
4430 })
4431 });
4432});
4433
4434it('Uses Vprv for bitcoin testnet p2wsh', function(done) {
4435 selectNetwork("BTC - Bitcoin Testnet");
4436 driver.findElement(By.css('#bip141-tab a'))
4437 .click()
4438 // Choose P2WSH
4439 driver.executeScript(function() {
4440 $(".bip141-semantics option[selected]").removeAttr("selected");
4441 $(".bip141-semantics option").filter(function(i,e) {
f7e9fdf0 4442 return $(e).html() == "P2WSH (1-of-1 multisig)";
5c203fab
IC
4443 }).prop("selected", true);
4444 $(".bip141-semantics").trigger("change");
4445 });
4446 driver.findElement(By.css('.phrase'))
4447 .sendKeys('abandon abandon ability');
4448 driver.sleep(generateDelay).then(function() {
4449 driver.findElement(By.css('.root-key'))
4450 .getAttribute("value")
4451 .then(function(path) {
4452 expect(path).toBe("Vprv16YtLrHXxePM5ja5hXQbiJs5JKDAc4WcaXo5rZcrVMU6bMhUg1oY7fpPku3i819gvMcHvq1h8aELDsyfCEs19vj1Q3iDHRrESWyJConkoT1");
4453 done();
4454 })
4455 });
4456});
4457
4458it('Uses Uprv for bitcoin testnet p2wsh-in-p2sh', function(done) {
4459 selectNetwork("BTC - Bitcoin Testnet");
4460 driver.findElement(By.css('#bip141-tab a'))
4461 .click()
4462 // Choose P2WSH-in-P2SH
4463 driver.executeScript(function() {
4464 $(".bip141-semantics option[selected]").removeAttr("selected");
4465 $(".bip141-semantics option").filter(function(i,e) {
f7e9fdf0 4466 return $(e).html() == "P2WSH nested in P2SH (1-of-1 multisig)";
5c203fab
IC
4467 }).prop("selected", true);
4468 $(".bip141-semantics").trigger("change");
4469 });
4470 driver.findElement(By.css('.phrase'))
4471 .sendKeys('abandon abandon ability');
4472 driver.sleep(generateDelay).then(function() {
4473 driver.findElement(By.css('.root-key'))
4474 .getAttribute("value")
4475 .then(function(path) {
4476 expect(path).toBe("Uprv95RJn67y7xyEuRLHenkZYVUx9LkARJzAsVx3ZJMeyHMdVwosWD9K8JTe4Z1FeE4gwBVcnqKF3f82ZvJxkBxHS5E74fYnigxvqeke8ZV3Fp2");
4477 done();
4478 })
4479 });
4480});
4481
c49e8812
IC
4482it('Can generate BIP141 addresses with P2WPKH semanitcs', function(done) {
4483 // This result tested against bitcoinjs-lib test spec for segwit address
4484 // using the first private key of this mnemonic and default path m/0
4485 // https://github.com/bitcoinjs/bitcoinjs-lib/blob/9c8503cab0c6c30a95127042703bc18e8d28c76d/test/integration/addresses.js#L50
4486 // so whilst not directly comparable, substituting the private key produces
4487 // identical results between this tool and the bitcoinjs-lib test.
4488 // Private key generated is:
4489 // L3L8Nu9whawPBNLGtFqDhKut9DKKfG3CQoysupT7BimqVCZsLFNP
4490 driver.findElement(By.css('#bip141-tab a'))
4491 .click();
4492 // Choose P2WPKH
4493 driver.executeScript(function() {
4494 $(".bip141-semantics option[selected]").removeAttr("selected");
4495 $(".bip141-semantics option").filter(function(i,e) {
4496 return $(e).html() == "P2WPKH";
4497 }).prop("selected", true);
4498 $(".bip141-semantics").trigger("change");
4499 });
4500 driver.findElement(By.css(".phrase"))
4501 .sendKeys("abandon abandon ability");
4502 driver.sleep(generateDelay).then(function() {
4503 getFirstAddress(function(address) {
4504 expect(address).toBe("bc1qfwu6a5a3evygrk8zvdxxvz4547lmpyx5vsfxe9");
4505 done();
4506 });
4507 });
4508});
4509
74ab4cbe
IC
4510it('Shows the entropy used by the PRNG when clicking generate', function(done) {
4511 driver.findElement(By.css('.generate')).click();
4512 driver.sleep(generateDelay).then(function() {
4513 driver.findElement(By.css('.entropy'))
4514 .getAttribute("value")
4515 .then(function(entropy) {
4516 expect(entropy).not.toBe("");
4517 done();
4518 });
4519 });
4520});
4521
4522it('Shows the index of each word in the mnemonic', function(done) {
4523 driver.findElement(By.css('.phrase'))
4524 .sendKeys("abandon abandon ability");
4525 driver.sleep(generateDelay).then(function() {
4526 driver.findElement(By.css('.use-entropy'))
4527 .click();
4528 driver.findElement(By.css('.word-indexes'))
4529 .getText()
4530 .then(function(indexes) {
4531 expect(indexes).toBe("0, 0, 1");
4532 done();
4533 });
4534 });
4535});
4536
4e9b492c
IC
4537it('Shows the derivation path for bip84 tab', function(done) {
4538 driver.findElement(By.css('#bip84-tab a'))
4539 .click()
4540 driver.findElement(By.css('.phrase'))
4541 .sendKeys('abandon abandon ability');
4542 driver.sleep(generateDelay).then(function() {
4543 driver.findElement(By.css('#bip84 .path'))
4544 .getAttribute("value")
4545 .then(function(path) {
4546 expect(path).toBe("m/84'/0'/0'/0");
4547 done();
4548 })
4549 });
4550});
4551
4552it('Shows the extended private key for bip84 tab', function(done) {
4553 driver.findElement(By.css('#bip84-tab a'))
4554 .click()
4555 driver.findElement(By.css('.phrase'))
4556 .sendKeys('abandon abandon ability');
4557 driver.sleep(generateDelay).then(function() {
4558 driver.findElement(By.css('.extended-priv-key'))
4559 .getAttribute("value")
4560 .then(function(path) {
4561 expect(path).toBe("zprvAev3RKrZ3QVKiUFCfdeMRen1BPDJgdNt1XpxiDy8acSs4kkAGTCvq7HeRYRNNpo8EtEjCFQBWavJwtCUR29y4TUCH4X5RXMcyq48uN8y9BP");
4562 done();
4563 })
4564 });
4565});
4566
4567it('Shows the extended public key for bip84 tab', function(done) {
4568 driver.findElement(By.css('#bip84-tab a'))
4569 .click()
4570 driver.findElement(By.css('.phrase'))
4571 .sendKeys('abandon abandon ability');
4572 driver.sleep(generateDelay).then(function() {
4573 driver.findElement(By.css('.extended-pub-key'))
4574 .getAttribute("value")
4575 .then(function(path) {
4576 expect(path).toBe("zpub6suPpqPSsn3cvxKfmfBMnnijjR3o666jNkkZWcNk8wyqwZ5JozXBNuc8Gs7DB3uLwTDvGVTspVEAUQcEjKF3pZHgywVbubdTqbXTUg7usyx");
4577 done();
4578 })
4579 });
4580});
4581
4582it('Changes the address list if bip84 account is changed', function(done) {
4583 driver.findElement(By.css('#bip84-tab a'))
4584 .click()
4585 driver.findElement(By.css('#bip84 .account'))
4586 .sendKeys('1');
4587 driver.findElement(By.css('.phrase'))
4588 .sendKeys('abandon abandon ability');
4589 driver.sleep(generateDelay).then(function() {
4590 getFirstAddress(function(address) {
4591 expect(address).toBe("bc1qp7vv669t2fy965jdzvqwrraana89ctd5ewc662");
4592 done();
4593 });
4594 });
4595});
4596
4597it('Changes the address list if bip84 change is changed', function(done) {
4598 driver.findElement(By.css('#bip84-tab a'))
4599 .click()
4600 driver.findElement(By.css('#bip84 .change'))
4601 .sendKeys('1');
4602 driver.findElement(By.css('.phrase'))
4603 .sendKeys('abandon abandon ability');
4604 driver.sleep(generateDelay).then(function() {
4605 getFirstAddress(function(address) {
4606 expect(address).toBe("bc1qr39vj6rh06ff05m53uxq8uazehwhccswylhrs2");
4607 done();
4608 });
4609 });
4610});
4611
4612it('Passes the official BIP84 test spec for rootpriv', function(done) {
4613 driver.findElement(By.css('#bip84-tab a'))
4614 .click()
4615 driver.findElement(By.css('.phrase'))
4616 .sendKeys('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about');
4617 driver.sleep(generateDelay).then(function() {
4618 driver.findElement(By.css(".root-key"))
4619 .getAttribute("value")
4620 .then(function(rootKey) {
4621 expect(rootKey).toBe("zprvAWgYBBk7JR8Gjrh4UJQ2uJdG1r3WNRRfURiABBE3RvMXYSrRJL62XuezvGdPvG6GFBZduosCc1YP5wixPox7zhZLfiUm8aunE96BBa4Kei5");
4622 done();
4623 })
4624 });
4625});
4626
4627it('Passes the official BIP84 test spec for account 0 xprv', function(done) {
4628 driver.findElement(By.css('#bip84-tab a'))
4629 .click()
4630 driver.findElement(By.css('.phrase'))
4631 .sendKeys('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about');
4632 driver.sleep(generateDelay).then(function() {
4633 driver.findElement(By.css("#bip84 .account-xprv"))
4634 .getAttribute("value")
4635 .then(function(rootKey) {
4636 expect(rootKey).toBe("zprvAdG4iTXWBoARxkkzNpNh8r6Qag3irQB8PzEMkAFeTRXxHpbF9z4QgEvBRmfvqWvGp42t42nvgGpNgYSJA9iefm1yYNZKEm7z6qUWCroSQnE");
4637 done();
4638 })
4639 });
4640});
4641
4642it('Passes the official BIP84 test spec for account 0 xpub', function(done) {
4643 driver.findElement(By.css('#bip84-tab a'))
4644 .click()
4645 driver.findElement(By.css('.phrase'))
4646 .sendKeys('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about');
4647 driver.sleep(generateDelay).then(function() {
4648 driver.findElement(By.css("#bip84 .account-xpub"))
4649 .getAttribute("value")
4650 .then(function(rootKey) {
4651 expect(rootKey).toBe("zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs");
4652 done();
4653 })
4654 });
4655});
4656
4657it('Passes the official BIP84 test spec for account 0 first address', function(done) {
4658 driver.findElement(By.css('#bip84-tab a'))
4659 .click()
4660 driver.findElement(By.css('.phrase'))
4661 .sendKeys('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about');
4662 driver.sleep(generateDelay).then(function() {
4663 getFirstAddress(function(address) {
4664 expect(address).toBe("bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu");
4665 done();
4666 });
4667 });
4668});
4669
4670it('Passes the official BIP84 test spec for account 0 first change address', function(done) {
4671 driver.findElement(By.css('#bip84-tab a'))
4672 .click()
4673 driver.findElement(By.css('.phrase'))
4674 .sendKeys('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about');
4675 driver.findElement(By.css('#bip84 .change'))
4676 .sendKeys('1');
4677 driver.sleep(generateDelay).then(function() {
4678 getFirstAddress(function(address) {
4679 expect(address).toBe("bc1q8c6fshw2dlwun7ekn9qwf37cu2rn755upcp6el");
4680 done();
4681 });
4682 });
4683});
4684
a78f4e28
IC
4685it('Can display the table as csv', function(done) {
4686 var headings = "path,address,public key,private key";
4687 var row1 = "m/44'/0'/0'/0/0,1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug,033f5aed5f6cfbafaf223188095b5980814897295f723815fea5d3f4b648d0d0b3,L26cVSpWFkJ6aQkPkKmTzLqTdLJ923e6CzrVh9cmx21QHsoUmrEE";
4688 var row20 = "m/44'/0'/0'/0/19,1KhBy28XLAciXnnRvm71PvQJaETyrxGV55,02b4b3e396434d8cdd20c03ac4aaa07387784d5d867b75987f516f5705ee68cb3a,L4GrDrjReMsCAu5DkLXn79jSb95qR7Zfx7eshybCQZ1qL32MXJab";
4689 driver.findElement(By.css('.phrase'))
4690 .sendKeys('abandon abandon ability');
4691 driver.sleep(generateDelay).then(function() {
4692 driver.findElement(By.css('.csv'))
4693 .getAttribute("value")
4694 .then(function(csv) {
4695 expect(csv).toContain(headings);
4696 expect(csv).toContain(row1);
4697 expect(csv).toContain(row20);
4698 done();
4699 });
4700 });
4701});
4702
78db37f6
IC
4703it('LeftPads ethereum keys that are less than 32 bytes', function(done) {
4704 // see https://github.com/iancoleman/bip39/issues/155
4705 selectNetwork("ETH - Ethereum");
4706 driver.findElement(By.css('#bip32-tab a'))
4707 .click()
4708 driver.findElement(By.css('#bip32-path'))
4709 .clear();
4710 driver.findElement(By.css('#bip32-path'))
4711 .sendKeys("m/44'/60'/0'");
4712 driver.findElement(By.css('.phrase'))
4713 .sendKeys('scout sort custom elite radar rare vivid thing trophy gesture cover snake change narrow kite list nation sustain buffalo erode open balance system young');
4714 driver.sleep(generateDelay).then(function() {
2ef27fb8
IC
4715 getFirstAddress(function(address) {
4716 expect(address).toBe("0x8943E785B4a5714FC87a3aFAad1eB1FeB602B118");
4717 done();
4718 });
78db37f6
IC
4719 });
4720});
4721
e21e32da
IC
4722it('Can encrypt private keys using BIP38', function(done) {
4723 // see https://github.com/iancoleman/bip39/issues/140
4724 driver.executeScript(function() {
4725 $(".use-bip38").prop("checked", true);
4726 });
4727 driver.findElement(By.css('.bip38-password'))
4728 .sendKeys('bip38password');
4729 driver.findElement(By.css('.rows-to-add'))
4730 .clear();
4731 driver.findElement(By.css('.rows-to-add'))
4732 .sendKeys('1');
4733 driver.findElement(By.css('.phrase'))
4734 .sendKeys('abandon abandon ability');
4735 driver.sleep(bip38delay).then(function() {
4736 // address
4737 getFirstRowValue(function(address) {
4738 expect(address).toBe("1NCvSdumA3ngMM9c4aqU56AM6rqXddfuXB");
4739 // pubkey
4740 getFirstRowValue(function(pubkey) {
4741 expect(pubkey).toBe("043f5aed5f6cfbafaf223188095b5980814897295f723815fea5d3f4b648d0d0b3884a74447ea901729b1e73a999b7520e7cb55b4120e6432c64153ccab8a848e1");
4742 // privkey
4743 getFirstRowValue(function(privkey) {
4744 expect(privkey).toBe("6PRNRiFnj1RoR3sXhymdCvoZCgnUHQpfupNdKkFbWJkwWQEKesWt1EDMDM");
4745 done();
4746 }, ".privkey");
4747 }, ".pubkey");
4748 }, ".address");
4749 });
4750}, bip38delay + 5000);
4751
09d63290
IC
4752it('Shows the checksum for the entropy', function(done) {
4753 driver.findElement(By.css('.use-entropy'))
4754 .click();
4755 driver.findElement(By.css('.entropy'))
4756 .sendKeys("00000000000000000000000000000000");
4757 driver.sleep(generateDelay).then(function() {
4758 driver.findElement(By.css('.checksum'))
4759 .getText()
4760 .then(function(text) {
4761 expect(text).toBe("1");
4762 done();
4763 });
4764 });
4765});
4766
f8ca25c3
IC
4767it('Shows the checksum for the entropy with the correct groupings', function(done) {
4768 driver.findElement(By.css('.use-entropy'))
4769 .click();
4770 // create a checksum of 20 bits, which spans multiple words
4771 driver.findElement(By.css('.entropy'))
4772 .sendKeys("F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
4773 driver.sleep(generateDelay).then(function() {
4774 driver.findElement(By.css('.checksum'))
4775 .getText()
4776 .then(function(text) {
4777 // first group is 9 bits, second group is 11
4778 expect(text).toBe("011010111 01110000110");
4779 done();
4780 });
4781 });
4782});
4783
38122a3d
IC
4784it('Uses vprv for bitcoin testnet p2wpkh', function(done) {
4785 selectNetwork("BTC - Bitcoin Testnet");
4786 driver.findElement(By.css('#bip84-tab a'))
4787 .click()
4788 driver.findElement(By.css('.phrase'))
4789 .sendKeys('abandon abandon ability');
4790 driver.sleep(generateDelay).then(function() {
4791 driver.findElement(By.css('.root-key'))
4792 .getAttribute("value")
4793 .then(function(path) {
4794 expect(path).toBe("vprv9DMUxX4ShgxML9N2YV5CvWEebWrM9aJ5ULpbRRyzyWu6vs4BzTvbfFFrH41N5hVi7MYSfiugd765L3JmAfDM5po36Y8ouCKRDeYQwByCmS7");
4795 done();
4796 })
4797 });
4798});
4799
85c90672
IC
4800it('Shows a warning if generating weak mnemonics', function(done) {
4801 driver.executeScript(function() {
4802 $(".strength option[selected]").removeAttr("selected");
4803 $(".strength option[value=6]").prop("selected", true);
4804 $(".strength").trigger("change");
4805 });
4806 driver.findElement(By.css(".generate-container .warning"))
4807 .getAttribute("class")
4808 .then(function(classes) {
4809 expect(classes).not.toContain("hidden");
4810 done();
4811 });
4812});
4813
4814it('Does not show a warning if generating strong mnemonics', function(done) {
4815 driver.executeScript(function() {
4816 $(".strength option[selected]").removeAttr("selected");
4817 $(".strength option[value=12]").prop("selected", true);
4818 });
4819 driver.findElement(By.css(".generate-container .warning"))
4820 .getAttribute("class")
4821 .then(function(classes) {
4822 expect(classes).toContain("hidden");
4823 done();
4824 });
4825});
4826
645945a0
IC
4827it('Shows a warning if overriding weak entropy with longer mnemonics', function(done) {
4828 driver.findElement(By.css('.use-entropy'))
4829 .click();
4830 driver.findElement(By.css('.entropy'))
4831 .sendKeys("0123456789abcdef"); // 6 words
4832 driver.executeScript(function() {
4833 $(".mnemonic-length").val("12").trigger("change");
4834 });
4835 driver.findElement(By.css(".weak-entropy-override-warning"))
4836 .getAttribute("class")
4837 .then(function(classes) {
4838 expect(classes).not.toContain("hidden");
4839 done();
4840 });
4841});
4842
4843it('Does not show a warning if entropy is stronger than mnemonic length', function(done) {
4844 driver.findElement(By.css('.use-entropy'))
4845 .click();
4846 driver.findElement(By.css('.entropy'))
4847 .sendKeys("0123456789abcdef0123456789abcdef0123456789abcdef"); // 18 words
4848 driver.executeScript(function() {
4849 $(".mnemonic-length").val("12").trigger("change");
4850 });
4851 driver.findElement(By.css(".weak-entropy-override-warning"))
4852 .getAttribute("class")
4853 .then(function(classes) {
4854 expect(classes).toContain("hidden");
4855 done();
4856 });
4857});
4858
530648c1
IC
4859it('Shows litecoin BIP49 addresses', function(done) {
4860 driver.findElement(By.css('.phrase'))
4861 .sendKeys('abandon abandon ability');
4862 selectNetwork("LTC - Litecoin");
4863 driver.findElement(By.css('#bip49-tab a'))
4864 .click()
4865 // bip49 addresses are shown
4866 driver.sleep(generateDelay).then(function() {
4867 driver.findElement(By.css('#bip49 .available'))
4868 .getAttribute("class")
4869 .then(function(classes) {
4870 expect(classes).not.toContain("hidden");
4871 // check first address
4872 getFirstAddress(function(address) {
4873 expect(address).toBe("MFwLPhsXoBuSLL8cLmW9uK6tChkzduV8qN");
4874 done();
4875 });
4876 });
4877 });
4878});
4879
76120cb0
H
4880it('Shows Groestlcoin BIP49 addresses', function(done) {
4881 driver.findElement(By.css('.phrase'))
4882 .sendKeys('abandon abandon ability');
4883 selectNetwork("GRS - Groestlcoin");
4884 driver.findElement(By.css('#bip49-tab a'))
4885 .click()
4886 // bip49 addresses are shown
4887 driver.sleep(generateDelay).then(function() {
4888 driver.findElement(By.css('#bip49 .available'))
4889 .getAttribute("class")
4890 .then(function(classes) {
4891 expect(classes).not.toContain("hidden");
4892 // check first address
4893 getFirstAddress(function(address) {
4894 expect(address).toBe("3HXSCZwCypLyixMsF4Z1sN49noJtrm8gnX");
4895 done();
4896 });
4897 });
4898 });
4899});
4900
6f7fa353
IC
4901it('Can use root keys to generate segwit table rows', function(done) {
4902 // segwit uses ypub / zpub instead of xpub but the root key should still
4903 // be valid regardless of the encoding used to import that key.
4904 // Maybe this breaks the reason for the different extended key prefixes, but
4905 // since the parsed root key is used behind the scenes anyhow this should be
4906 // allowed.
4907 driver.findElement(By.css('#root-key'))
4908 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi');
4909 driver.findElement(By.css('#bip49-tab a'))
4910 .click()
4911 // bip49 addresses are shown
4912 driver.sleep(generateDelay).then(function() {
4913 getFirstAddress(function(address) {
4914 expect(address).toBe("3QG2Y9AA4xZ846gKHZqNf7mvVKbLqMKxr2");
4915 done();
4916 });
4917 });
4918});
4919
659b06a7
IC
4920// Pull Request 271
4921// Allow converting mnemonic back to raw entropy value
3799728c 4922it('Converts mnemonics into raw entropy', function(done) {
659b06a7
IC
4923 driver.findElement(By.css('.phrase'))
4924 .sendKeys('abandon abandon about');
4925 driver.sleep(generateDelay).then(function() {
4926 driver.findElement(By.css('.use-entropy'))
4927 .click();
4928 driver.findElement(By.css('.entropy'))
4929 .getAttribute("value")
4930 .then(function(entropy) {
244c7602 4931 expect(entropy).toBe("00000001");
70029471
IC
4932 driver.findElement(By.css('.phrase'))
4933 .getAttribute("value")
4934 .then(function(phrase) {
4935 expect(phrase).toBe("abandon abandon about");
4936 done();
4937 });
659b06a7
IC
4938 });
4939 });
4940});
4941
a04946e2
IC
4942// Pull Request 279
4943// Added Split Phrase Card Output
3799728c 4944it('Shows split prase cards', function(done) {
a04946e2
IC
4945 var originalPhrase = "ugly charge strong giant once anchor capable october thumb inject dwarf legal alley mixture shoot";
4946 var originalWords = originalPhrase.split(' ');
4947 driver.findElement(By.css('.phrase'))
4948 .sendKeys(originalPhrase);
4949 driver.sleep(generateDelay).then(function() {
4950 driver.findElement(By.css('.phraseSplit'))
4951 .getAttribute("value")
4952 .then(function(cardsStr) {
4953 var cards = cardsStr.split("\n");
4954 expect(cards.length).toBe(3);
4955 // test all 2-of-3 combos can be used to form full phrase
4956 var combos = [[0,1],[0,2],[1,2]];
4957 for (var i=0; i<combos.length; i++) {
4958 var combo = combos[i];
4959 var a = combo[0];
4960 var b = combo[1];
4961 var phrase = cards[a] + " " + cards[b];
4962 // check all original words are present
4963 for (var j=0; j<originalWords.length; j++) {
4964 var originalWord = originalWords[j];
4965 expect(phrase).toContain(originalWord);
4966 }
4967 }
4968 done();
4969 });
4970 });
4971});
4972
f2f8d817
A
4973// Pull Request 454 https://github.com/iancoleman/bip39/pull/454
4974// Add BIP85 support
4975it('Show BIP85', function(done) {
4976 var originalPhrase = "install scatter logic circle pencil average fall shoe quantum disease suspect usage";
4977 driver.findElement(By.css('.phrase'))
4978 .sendKeys(originalPhrase);
4979 driver.sleep(generateDelay).then(function() {
4980 driver.findElement(By.css('.showBip85')).click();
4981 driver.findElement(By.css('.showBip85')).isSelected().then(function(isSelected) {
4982 expect(isSelected).toBe(true)
4983 driver.findElement(By.css('#bip85Field')).getAttribute("value").then(function(childMnemonic) {
4984 expect(childMnemonic).toBe('girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose')
4985 done();
4986 })
4987 });
4988 });
4989});
4990
516c16d7
IC
4991// It allows manually specifying the entropy type
4992it('Allows entropy type to be manually selected', function(done) {
4993 driver.findElement(By.css('.use-entropy'))
4994 .click();
4995 // use decimal entropy
4996 driver.findElement(By.css('.entropy'))
4997 .sendKeys("91");
4998 // manually change to binary entropy
4999 driver.executeScript(function() {
5000 $(".entropy-container input[value='binary']").click();
5001 });
5002 driver.sleep(entropyFeedbackDelay).then(function() {
5003 driver.findElement(By.css('.entropy-container'))
5004 .getText()
5005 .then(function(text) {
5006 // overide 91 to be just 1
5007 var key = "Filtered Entropy";
5008 var value = "1";
5009 var reText = key + "\\s+" + value;
5010 var re = new RegExp(reText);
5011 expect(text).toMatch(re);
5012 // overide automatic decimal to binary
5013 var key = "Entropy Type";
5014 var value = "binary";
5015 var reText = key + "\\s+" + value;
5016 var re = new RegExp(reText);
5017 expect(text).toMatch(re);
5018 // overide 2 events to 1
5019 var key = "Event Count";
5020 var value = 1;
5021 var reText = key + "\\s+" + value;
5022 var re = new RegExp(reText);
5023 expect(text).toMatch(re);
5024 // overide log2(10)*2 bits to 1 bit
5025 var key = "Total Bits";
5026 var value = 1;
5027 var reText = key + "\\s+" + value;
5028 var re = new RegExp(reText);
5029 expect(text).toMatch(re);
5030 done();
5031 });
5032 });
5033});
5034
9cf02dd4
IC
5035// https://github.com/iancoleman/bip39/issues/388
5036// Make field for bip39 seed editable
5037it('Generates addresses when seed is set', function(done) {
5038 driver.findElement(By.css('.seed'))
5039 .sendKeys("20da140d3dd1df8713cefcc4d54ce0e445b4151027a1ab567b832f6da5fcc5afc1c3a3f199ab78b8e0ab4652efd7f414ac2c9a3b81bceb879a70f377aa0a58f3");
5040 driver.sleep(generateDelay).then(function() {
5041 getFirstAddress(function(address) {
5042 expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug");
5043 done();
5044 });
5045 });
5046});
5047
dfb4fd1b
ML
5048// https://github.com/iancoleman/bip39/issues/169
5049it('Generates ethereum addresses from a public key', function(done) {
5050 var pubkey = "xpub68UK3hrMEp2jLPxPASgXSiqiUsQsUWZHCeuu6NqcJLt259LMeWzwDyufXLN1QmjLeLRY5he4QfArDDLbsXiw3xN3kFcYtyDy74BY73RPhhW";
5051 driver.findElement(By.css('.root-key'))
5052 .sendKeys(pubkey);
5053 driver.findElement(By.css('#bip32-tab a'))
5054 .click()
5055 selectNetwork('ETH - Ethereum');
5056 driver.sleep(generateDelay).then(function() {
5057 getFirstAddress(function(address) {
5058 expect(address).toBe("0x1Bd54748903438C7E386b4a3fCbe16237A316a98");
5059 done();
5060 });
5061 });
5062});
5063
0460b53f 5064});