]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Added support for Blocknode
authorUnknown <ceri.coburn@gmail.com>
Sat, 3 Nov 2018 09:21:57 +0000 (09:21 +0000)
committerUnknown <ceri.coburn@gmail.com>
Sat, 3 Nov 2018 09:22:08 +0000 (09:22 +0000)
src/js/bitcoinjs-extensions.js
src/js/index.js
tests/spec/tests.js

index a3f86cffeb7cc380d713f4a34f35e4d743a026b8..4389969ec25df509be325514ec67e53a853a7dd5 100644 (file)
@@ -1418,4 +1418,26 @@ bitcoinjs.bitcoin.networks.phore = {
   pubKeyHash: 0x37,
   scriptHash: 0x0D,
   wif:  0xD4,
+};
+
+bitcoinjs.bitcoin.networks.blocknode = {
+  messagePrefix: '\x18Blocknode Signed Message:\n',
+  bip32: {
+       public: 0x0488b21e,
+       private: 0x0488ade4
+  },
+  pubKeyHash: 0x19,
+  scriptHash: 0x3F,
+  wif:  0x4b,
+};
+
+bitcoinjs.bitcoin.networks.blocknode_testnet = {
+  messagePrefix: '\x18Blocknode Testnet Signed Message:\n',
+  bip32: {
+       public: 0x043587cf,
+       private: 0x04358394
+  },
+  pubKeyHash: 0x55,
+  scriptHash: 0x7d,
+  wif:  0x89,
 };
\ No newline at end of file
index f33d025d25fdeb7f061113a692baefdde2efcdc0..9d9476500a738c324af44976262c630a027d959a 100644 (file)
                 setHdCoin(10);
             },
         },
+        {
+            name: "BND - Blocknode",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.blocknode;
+                setHdCoin(2941);
+            },
+        },     
+               {
+            name: "tBND - Blocknode Testnet",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.blocknode_testnet;
+                setHdCoin(1);
+            },
+        },
         {
             name: "BRIT - Britcoin",
             onSelect: function() {
index b1308fb99556c1b29a773b44d8be1290166d243b..6f9d693521524843437e06230a07f20f2f375d2c 100644 (file)
@@ -1348,6 +1348,20 @@ it('Allows selection of Phore', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of Blocknode', function(done) {
+    var params = {
+        selectText: "BND - Blocknode",
+        firstAddress: "BG8xZSAur2jYLG9VXt8dYfkKxxeR7w9bSe",
+    };
+    testNetwork(done, params);
+});
+it('Allows selection of Blocknode Testnet', function(done) {
+    var params = {
+        selectText: "tBND - Blocknode Testnet",
+        firstAddress: "bSptsFyDktFSKpWveRywJsDoJA2TC6qfHv",
+    };
+    testNetwork(done, params);
+});
 
 // BIP39 seed is set from phrase
 it('Sets the bip39 seed from the prhase', function(done) {