From: iancoleman <1281387+iancoleman@users.noreply.github.com> Date: Mon, 13 Aug 2018 23:02:29 +0000 (+1000) Subject: Merge pull request #238 from stashpayio/stash X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=c1a5e79c5fdb556f2cedfeba583ccafb5a997373;hp=e47cd1970f7f40ede6a97fb284df1701a3f252e5 Merge pull request #238 from stashpayio/stash Stash --- diff --git a/changelog.md b/changelog.md index 670e93e..61d474c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 0.3.8s + +* Add Stash network + # 0.3.8 * Add p2wpkh for litecoin diff --git a/src/index.html b/src/index.html index 917813a..203e6e2 100644 --- a/src/index.html +++ b/src/index.html @@ -15,7 +15,7 @@

Mnemonic Code Converter

-

v0.3.8

+

v0.3.8s


diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 8744142..06ad221 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -1045,6 +1045,28 @@ bitcoinjs.bitcoin.networks.solarcoin = { wif: 0x92, }; +bitcoinjs.bitcoin.networks.stash = { + messagePrefix: '\x18Stash Signed Message:\n', + bip32: { + public: 0x0488b21e, + private: 0x0488ade4 + }, + pubKeyHash: 0x4c, + scriptHash: 0x10, + wif: 0xcc +}; + +bitcoinjs.bitcoin.networks.stashtn = { + messagePrefix: '\x18Stash Test Signed Message:\n', + bip32: { + public: 0x043587cf, + private: 0x04358394 + }, + pubKeyHash: 0x8c, + scriptHash: 0x13, + wif: 0xef +}; + bitcoinjs.bitcoin.networks.stratis = { messagePrefix: '\x18Stratis Signed Message:\n', bip32: { diff --git a/src/js/index.js b/src/js/index.js index 589ba20..16c5cef 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -2356,6 +2356,20 @@ setHdCoin(59); }, }, + { + name: "STASH - Stash", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.stash; + setHdCoin(0xC0C0); + }, + }, + { + name: "STASH - Stash Testnet", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.stashtn; + setHdCoin(0xCAFE); + }, + }, { name: "STRAT - Stratis", onSelect: function() { diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 6208bfc..0570514 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -1089,6 +1089,20 @@ it('Allows selection of Solarcoin', function(done) { }; testNetwork(done, params); }); +it('Allows selection of stash', function(done) { + var params = { + selectText: "STASH - Stash", + firstAddress: "XxwAsWB7REDKmAvHA85SbEZQQtpxeUDxS3", + }; + testNetwork(done, params); +}); +it('Allows selection of stash testnet', function(done) { + var params = { + selectText: "STASH - Stash Testnet", + firstAddress: "YdbhtMuGsPSkE6bPdNTHoFSszQKmK4S5LT", + }; + testNetwork(done, params); +}); it('Allows selection of Stratis', function(done) { var params = { selectText: "STRAT - Stratis",