diff options
author | iancoleman <1281387+iancoleman@users.noreply.github.com> | 2018-12-05 08:37:36 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-05 08:37:36 +1100 |
commit | 7f65b685b384c48df1b4ea11e7331daf15ec680d (patch) | |
tree | 3f835b97ec21398a32c99f81d8b4ad27cd23e82d | |
parent | 10cf809e7cb3f61927d6d1313072a0323d62d6db (diff) | |
parent | acf4c9b588c6abcc275b4e46df54248a2c913366 (diff) | |
download | BIP39-7f65b685b384c48df1b4ea11e7331daf15ec680d.tar.gz BIP39-7f65b685b384c48df1b4ea11e7331daf15ec680d.tar.zst BIP39-7f65b685b384c48df1b4ea11e7331daf15ec680d.zip |
Merge pull request #281 from Fair-Exchange/master
Added support for Safecoin (SAFE)
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 11 | ||||
-rw-r--r-- | src/js/index.js | 7 | ||||
-rw-r--r-- | tests/spec/tests.js | 7 |
3 files changed, 25 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index bd96e05..5ba584e 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -1067,6 +1067,17 @@ bitcoinjs.bitcoin.networks.rubycoin = { | |||
1067 | wif: 0xbc, | 1067 | wif: 0xbc, |
1068 | }; | 1068 | }; |
1069 | 1069 | ||
1070 | bitcoinjs.bitcoin.networks.safecoin = { | ||
1071 | messagePrefix: '\x18Safecoin Signed Message:\n', | ||
1072 | bip32: { | ||
1073 | public: 0x0488b21e, | ||
1074 | private: 0x0488ade4, | ||
1075 | }, | ||
1076 | pubKeyHash: 0x3d, | ||
1077 | scriptHash: 0x56, | ||
1078 | wif: 0xbd, | ||
1079 | }; | ||
1080 | |||
1070 | bitcoinjs.bitcoin.networks.salus = { | 1081 | bitcoinjs.bitcoin.networks.salus = { |
1071 | messagePrefix: '\x18Salus Signed Message:\n', | 1082 | messagePrefix: '\x18Salus Signed Message:\n', |
1072 | bip32: { | 1083 | bip32: { |
diff --git a/src/js/index.js b/src/js/index.js index 0dd23f3..8322115 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -2392,6 +2392,13 @@ | |||
2392 | }, | 2392 | }, |
2393 | }, | 2393 | }, |
2394 | { | 2394 | { |
2395 | name: "SAFE - Safecoin", | ||
2396 | onSelect: function() { | ||
2397 | network = bitcoinjs.bitcoin.networks.safecoin; | ||
2398 | setHdCoin(19165); | ||
2399 | }, | ||
2400 | }, | ||
2401 | { | ||
2395 | name: "SLS - Salus", | 2402 | name: "SLS - Salus", |
2396 | onSelect: function() { | 2403 | onSelect: function() { |
2397 | network = bitcoinjs.bitcoin.networks.salus; | 2404 | network = bitcoinjs.bitcoin.networks.salus; |
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index cd3f381..0bb56f8 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -1355,6 +1355,13 @@ it('Allows selection of Phore', function(done) { | |||
1355 | }; | 1355 | }; |
1356 | testNetwork(done, params); | 1356 | testNetwork(done, params); |
1357 | }); | 1357 | }); |
1358 | it('Allows selection of Safecoin', function(done) { | ||
1359 | var params = { | ||
1360 | selectText: "SAFE - Safecoin", | ||
1361 | firstAddress: "RmV56kPW7jeCmDA8sukHwbR7RZSbg9NFNF", | ||
1362 | }; | ||
1363 | testNetwork(done, params); | ||
1364 | }); | ||
1358 | it('Allows selection of Blocknode', function(done) { | 1365 | it('Allows selection of Blocknode', function(done) { |
1359 | var params = { | 1366 | var params = { |
1360 | selectText: "BND - Blocknode", | 1367 | selectText: "BND - Blocknode", |