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