aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-12-12 10:54:08 +1100
committerIan Coleman <coleman.ian@gmail.com>2016-12-12 11:04:41 +1100
commitc554e6ff5c2c543997841c0fb0a506262843e8df (patch)
tree25641801120c7e80b6c76c28aea86a12cb8cf148 /tests.js
parent32fab2c39507357909438c2be8cd100c6539038f (diff)
downloadBIP39-c554e6ff5c2c543997841c0fb0a506262843e8df.tar.gz
BIP39-c554e6ff5c2c543997841c0fb0a506262843e8df.tar.zst
BIP39-c554e6ff5c2c543997841c0fb0a506262843e8df.zip
BIP44 Account xprv and xpub keys are shown
which are used for import / export in most BIP44 wallets.
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 10d13a3..d5a73f6 100644
--- a/tests.js
+++ b/tests.js
@@ -3086,6 +3086,58 @@ page.open(url, function(status) {
3086}); 3086});
3087}, 3087},
3088 3088
3089// BIP44 account extendend private key is shown
3090// github issue 37 - compatibility with electrum
3091function() {
3092page.open(url, function(status) {
3093 // set the phrase
3094 var expected = "xprv9yzrnt4zWVJUr1k2VxSPy9ettKz5PpeDMgaVG7UKedhqnw1tDkxP2UyYNhuNSumk2sLE5ctwKZs9vwjsq3e1vo9egCK6CzP87H2cVYXpfwQ";
3095 page.evaluate(function() {
3096 $(".phrase").val("abandon abandon ability");
3097 $(".phrase").trigger("input");
3098 });
3099 // check the BIP44 account extended private key
3100 waitForGenerate(function() {
3101 var actual = page.evaluate(function() {
3102 return $(".account-xprv").val();
3103 });
3104 if (actual != expected) {
3105 console.log("BIP44 account extended private key is incorrect");
3106 console.log("Expected: " + expected);
3107 console.log("Actual: " + actual);
3108 fail();
3109 }
3110 next();
3111 });
3112});
3113},
3114
3115// BIP44 account extendend public key is shown
3116// github issue 37 - compatibility with electrum
3117function() {
3118page.open(url, function(status) {
3119 // set the phrase
3120 var expected = "xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf";
3121 page.evaluate(function() {
3122 $(".phrase").val("abandon abandon ability");
3123 $(".phrase").trigger("input");
3124 });
3125 // check the BIP44 account extended public key
3126 waitForGenerate(function() {
3127 var actual = page.evaluate(function() {
3128 return $(".account-xpub").val();
3129 });
3130 if (actual != expected) {
3131 console.log("BIP44 account extended public key is incorrect");
3132 console.log("Expected: " + expected);
3133 console.log("Actual: " + actual);
3134 fail();
3135 }
3136 next();
3137 });
3138});
3139},
3140
3089 3141
3090// If you wish to add more tests, do so here... 3142// If you wish to add more tests, do so here...
3091 3143