diff options
author | iancoleman <1281387+iancoleman@users.noreply.github.com> | 2019-07-04 11:40:32 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-04 11:40:32 +1000 |
commit | 6c733477dbaeb521b8b9d25004ee01b74af1529f (patch) | |
tree | e3832d7391a70e3ba33d1c48cf3040974ad4c164 /src | |
parent | a36c509c91ea9319f000819889830d3cafe23f02 (diff) | |
parent | 7d4e4cbe2677976e12e9b35a00f032eb038848e2 (diff) | |
download | BIP39-6c733477dbaeb521b8b9d25004ee01b74af1529f.tar.gz BIP39-6c733477dbaeb521b8b9d25004ee01b74af1529f.tar.zst BIP39-6c733477dbaeb521b8b9d25004ee01b74af1529f.zip |
Merge pull request #339 from NewCapital/master
Adding support for TWINS and FIX coins
Diffstat (limited to 'src')
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 44 | ||||
-rw-r--r-- | src/js/index.js | 30 |
2 files changed, 73 insertions, 1 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index f7e708b..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: { |
@@ -1253,6 +1275,28 @@ bitcoinjs.bitcoin.networks.toa = { | |||
1253 | wif: 0xc1, | 1275 | wif: 0xc1, |
1254 | }; | 1276 | }; |
1255 | 1277 | ||
1278 | bitcoinjs.bitcoin.networks.twins = { | ||
1279 | messagePrefix: 'unused', | ||
1280 | bip32: { | ||
1281 | public: 0x022d2533, | ||
1282 | private: 0x0221312b | ||
1283 | }, | ||
1284 | pubKeyHash: 0x49, | ||
1285 | scriptHash: 0x53, | ||
1286 | wif: 0x42 | ||
1287 | }; | ||
1288 | |||
1289 | bitcoinjs.bitcoin.networks.twinstestnet = { | ||
1290 | messagePrefix: 'unused', | ||
1291 | bip32: { | ||
1292 | public: 0x3a8061a0, | ||
1293 | private: 0x3a805837 | ||
1294 | }, | ||
1295 | pubKeyHash: 0x4c, | ||
1296 | scriptHash: 0x89, | ||
1297 | wif: 0xED | ||
1298 | }; | ||
1299 | |||
1256 | bitcoinjs.bitcoin.networks.ultimatesecurecash = { | 1300 | bitcoinjs.bitcoin.networks.ultimatesecurecash = { |
1257 | messagePrefix: '\x18UltimateSecureCash Signed Message:\n', | 1301 | messagePrefix: '\x18UltimateSecureCash Signed Message:\n', |
1258 | bip32: { | 1302 | bip32: { |
diff --git a/src/js/index.js b/src/js/index.js index 599e8d1..8e6b106 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -1003,7 +1003,7 @@ | |||
1003 | pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); | 1003 | pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); |
1004 | privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); | 1004 | privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); |
1005 | } | 1005 | } |
1006 | 1006 | ||
1007 | addAddressToList(indexText, address, pubkey, privkey); | 1007 | addAddressToList(indexText, address, pubkey, privkey); |
1008 | if (isLast) { | 1008 | if (isLast) { |
1009 | hidePending(); | 1009 | hidePending(); |
@@ -2088,6 +2088,20 @@ | |||
2088 | }, | 2088 | }, |
2089 | }, | 2089 | }, |
2090 | { | 2090 | { |
2091 | name: "FIX - FIX", | ||
2092 | onSelect: function() { | ||
2093 | network = bitcoinjs.bitcoin.networks.fix; | ||
2094 | setHdCoin(336); | ||
2095 | }, | ||
2096 | }, | ||
2097 | { | ||
2098 | name: "FIX - FIX Testnet", | ||
2099 | onSelect: function() { | ||
2100 | network = bitcoinjs.bitcoin.networks.fixtestnet; | ||
2101 | setHdCoin(1); | ||
2102 | }, | ||
2103 | }, | ||
2104 | { | ||
2091 | name: "FJC - Fujicoin", | 2105 | name: "FJC - Fujicoin", |
2092 | onSelect: function() { | 2106 | onSelect: function() { |
2093 | network = bitcoinjs.bitcoin.networks.fujicoin; | 2107 | network = bitcoinjs.bitcoin.networks.fujicoin; |
@@ -2650,6 +2664,20 @@ | |||
2650 | }, | 2664 | }, |
2651 | }, | 2665 | }, |
2652 | { | 2666 | { |
2667 | name: "TWINS - TWINS", | ||
2668 | onSelect: function() { | ||
2669 | network = bitcoinjs.bitcoin.networks.twins; | ||
2670 | setHdCoin(970); | ||
2671 | }, | ||
2672 | }, | ||
2673 | { | ||
2674 | name: "TWINS - TWINS Testnet", | ||
2675 | onSelect: function() { | ||
2676 | network = bitcoinjs.bitcoin.networks.twinstestnet; | ||
2677 | setHdCoin(1); | ||
2678 | }, | ||
2679 | }, | ||
2680 | { | ||
2653 | name: "USC - Ultimatesecurecash", | 2681 | name: "USC - Ultimatesecurecash", |
2654 | onSelect: function() { | 2682 | onSelect: function() { |
2655 | network = bitcoinjs.bitcoin.networks.ultimatesecurecash; | 2683 | network = bitcoinjs.bitcoin.networks.ultimatesecurecash; |