aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriancoleman <1281387+iancoleman@users.noreply.github.com>2018-09-06 12:08:44 +1000
committerGitHub <noreply@github.com>2018-09-06 12:08:44 +1000
commit376ea8c46d7e9299ac874277ed38d1b29bd3cfd9 (patch)
treed2f0135f729a8d900e7f342f0b566964e8d537af
parent341700110bd0bc101947ff94b466b50be84c8e74 (diff)
parenta44c45e3c06a462e2de609317ba371894ed0ccee (diff)
downloadBIP39-376ea8c46d7e9299ac874277ed38d1b29bd3cfd9.tar.gz
BIP39-376ea8c46d7e9299ac874277ed38d1b29bd3cfd9.tar.zst
BIP39-376ea8c46d7e9299ac874277ed38d1b29bd3cfd9.zip
Merge pull request #249 from harzo/task/add-exchangecoin
Add ExchangeCoin
-rw-r--r--src/js/bitcoinjs-extensions.js11
-rw-r--r--src/js/index.js7
-rw-r--r--tests/spec/tests.js7
3 files changed, 25 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index d3f9847..9b0366a 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -1331,3 +1331,14 @@ bitcoinjs.bitcoin.networks.energi = {
1331 scriptHash: 0x35, 1331 scriptHash: 0x35,
1332 wif: 0x6a, 1332 wif: 0x6a,
1333}; 1333};
1334
1335bitcoinjs.bitcoin.networks.exchangecoin = {
1336 messagePrefix: 'ExchangeCoin Signed Message:\n',
1337 bip32: {
1338 public: 0x0488B21E,
1339 private: 0x0488ADE4,
1340 },
1341 pubKeyHash: 0x21B9,
1342 scriptHash: 0x34AF,
1343 wif: 0x80,
1344};
diff --git a/src/js/index.js b/src/js/index.js
index 2a3e86c..e3d0b4b 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1936,6 +1936,13 @@
1936 }, 1936 },
1937 }, 1937 },
1938 { 1938 {
1939 name: "EXCC - ExchangeCoin",
1940 onSelect: function() {
1941 network = bitcoinjs.bitcoin.networks.exchangecoin;
1942 setHdCoin(0);
1943 },
1944 },
1945 {
1939 name: "EXP - Expanse", 1946 name: "EXP - Expanse",
1940 segwitAvailable: false, 1947 segwitAvailable: false,
1941 onSelect: function() { 1948 onSelect: function() {
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 4d92471..b5fb4a4 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -1290,6 +1290,13 @@ it('Allows selection of HUSH', function(done) {
1290 }; 1290 };
1291 testNetwork(done, params); 1291 testNetwork(done, params);
1292}); 1292});
1293it('Allows selection of ExchangeCoin', function(done) {
1294 var params = {
1295 selectText: "EXCC - ExchangeCoin",
1296 firstAddress: "22txYKpFN5fwGwdSs2UBf7ywewbLM92YqK7E",
1297 };
1298 testNetwork(done, params);
1299});
1293 1300
1294 1301
1295// BIP39 seed is set from phrase 1302// BIP39 seed is set from phrase