aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryurykk <yurykk@gmail.com>2019-06-27 11:56:47 +0300
committeryurykk <yurykk@gmail.com>2019-06-27 11:56:47 +0300
commit82e3938afe3e76000b58e6a49e204ffff10fbd5a (patch)
tree648ccef60bfa96c3196c4726470e8c8bd0ef3146 /src
parent06cd4e7608f88a5b43d5e783fd1dc51650e190a1 (diff)
downloadBIP39-82e3938afe3e76000b58e6a49e204ffff10fbd5a.tar.gz
BIP39-82e3938afe3e76000b58e6a49e204ffff10fbd5a.tar.zst
BIP39-82e3938afe3e76000b58e6a49e204ffff10fbd5a.zip
Adding TWINS coin support
Diffstat (limited to 'src')
-rw-r--r--src/js/bitcoinjs-extensions.js22
-rw-r--r--src/js/index.js16
2 files changed, 37 insertions, 1 deletions
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 = {
1253 wif: 0xc1, 1253 wif: 0xc1,
1254}; 1254};
1255 1255
1256bitcoinjs.bitcoin.networks.twins = {
1257 messagePrefix: 'unused',
1258 bip32: {
1259 public: 0x022d2533,
1260 private: 0x0221312b
1261 },
1262 pubKeyHash: 0x49,
1263 scriptHash: 0x53,
1264 wif: 0x42
1265};
1266
1267bitcoinjs.bitcoin.networks.twinstestnet = {
1268 messagePrefix: 'unused',
1269 bip32: {
1270 public: 0x3a8061a0,
1271 private: 0x3a805837
1272 },
1273 pubKeyHash: 0x4c,
1274 scriptHash: 0x89,
1275 wif: 0xED
1276};
1277
1256bitcoinjs.bitcoin.networks.ultimatesecurecash = { 1278bitcoinjs.bitcoin.networks.ultimatesecurecash = {
1257 messagePrefix: '\x18UltimateSecureCash Signed Message:\n', 1279 messagePrefix: '\x18UltimateSecureCash Signed Message:\n',
1258 bip32: { 1280 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 @@
990 pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); 990 pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer());
991 privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); 991 privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32));
992 } 992 }
993 993
994 addAddressToList(indexText, address, pubkey, privkey); 994 addAddressToList(indexText, address, pubkey, privkey);
995 if (isLast) { 995 if (isLast) {
996 hidePending(); 996 hidePending();
@@ -2637,6 +2637,20 @@
2637 }, 2637 },
2638 }, 2638 },
2639 { 2639 {
2640 name: "TWINS - TWINS",
2641 onSelect: function() {
2642 network = bitcoinjs.bitcoin.networks.twins;
2643 setHdCoin(970);
2644 },
2645 },
2646 {
2647 name: "TWINS - TWINS Testnet",
2648 onSelect: function() {
2649 network = bitcoinjs.bitcoin.networks.twinstestnet;
2650 setHdCoin(1);
2651 },
2652 },
2653 {
2640 name: "USC - Ultimatesecurecash", 2654 name: "USC - Ultimatesecurecash",
2641 onSelect: function() { 2655 onSelect: function() {
2642 network = bitcoinjs.bitcoin.networks.ultimatesecurecash; 2656 network = bitcoinjs.bitcoin.networks.ultimatesecurecash;