aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Coleman <ian@iancoleman.io>2020-11-29 21:59:20 +0000
committerIan Coleman <ian@iancoleman.io>2020-11-29 21:59:20 +0000
commit38626a2d1fd10cac1dd3da971ef5057a2a1dc06b (patch)
tree272beb76414234b2b0833928f5fe5942a5d41d7c
parent990ce0d0720026dea3ef77ddcc767dd45f9ec377 (diff)
downloadBIP39-38626a2d1fd10cac1dd3da971ef5057a2a1dc06b.tar.gz
BIP39-38626a2d1fd10cac1dd3da971ef5057a2a1dc06b.tar.zst
BIP39-38626a2d1fd10cac1dd3da971ef5057a2a1dc06b.zip
Add rebranded labelling to Zcoin/Firo
-rw-r--r--src/js/bitcoinjs-extensions.js11
-rw-r--r--src/js/index.js9
-rw-r--r--tests/spec/tests.js12
3 files changed, 30 insertions, 2 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index 37cc0c6..08a6be8 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -779,6 +779,17 @@ libs.bitcoin.networks.firo = {
779 wif: 0xd2, 779 wif: 0xd2,
780}; 780};
781 781
782libs.bitcoin.networks.zcoin = {
783 messagePrefix: '\x18Zcoin Signed Message:\n',
784 bip32: {
785 public: 0x0488B21E,
786 private: 0x0488ADE4,
787 },
788 pubKeyHash: 0x52,
789 scriptHash: 0x07,
790 wif: 0xd2,
791};
792
782libs.bitcoin.networks.firstcoin = { 793libs.bitcoin.networks.firstcoin = {
783 messagePrefix: '\x18FirstCoin Signed Message:\n', 794 messagePrefix: '\x18FirstCoin Signed Message:\n',
784 bip32: { 795 bip32: {
diff --git a/src/js/index.js b/src/js/index.js
index 0412b9b..e307e38 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -2685,7 +2685,7 @@
2685 }, 2685 },
2686 }, 2686 },
2687 { 2687 {
2688 name: "FIRO - Firo", 2688 name: "FIRO - Firo (Zcoin rebrand)",
2689 onSelect: function() { 2689 onSelect: function() {
2690 network = libs.bitcoin.networks.firo; 2690 network = libs.bitcoin.networks.firo;
2691 setHdCoin(136); 2691 setHdCoin(136);
@@ -3534,6 +3534,13 @@
3534 }, 3534 },
3535 }, 3535 },
3536 { 3536 {
3537 name: "XZC - Zcoin (rebranded to Firo)",
3538 onSelect: function() {
3539 network = libs.bitcoin.networks.zcoin;
3540 setHdCoin(136);
3541 },
3542 },
3543 {
3537 name: "ZCL - Zclassic", 3544 name: "ZCL - Zclassic",
3538 onSelect: function() { 3545 onSelect: function() {
3539 network = libs.bitcoin.networks.zclassic; 3546 network = libs.bitcoin.networks.zclassic;
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index c4f3188..f0b50e7 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -1216,7 +1216,17 @@ it('Allows selection of FIO', function(done) {
1216}); 1216});
1217it('Allows selection of Firo', function(done) { 1217it('Allows selection of Firo', function(done) {
1218 var params = { 1218 var params = {
1219 selectText: "FIRO - Firo", 1219 selectText: "FIRO - Firo (Zcoin rebrand)",
1220 phrase: "abandon abandon ability",
1221 firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
1222 firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
1223 firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
1224 };
1225 testNetwork(done, params);
1226});
1227it('Allows selection of Zcoin', function(done) {
1228 var params = {
1229 selectText: "XZC - Zcoin (rebranded to Firo)",
1220 phrase: "abandon abandon ability", 1230 phrase: "abandon abandon ability",
1221 firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq", 1231 firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
1222 firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db", 1232 firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",