]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Add rebranded labelling to Zcoin/Firo
authorIan Coleman <ian@iancoleman.io>
Sun, 29 Nov 2020 21:59:20 +0000 (21:59 +0000)
committerIan Coleman <ian@iancoleman.io>
Sun, 29 Nov 2020 21:59:20 +0000 (21:59 +0000)
src/js/bitcoinjs-extensions.js
src/js/index.js
tests/spec/tests.js

index 37cc0c6fd6946ff5ea888be17ddc1aadee94f7f6..08a6be8c72c2ee6a4ec7a6c08f0a7f5bfbffc64a 100644 (file)
@@ -779,6 +779,17 @@ libs.bitcoin.networks.firo = {
   wif: 0xd2,
 };
 
+libs.bitcoin.networks.zcoin = {
+  messagePrefix: '\x18Zcoin Signed Message:\n',
+  bip32: {
+    public: 0x0488B21E,
+    private: 0x0488ADE4,
+  },
+  pubKeyHash: 0x52,
+  scriptHash: 0x07,
+  wif: 0xd2,
+};
+
 libs.bitcoin.networks.firstcoin = {
   messagePrefix: '\x18FirstCoin Signed Message:\n',
   bip32: {
index 0412b9b35c9adae5f0201d1d12c0bad0de61e5d5..e307e386e933b0c39f4129c423d2b68c9c8a60af 100644 (file)
             },
         },  
         {
-            name: "FIRO - Firo",
+            name: "FIRO - Firo (Zcoin rebrand)",
             onSelect: function() {
                 network = libs.bitcoin.networks.firo;
                 setHdCoin(136);
                 setHdCoin(155);
             },
         },
+        {
+            name: "XZC - Zcoin (rebranded to Firo)",
+            onSelect: function() {
+                network = libs.bitcoin.networks.zcoin;
+                setHdCoin(136);
+            },
+        },
         {
             name: "ZCL - Zclassic",
             onSelect: function() {
index c4f318866228aa2397874ad1e607e0a6d8ad2c62..f0b50e7cfde4752280ed5795824a0ea3f12dea79 100644 (file)
@@ -1216,7 +1216,17 @@ it('Allows selection of FIO', function(done) {
 });
 it('Allows selection of Firo', function(done) {
     var params = {
-        selectText: "FIRO - Firo",
+        selectText: "FIRO - Firo (Zcoin rebrand)",
+        phrase: "abandon abandon ability",
+        firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
+        firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
+        firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
+    };
+    testNetwork(done, params);
+});
+it('Allows selection of Zcoin', function(done) {
+    var params = {
+        selectText: "XZC - Zcoin (rebranded to Firo)",
         phrase: "abandon abandon ability",
         firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
         firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",