Adding FIX coin support
authoryurykk <yurykk@gmail.com>
Thu, 27 Jun 2019 09:15:11 +0000 (12:15 +0300)
committeryurykk <yurykk@gmail.com>
Thu, 27 Jun 2019 09:15:11 +0000 (12:15 +0300)
src/js/bitcoinjs-extensions.js
src/js/index.js
tests/spec/tests.js

index 4e05482f174980f231d0231ba10396c1f9a190ae..bd3e50024f33d2aa59fbc2e0b6bd4ebd88ce8899 100644 (file)
@@ -327,6 +327,28 @@ bitcoinjs.bitcoin.networks.pivxtestnet = {
   wif: 0xef
 };
 
+bitcoinjs.bitcoin.networks.fix = {
+  messagePrefix: 'unused',
+  bip32: {
+    public: 0x022d2533,
+    private: 0x0221312b
+  },
+  pubKeyHash: 0x23,
+  scriptHash: 0x5F,
+  wif: 0x3C
+};
+
+bitcoinjs.bitcoin.networks.fixtestnet = {
+  messagePrefix: 'unused',
+  bip32: {
+    public: 0x3a8061a0,
+    private: 0x3a805837
+  },
+  pubKeyHash: 0x4c,
+  scriptHash: 0x89,
+  wif: 0xED
+};
+
 bitcoinjs.bitcoin.networks.fujicoin = {
   messagePrefix: '\x19FujiCoin Signed Message:\n',
   bip32: {
index 8242da47b56d2be639f4dd391922ba31b1a9a917..b784f8ca1ee72448cdb76b936dbff31bb98898ec 100644 (file)
                 setHdCoin(40);
             },
         },
+        {
+            name: "FIX - FIX",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.fix;
+                setHdCoin(336);
+            },
+        },
+        {
+            name: "FIX - FIX Testnet",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.fixtestnet;
+                setHdCoin(1);
+            },
+        },
         {
             name: "FJC - Fujicoin",
             onSelect: function() {
index c92689a78c247e3e3e82c0a63321a3dba9e262b1..6e56ce0a5a219bf5ecbccd212c78d86e9c94c0ce 100644 (file)
@@ -640,6 +640,20 @@ it('Allows selection of maza', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of FIX', function(done) {
+    var params = {
+        selectText: "FIX - FIX",
+        firstAddress: "FS5MEU8fs5dUvsaSCSusV8RQtC8j2h3JEh",
+    };
+    testNetwork(done, params);
+});
+it('Allows selection of FIX testnet', function(done) {
+    var params = {
+        selectText: "FIX - FIX Testnet",
+        firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of fujicoin', function(done) {
     var params = {
         selectText: "FJC - Fujicoin",