From: harzo Date: Wed, 5 Sep 2018 13:03:40 +0000 (+0200) Subject: Add ExchangeCoin X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=a44c45e3c06a462e2de609317ba371894ed0ccee;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git Add ExchangeCoin --- 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 = { scriptHash: 0x35, wif: 0x6a, }; + +bitcoinjs.bitcoin.networks.exchangecoin = { + messagePrefix: 'ExchangeCoin Signed Message:\n', + bip32: { + public: 0x0488B21E, + private: 0x0488ADE4, + }, + pubKeyHash: 0x21B9, + scriptHash: 0x34AF, + wif: 0x80, +}; 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 @@ -1935,6 +1935,13 @@ setHdCoin(190); }, }, + { + name: "EXCC - ExchangeCoin", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.exchangecoin; + setHdCoin(0); + }, + }, { name: "EXP - Expanse", segwitAvailable: false, 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) { }; testNetwork(done, params); }); +it('Allows selection of ExchangeCoin', function(done) { + var params = { + selectText: "EXCC - ExchangeCoin", + firstAddress: "22txYKpFN5fwGwdSs2UBf7ywewbLM92YqK7E", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase