From 115eb450839f1ecc86ffe03768a59637986a6c83 Mon Sep 17 00:00:00 2001 From: m0rpher Date: Fri, 8 May 2020 22:56:37 +0200 Subject: adding CRP support --- src/js/bitcoinjs-extensions.js | 11 +++++++++++ src/js/index.js | 8 ++++++++ src/js/segwit-parameters.js | 30 ++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) (limited to 'src/js') diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 2792e13..37678c2 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js @@ -581,6 +581,17 @@ libs.bitcoin.networks.cannacoin = { wif: 0x9c, }; +libs.bitcoin.networks.cranepay = { + messagePrefix: '\x18Bitcoin Signed Message:\n', + bip32: { + public: 0x0488b21e, + private: 0x0488ade4 + }, + pubKeyHash: 28, + scriptHash: 10, + wif: 123, +}; + libs.bitcoin.networks.cryptoescudo = { messagePrefix: '\x18Cryptoescudo Signed Message:\n', bip32: { diff --git a/src/js/index.js b/src/js/index.js index f00d90b..009a320 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -2285,6 +2285,14 @@ setHdCoin(186); }, }, + { + name: "CRP - CranePay", + onSelect: function() { + network = libs.bitcoin.networks.cranepay; + setHdCoin(2304); + }, + }, + { name: "CRW - Crown (Legacy)", onSelect: function() { diff --git a/src/js/segwit-parameters.js b/src/js/segwit-parameters.js index ea6f86e..997a0f8 100644 --- a/src/js/segwit-parameters.js +++ b/src/js/segwit-parameters.js @@ -163,6 +163,36 @@ libs.bitcoin.networks.regtest.p2wshInP2sh = { scriptHash: 0xc4, wif: 0xef }; + +libs.bitcoin.networks.cranepay.p2wpkhInP2sh = { + baseNetwork: "cranepay", + messagePrefix: '\x18Bitcoin Signed Message:\n', + bech32: 'cp', + bip32: { + public: 0x049d7cb2, + private: 0x049d7878 + }, + pubKeyHash: 28, + scriptHash: 10, + wif: 123 +}; + +// bech32 +libs.bitcoin.networks.cranepay.p2wpkh = { + baseNetwork: "cranepay", + messagePrefix: '\x18Bitcoin Signed Message:\n', + bech32: 'cp', + bip32: { + public: 0x04b24746, + private: 0x04b2430c + }, + pubKeyHash: 28, + scriptHash: 10, + wif: 123 +}; + + + libs.bitcoin.networks.litecoin.p2wpkh = { baseNetwork: "litecoin", -- cgit v1.2.3