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