aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/js/bitcoinjs-extensions.js22
-rw-r--r--src/js/index.js16
-rw-r--r--tests/spec/tests.js14
3 files changed, 51 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;
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 90cdc7a..c92689a 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -1242,6 +1242,20 @@ it('Allows selection of Toa', function(done) {
1242 }; 1242 };
1243 testNetwork(done, params); 1243 testNetwork(done, params);
1244}); 1244});
1245it('Allows selection of TWINS', function(done) {
1246 var params = {
1247 selectText: "TWINS - TWINS",
1248 firstAddress: "WPpJnfLLubNmF7HLNxg8d8zH5haxn4wri8",
1249 };
1250 testNetwork(done, params);
1251});
1252it('Allows selection of TWINS testnet', function(done) {
1253 var params = {
1254 selectText: "TWINS - TWINS Testnet",
1255 firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa",
1256 };
1257 testNetwork(done, params);
1258});
1245it('Allows selection of Ultimatesecurecash', function(done) { 1259it('Allows selection of Ultimatesecurecash', function(done) {
1246 var params = { 1260 var params = {
1247 selectText: "USC - Ultimatesecurecash", 1261 selectText: "USC - Ultimatesecurecash",