diff options
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 22 | ||||
-rw-r--r-- | src/js/index.js | 14 | ||||
-rw-r--r-- | tests/spec/tests.js | 14 |
3 files changed, 50 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 271dbce..bd96e05 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -1429,4 +1429,26 @@ bitcoinjs.bitcoin.networks.phore = { | |||
1429 | pubKeyHash: 0x37, | 1429 | pubKeyHash: 0x37, |
1430 | scriptHash: 0x0D, | 1430 | scriptHash: 0x0D, |
1431 | wif: 0xD4, | 1431 | wif: 0xD4, |
1432 | }; | ||
1433 | |||
1434 | bitcoinjs.bitcoin.networks.blocknode = { | ||
1435 | messagePrefix: '\x18Blocknode Signed Message:\n', | ||
1436 | bip32: { | ||
1437 | public: 0x0488b21e, | ||
1438 | private: 0x0488ade4 | ||
1439 | }, | ||
1440 | pubKeyHash: 0x19, | ||
1441 | scriptHash: 0x3F, | ||
1442 | wif: 0x4b, | ||
1443 | }; | ||
1444 | |||
1445 | bitcoinjs.bitcoin.networks.blocknode_testnet = { | ||
1446 | messagePrefix: '\x18Blocknode Testnet Signed Message:\n', | ||
1447 | bip32: { | ||
1448 | public: 0x043587cf, | ||
1449 | private: 0x04358394 | ||
1450 | }, | ||
1451 | pubKeyHash: 0x55, | ||
1452 | scriptHash: 0x7d, | ||
1453 | wif: 0x89, | ||
1432 | }; \ No newline at end of file | 1454 | }; \ No newline at end of file |
diff --git a/src/js/index.js b/src/js/index.js index de509e8..0dd23f3 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -1703,6 +1703,20 @@ | |||
1703 | }, | 1703 | }, |
1704 | }, | 1704 | }, |
1705 | { | 1705 | { |
1706 | name: "BND - Blocknode", | ||
1707 | onSelect: function() { | ||
1708 | network = bitcoinjs.bitcoin.networks.blocknode; | ||
1709 | setHdCoin(2941); | ||
1710 | }, | ||
1711 | }, | ||
1712 | { | ||
1713 | name: "tBND - Blocknode Testnet", | ||
1714 | onSelect: function() { | ||
1715 | network = bitcoinjs.bitcoin.networks.blocknode_testnet; | ||
1716 | setHdCoin(1); | ||
1717 | }, | ||
1718 | }, | ||
1719 | { | ||
1706 | name: "BRIT - Britcoin", | 1720 | name: "BRIT - Britcoin", |
1707 | onSelect: function() { | 1721 | onSelect: function() { |
1708 | network = bitcoinjs.bitcoin.networks.britcoin; | 1722 | network = bitcoinjs.bitcoin.networks.britcoin; |
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 56c259c..cd3f381 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -1355,6 +1355,20 @@ it('Allows selection of Phore', function(done) { | |||
1355 | }; | 1355 | }; |
1356 | testNetwork(done, params); | 1356 | testNetwork(done, params); |
1357 | }); | 1357 | }); |
1358 | it('Allows selection of Blocknode', function(done) { | ||
1359 | var params = { | ||
1360 | selectText: "BND - Blocknode", | ||
1361 | firstAddress: "BG8xZSAur2jYLG9VXt8dYfkKxxeR7w9bSe", | ||
1362 | }; | ||
1363 | testNetwork(done, params); | ||
1364 | }); | ||
1365 | it('Allows selection of Blocknode Testnet', function(done) { | ||
1366 | var params = { | ||
1367 | selectText: "tBND - Blocknode Testnet", | ||
1368 | firstAddress: "bSptsFyDktFSKpWveRywJsDoJA2TC6qfHv", | ||
1369 | }; | ||
1370 | testNetwork(done, params); | ||
1371 | }); | ||
1358 | 1372 | ||
1359 | // BIP39 seed is set from phrase | 1373 | // BIP39 seed is set from phrase |
1360 | it('Sets the bip39 seed from the prhase', function(done) { | 1374 | it('Sets the bip39 seed from the prhase', function(done) { |