diff options
author | yurykk <yurykk@gmail.com> | 2019-06-27 12:15:11 +0300 |
---|---|---|
committer | yurykk <yurykk@gmail.com> | 2019-06-27 12:15:11 +0300 |
commit | 7d4e4cbe2677976e12e9b35a00f032eb038848e2 (patch) | |
tree | 19112f89f2c9a80201535eb3384a494d6cd0b844 | |
parent | 82e3938afe3e76000b58e6a49e204ffff10fbd5a (diff) | |
download | BIP39-7d4e4cbe2677976e12e9b35a00f032eb038848e2.tar.gz BIP39-7d4e4cbe2677976e12e9b35a00f032eb038848e2.tar.zst BIP39-7d4e4cbe2677976e12e9b35a00f032eb038848e2.zip |
Adding FIX coin support
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 22 | ||||
-rw-r--r-- | src/js/index.js | 14 | ||||
-rw-r--r-- | tests/spec/tests.js | 14 |
3 files changed, 50 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 4e05482..bd3e500 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -327,6 +327,28 @@ bitcoinjs.bitcoin.networks.pivxtestnet = { | |||
327 | wif: 0xef | 327 | wif: 0xef |
328 | }; | 328 | }; |
329 | 329 | ||
330 | bitcoinjs.bitcoin.networks.fix = { | ||
331 | messagePrefix: 'unused', | ||
332 | bip32: { | ||
333 | public: 0x022d2533, | ||
334 | private: 0x0221312b | ||
335 | }, | ||
336 | pubKeyHash: 0x23, | ||
337 | scriptHash: 0x5F, | ||
338 | wif: 0x3C | ||
339 | }; | ||
340 | |||
341 | bitcoinjs.bitcoin.networks.fixtestnet = { | ||
342 | messagePrefix: 'unused', | ||
343 | bip32: { | ||
344 | public: 0x3a8061a0, | ||
345 | private: 0x3a805837 | ||
346 | }, | ||
347 | pubKeyHash: 0x4c, | ||
348 | scriptHash: 0x89, | ||
349 | wif: 0xED | ||
350 | }; | ||
351 | |||
330 | bitcoinjs.bitcoin.networks.fujicoin = { | 352 | bitcoinjs.bitcoin.networks.fujicoin = { |
331 | messagePrefix: '\x19FujiCoin Signed Message:\n', | 353 | messagePrefix: '\x19FujiCoin Signed Message:\n', |
332 | bip32: { | 354 | bip32: { |
diff --git a/src/js/index.js b/src/js/index.js index 8242da4..b784f8c 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -2075,6 +2075,20 @@ | |||
2075 | }, | 2075 | }, |
2076 | }, | 2076 | }, |
2077 | { | 2077 | { |
2078 | name: "FIX - FIX", | ||
2079 | onSelect: function() { | ||
2080 | network = bitcoinjs.bitcoin.networks.fix; | ||
2081 | setHdCoin(336); | ||
2082 | }, | ||
2083 | }, | ||
2084 | { | ||
2085 | name: "FIX - FIX Testnet", | ||
2086 | onSelect: function() { | ||
2087 | network = bitcoinjs.bitcoin.networks.fixtestnet; | ||
2088 | setHdCoin(1); | ||
2089 | }, | ||
2090 | }, | ||
2091 | { | ||
2078 | name: "FJC - Fujicoin", | 2092 | name: "FJC - Fujicoin", |
2079 | onSelect: function() { | 2093 | onSelect: function() { |
2080 | network = bitcoinjs.bitcoin.networks.fujicoin; | 2094 | network = bitcoinjs.bitcoin.networks.fujicoin; |
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index c92689a..6e56ce0 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -640,6 +640,20 @@ it('Allows selection of maza', function(done) { | |||
640 | }; | 640 | }; |
641 | testNetwork(done, params); | 641 | testNetwork(done, params); |
642 | }); | 642 | }); |
643 | it('Allows selection of FIX', function(done) { | ||
644 | var params = { | ||
645 | selectText: "FIX - FIX", | ||
646 | firstAddress: "FS5MEU8fs5dUvsaSCSusV8RQtC8j2h3JEh", | ||
647 | }; | ||
648 | testNetwork(done, params); | ||
649 | }); | ||
650 | it('Allows selection of FIX testnet', function(done) { | ||
651 | var params = { | ||
652 | selectText: "FIX - FIX Testnet", | ||
653 | firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa", | ||
654 | }; | ||
655 | testNetwork(done, params); | ||
656 | }); | ||
643 | it('Allows selection of fujicoin', function(done) { | 657 | it('Allows selection of fujicoin', function(done) { |
644 | var params = { | 658 | var params = { |
645 | selectText: "FJC - Fujicoin", | 659 | selectText: "FJC - Fujicoin", |