From: iancoleman <1281387+iancoleman@users.noreply.github.com> Date: Mon, 24 Aug 2020 23:27:54 +0000 (+1000) Subject: Merge pull request #433 from scribenetwork/master X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=863eee8ed754e4aebd5059b712deb4fca8709c27;hp=f32b24e3807426d235fa5d808543001b9ee3ba39 Merge pull request #433 from scribenetwork/master Add Scribe support --- diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 7cd480c..8f50f11 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -139,6 +139,17 @@ libs.bitcoin.networks.axe = { wif: 0xcc }; +libs.bitcoin.networks.scribe = { + messagePrefix: 'unused', + bip32: { + public: 0x0488B21E, + private: 0x0488ADE4 + }, + pubKeyHash: 0x3c, + scriptHash: 0x7d, + wif: 0x6e +}; + libs.bitcoin.networks.slimcoin = { messagePrefix: 'unused', bip32: { diff --git a/src/js/index.js b/src/js/index.js index 3dde602..2c2e99a 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -3088,6 +3088,13 @@ setHdCoin(19165); }, }, + { + name: "SCRIBE - Scribe", + onSelect: function() { + network = libs.bitcoin.networks.scribe; + setHdCoin(545); + }, + }, { name: "SLS - Salus", onSelect: function() { diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 0e7edb9..14cdb8e 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -2265,6 +2265,16 @@ it('Allows selection of CranePay', function(done) { }; testNetwork(done, params); }); +it('Allows selection of Scribe', function(done) { + var params = { + selectText: "SCRIBE - Scribe", + phrase: "abandon abandon ability", + firstAddress: "RYAnPeBLD8veZ9Tw8xugeTC2f9PeZonLHM", + firstPubKey: "02c912bc4759c8a209475502fb5352ff5be8a8f13eb72f1732ee25125cd53edc1e", + firstPrivKey: "HLZWvNCEUv4ghygjH9A2EYCa9HNRcxe5CS42kzUTmoxJYp3z96QE", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase it('Sets the bip39 seed from the prhase', function(done) {