aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAitor <aitor.plaza@unavarra.es>2019-05-29 12:21:22 +0200
committerAitor <aitor.plaza@unavarra.es>2019-05-29 12:21:22 +0200
commitaf14981d83441583bf6ed1a27dabb9545a1168f4 (patch)
treee064bc77683915f4a7fdf1d71c1bc0acad04505c
parent9f3c11176634d46ac19586b1988da80fb3f71ee4 (diff)
downloadBIP39-af14981d83441583bf6ed1a27dabb9545a1168f4.tar.gz
BIP39-af14981d83441583bf6ed1a27dabb9545a1168f4.tar.zst
BIP39-af14981d83441583bf6ed1a27dabb9545a1168f4.zip
Add DeepOnion (ONION)
-rw-r--r--src/js/bitcoinjs-extensions.js13
-rw-r--r--src/js/index.js7
-rw-r--r--tests/spec/tests.js7
3 files changed, 26 insertions, 1 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index f07eacf..16e9385 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -1537,4 +1537,15 @@ bitcoinjs.bitcoin.networks.blockstamp = {
1537 pubKeyHash: 0x00, 1537 pubKeyHash: 0x00,
1538 scriptHash: 0x05, 1538 scriptHash: 0x05,
1539 wif: 0x80, 1539 wif: 0x80,
1540}; \ No newline at end of file 1540};
1541
1542bitcoinjs.bitcoin.networks.deeponion = {
1543 messagePrefix: 'x18DeepOnion Signed Message:\n',
1544 bip32: {
1545 public: 0x0488B21E,
1546 private: 0x0488ADE4,
1547 },
1548 pubKeyHash: 0x1F,
1549 scriptHash: 0x4E,
1550 wif: 0x9F,
1551};
diff --git a/src/js/index.js b/src/js/index.js
index 6085f1b..88b1e09 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -2369,6 +2369,13 @@
2369 }, 2369 },
2370 }, 2370 },
2371 { 2371 {
2372 name: "ONION - DeepOnion",
2373 onSelect: function() {
2374 network = bitcoinjs.bitcoin.networks.deeponion;
2375 setHdCoin(305);
2376 },
2377 },
2378 {
2372 name: "ONX - Onixcoin", 2379 name: "ONX - Onixcoin",
2373 onSelect: function() { 2380 onSelect: function() {
2374 network = bitcoinjs.bitcoin.networks.onixcoin; 2381 network = bitcoinjs.bitcoin.networks.onixcoin;
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 42dc792..e3f7e1c 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -1077,6 +1077,13 @@ it('Allows selection of Omnicore', function(done) {
1077 }; 1077 };
1078 testNetwork(done, params); 1078 testNetwork(done, params);
1079}); 1079});
1080it('Allows selection of DeepOnion', function(done) {
1081 var params = {
1082 selectText: "ONION - DeepOnion",
1083 firstAddress: "DVioZ2Rjc9krDf5bbHuixznSDumzvGpzVw",
1084 };
1085 testNetwork(done, params);
1086});
1080it('Allows selection of Pesobit', function(done) { 1087it('Allows selection of Pesobit', function(done) {
1081 var params = { 1088 var params = {
1082 selectText: "PSB - Pesobit", 1089 selectText: "PSB - Pesobit",