From 82e3938afe3e76000b58e6a49e204ffff10fbd5a Mon Sep 17 00:00:00 2001 From: yurykk Date: Thu, 27 Jun 2019 11:56:47 +0300 Subject: Adding TWINS coin support --- src/js/bitcoinjs-extensions.js | 22 ++++++++++++++++++++++ src/js/index.js | 16 +++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index f7e708b..4e05482 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -1253,6 +1253,28 @@ bitcoinjs.bitcoin.networks.toa = { wif: 0xc1, }; +bitcoinjs.bitcoin.networks.twins = { + messagePrefix: 'unused', + bip32: { + public: 0x022d2533, + private: 0x0221312b + }, + pubKeyHash: 0x49, + scriptHash: 0x53, + wif: 0x42 +}; + +bitcoinjs.bitcoin.networks.twinstestnet = { + messagePrefix: 'unused', + bip32: { + public: 0x3a8061a0, + private: 0x3a805837 + }, + pubKeyHash: 0x4c, + scriptHash: 0x89, + wif: 0xED +}; + bitcoinjs.bitcoin.networks.ultimatesecurecash = { messagePrefix: '\x18UltimateSecureCash Signed Message:\n', bip32: { diff --git a/src/js/index.js b/src/js/index.js index 56f42d4..8242da4 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -990,7 +990,7 @@ pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); } - + addAddressToList(indexText, address, pubkey, privkey); if (isLast) { hidePending(); @@ -2636,6 +2636,20 @@ setHdCoin(159); }, }, + { + name: "TWINS - TWINS", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.twins; + setHdCoin(970); + }, + }, + { + name: "TWINS - TWINS Testnet", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.twinstestnet; + setHdCoin(1); + }, + }, { name: "USC - Ultimatesecurecash", onSelect: function() { -- cgit v1.2.3