aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/js/bitcoinjs-extensions.js12
-rw-r--r--src/js/index.js7
-rw-r--r--src/js/segwit-parameters.js26
-rw-r--r--tests/spec/tests.js7
4 files changed, 52 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index 3d0c6bd..b37f58f 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -1616,6 +1616,18 @@ bitcoinjs.bitcoin.networks.deeponion = {
1616 wif: 0x9F, 1616 wif: 0x9F,
1617}; 1617};
1618 1618
1619
1620bitcoinjs.bitcoin.networks.cpuchain = {
1621 messagePrefix: 'x18CPUchain Signed Message:\n',
1622 bip32: {
1623 public: 0x0488B21E,
1624 private: 0x0488ADE4,
1625 },
1626 pubKeyHash: 0x1C,
1627 scriptHash: 0x1E,
1628 wif: 0x80,
1629};
1630
1619bitcoinjs.bitcoin.networks.wagerr = { 1631bitcoinjs.bitcoin.networks.wagerr = {
1620 messagePrefix: 'unused', 1632 messagePrefix: 'unused',
1621 bip32: { 1633 bip32: {
diff --git a/src/js/index.js b/src/js/index.js
index 544e67d..3afa598 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1903,6 +1903,13 @@
1903 }, 1903 },
1904 }, 1904 },
1905 { 1905 {
1906 name: "CPU - CPUchain",
1907 onSelect: function() {
1908 network = bitcoinjs.bitcoin.networks.cpuchain;
1909 setHdCoin(363);
1910 },
1911 },
1912 {
1906 name: "CRAVE - Crave", 1913 name: "CRAVE - Crave",
1907 onSelect: function() { 1914 onSelect: function() {
1908 network = bitcoinjs.bitcoin.networks.crave; 1915 network = bitcoinjs.bitcoin.networks.crave;
diff --git a/src/js/segwit-parameters.js b/src/js/segwit-parameters.js
index b2c72c2..aab7df0 100644
--- a/src/js/segwit-parameters.js
+++ b/src/js/segwit-parameters.js
@@ -236,4 +236,30 @@ bitcoinjs.bitcoin.networks.nix.p2wpkhInP2sh = {
236 scriptHash: 0x35, 236 scriptHash: 0x35,
237 wif: 0x80, 237 wif: 0x80,
238}; 238};
239
240bitcoinjs.bitcoin.networks.cpuchain.p2wpkh = {
241 baseNetwork: "cpuchain",
242 messagePrefix: '\x1DCPUchain Signed Message:\n',
243 bech32: 'cpu',
244 bip32: {
245 public: 0x04b24746,
246 private: 0x04b2430c
247 },
248 pubKeyHash: 0x1c,
249 scriptHash: 0x1e,
250 wif: 0x80,
251};
252
253bitcoinjs.bitcoin.networks.cpuchain.p2wpkhInP2sh = {
254 baseNetwork: "cpuchain",
255 messagePrefix: '\x1DCPUchain Signed Message:\n',
256 bech32: 'cpu',
257 bip32: {
258 public: 0x049d7cb2,
259 private: 0x049d7878
260 },
261 pubKeyHash: 0x1c,
262 scriptHash: 0x1e,
263 wif: 0x80,
264};
239})(); 265})();
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 5e65714..91a9bec 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -829,6 +829,13 @@ it('Allows selection of Compcoin', function(done) {
829 }; 829 };
830 testNetwork(done, params); 830 testNetwork(done, params);
831}); 831});
832it('Allows selection of CPUchain', function(done) {
833 var params = {
834 selectText: "CPU - CPUchain",
835 firstAddress: "CWWkTPkNRdpTDSfPw7gxUt9cEaC5PSsP3Y",
836 };
837 testNetwork(done, params);
838});
832it('Allows selection of Crave', function(done) { 839it('Allows selection of Crave', function(done) {
833 var params = { 840 var params = {
834 selectText: "CRAVE - Crave", 841 selectText: "CRAVE - Crave",