diff options
author | BeachM <11566409+BeachM@users.noreply.github.com> | 2018-08-10 21:07:36 -0700 |
---|---|---|
committer | BeachM <11566409+BeachM@users.noreply.github.com> | 2018-08-10 21:07:36 -0700 |
commit | ae51db39a33c17abaddad05e2453d11aabb3a461 (patch) | |
tree | 045620006fe699e2b01b674c7abcf93c3d23bec0 | |
parent | e47cd1970f7f40ede6a97fb284df1701a3f252e5 (diff) | |
download | BIP39-ae51db39a33c17abaddad05e2453d11aabb3a461.tar.gz BIP39-ae51db39a33c17abaddad05e2453d11aabb3a461.tar.zst BIP39-ae51db39a33c17abaddad05e2453d11aabb3a461.zip |
add stash parameters
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 22 | ||||
-rw-r--r-- | src/js/index.js | 14 | ||||
-rw-r--r-- | tests/spec/tests.js | 16 |
3 files changed, 51 insertions, 1 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 8744142..06ad221 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -1045,6 +1045,28 @@ bitcoinjs.bitcoin.networks.solarcoin = { | |||
1045 | wif: 0x92, | 1045 | wif: 0x92, |
1046 | }; | 1046 | }; |
1047 | 1047 | ||
1048 | bitcoinjs.bitcoin.networks.stash = { | ||
1049 | messagePrefix: '\x18Stash Signed Message:\n', | ||
1050 | bip32: { | ||
1051 | public: 0x0488b21e, | ||
1052 | private: 0x0488ade4 | ||
1053 | }, | ||
1054 | pubKeyHash: 0x4c, | ||
1055 | scriptHash: 0x10, | ||
1056 | wif: 0xcc | ||
1057 | }; | ||
1058 | |||
1059 | bitcoinjs.bitcoin.networks.stashtn = { | ||
1060 | messagePrefix: '\x18Stash Test Signed Message:\n', | ||
1061 | bip32: { | ||
1062 | public: 0x043587cf, | ||
1063 | private: 0x04358394 | ||
1064 | }, | ||
1065 | pubKeyHash: 0x8c, | ||
1066 | scriptHash: 0x13, | ||
1067 | wif: 0xef | ||
1068 | }; | ||
1069 | |||
1048 | bitcoinjs.bitcoin.networks.stratis = { | 1070 | bitcoinjs.bitcoin.networks.stratis = { |
1049 | messagePrefix: '\x18Stratis Signed Message:\n', | 1071 | messagePrefix: '\x18Stratis Signed Message:\n', |
1050 | bip32: { | 1072 | bip32: { |
diff --git a/src/js/index.js b/src/js/index.js index 589ba20..16c5cef 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -2357,6 +2357,20 @@ | |||
2357 | }, | 2357 | }, |
2358 | }, | 2358 | }, |
2359 | { | 2359 | { |
2360 | name: "STASH - Stash", | ||
2361 | onSelect: function() { | ||
2362 | network = bitcoinjs.bitcoin.networks.stash; | ||
2363 | setHdCoin(0xC0C0); | ||
2364 | }, | ||
2365 | }, | ||
2366 | { | ||
2367 | name: "STASH - Stash Testnet", | ||
2368 | onSelect: function() { | ||
2369 | network = bitcoinjs.bitcoin.networks.stashtn; | ||
2370 | setHdCoin(0xCAFE); | ||
2371 | }, | ||
2372 | }, | ||
2373 | { | ||
2360 | name: "STRAT - Stratis", | 2374 | name: "STRAT - Stratis", |
2361 | onSelect: function() { | 2375 | onSelect: function() { |
2362 | network = bitcoinjs.bitcoin.networks.stratis; | 2376 | network = bitcoinjs.bitcoin.networks.stratis; |
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 6208bfc..e0eea6b 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -296,7 +296,7 @@ describe('BIP39 Tool Tests', function() { | |||
296 | 296 | ||
297 | beforeEach(function(done) { | 297 | beforeEach(function(done) { |
298 | driver = newDriver(); | 298 | driver = newDriver(); |
299 | driver.get(url).then(done); | 299 | driver.get(url).then(done); |
300 | }); | 300 | }); |
301 | 301 | ||
302 | // Close the website after each test is run (so that it is opened fresh each time) | 302 | // Close the website after each test is run (so that it is opened fresh each time) |
@@ -1089,6 +1089,20 @@ it('Allows selection of Solarcoin', function(done) { | |||
1089 | }; | 1089 | }; |
1090 | testNetwork(done, params); | 1090 | testNetwork(done, params); |
1091 | }); | 1091 | }); |
1092 | it('Allows selection of stash', function(done) { | ||
1093 | var params = { | ||
1094 | selectText: "STASH - Stash", | ||
1095 | firstAddress: "XxwAsWB7REDKmAvHA85SbEZQQtpxeUDxS3", | ||
1096 | }; | ||
1097 | testNetwork(done, params); | ||
1098 | }); | ||
1099 | it('Allows selection of stash testnet', function(done) { | ||
1100 | var params = { | ||
1101 | selectText: "STASH - Stash Testnet", | ||
1102 | firstAddress: "YdbhtMuGsPSkE6bPdNTHoFSszQKmK4S5LT", | ||
1103 | }; | ||
1104 | testNetwork(done, params); | ||
1105 | }); | ||
1092 | it('Allows selection of Stratis', function(done) { | 1106 | it('Allows selection of Stratis', function(done) { |
1093 | var params = { | 1107 | var params = { |
1094 | selectText: "STRAT - Stratis", | 1108 | selectText: "STRAT - Stratis", |