From 5b0b1a5c9aa61d3d5161ee1a7054bf49159dac70 Mon Sep 17 00:00:00 2001 From: Scotty0448 Date: Tue, 26 Jan 2021 16:12:25 -0700 Subject: Add Ritocoin (RITO) --- src/js/bitcoinjs-extensions.js | 11 +++++++++++ src/js/index.js | 7 +++++++ tests/spec/tests.js | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index b049d78..5d889ab 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -1219,6 +1219,17 @@ libs.bitcoin.networks.revolutionvr = { wif: 0xc6, }; +libs.bitcoin.networks.ritocoin = { + messagePrefix: '\x15Rito Signed Message:\n', + bip32: { + public: 0x0488B21E, + private: 0x0488ADE4, + }, + pubKeyHash: 0x19, + scriptHash: 0x69, + wif: 0x80, +}; + libs.bitcoin.networks.rsk = { messagePrefix: '\x18RSK Signed Message:\n', bip32: { diff --git a/src/js/index.js b/src/js/index.js index fd8c16b..f7835fa 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -3218,6 +3218,13 @@ setHdCoin(4); }, }, + { + name: "RITO - Ritocoin", + onSelect: function() { + network = libs.bitcoin.networks.ritocoin; + setHdCoin(19169); + }, + }, { name: "RVR - RevolutionVR", onSelect: function() { diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 0332f96..9c3eb6a 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -1635,6 +1635,16 @@ it('Allows selection of RevolutionVR', function(done) { }; testNetwork(done, params); }); +it('Allows selection of Ritocoin', function(done) { + var params = { + selectText: "RITO - Ritocoin", + phrase: "abandon abandon ability", + firstAddress: "BMbHdwDiuaZh4ATp8Xapf4srv3swzAGgkf", + firstPubKey: "036f5f55dc37fa97294a2a5ae4d92735d4392d4405cbbebebf2d70d5d6781be622", + firstPrivKey: "L1CyVD5ADNgSUxZn6kRpJe9e17FDuAZzRGwNjvDBnEqRWjo4SEAX", + }; + testNetwork(done, params); +}); it('Allows selection of Rubycoin', function(done) { var params = { selectText: "RBY - Rubycoin", -- cgit v1.2.3 From f7125606bf1ac43c91a395707b07c30f887a60cd Mon Sep 17 00:00:00 2001 From: Scotty0448 Date: Tue, 26 Jan 2021 18:00:02 -0700 Subject: Update wif --- src/js/bitcoinjs-extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 5d889ab..84363f6 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -1227,7 +1227,7 @@ libs.bitcoin.networks.ritocoin = { }, pubKeyHash: 0x19, scriptHash: 0x69, - wif: 0x80, + wif: 0x8b, }; libs.bitcoin.networks.rsk = { -- cgit v1.2.3