From b64fb35301060c00acaf25beec37971d1877d0cd Mon Sep 17 00:00:00 2001 From: bguiz Date: Tue, 3 Mar 2020 14:55:53 +0800 Subject: fix: define own libs.bitcoin.networks.rsk --- src/js/bitcoinjs-extensions.js | 25 +++++++++++++++++++++++++ src/js/index.js | 8 ++++---- 2 files changed, 29 insertions(+), 4 deletions(-) (limited to 'src/js') diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 17475b1..85c39d1 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -1175,6 +1175,31 @@ libs.bitcoin.networks.revolutionvr = { wif: 0xc6, }; +libs.bitcoin.networks.rsk = { + messagePrefix: '\x18RSK Signed Message:\n', + bip32: { + public: 0x0488b21e, + private: 0x0488ade4 + }, + // TODO defaulting to Bitcoin value, check this + pubKeyHash: 0x00, + // TODO defaulting to Bitcoin value, check this + scriptHash: 0x05, + // TODO defaulting to Bitcoin value, check this + wif: 0x80 +}; + +libs.bitcoin.networks.rsktestnet = { + messagePrefix: '\x18RSK Testnet Signed Message:\n', + bip32: { + public: 0x043587cf, + private: 0x04358394 + }, + pubKeyHash: 0x6f, + scriptHash: 0xc4, + wif: 0xef +}; + libs.bitcoin.networks.rubycoin = { messagePrefix: '\x18Rubycoin Signed Message:\n', bip32: { diff --git a/src/js/index.js b/src/js/index.js index c2d34a7..ad2b859 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -2973,16 +2973,16 @@ }, }, { - name: "RBTC - RSK", + name: "R-BTC - RSK", onSelect: function() { - network = libs.bitcoin.networks.rubycoin; + network = libs.bitcoin.networks.rsk; setHdCoin(137); }, }, { - name: "tRBTC - RSK Testnet", + name: "tR-BTC - RSK Testnet", onSelect: function() { - network = libs.bitcoin.networks.rubycoin; + network = libs.bitcoin.networks.rsktestnet; setHdCoin(37310); }, }, -- cgit v1.2.3