Add DeepOnion (ONION)
authorAitor <aitor.plaza@unavarra.es>
Wed, 29 May 2019 10:21:22 +0000 (12:21 +0200)
committerAitor <aitor.plaza@unavarra.es>
Wed, 29 May 2019 10:21:22 +0000 (12:21 +0200)
src/js/bitcoinjs-extensions.js
src/js/index.js
tests/spec/tests.js

index f07eacfa0203a5b8cccd3b4da1b808110818fdba..16e938578b7634631b1b9535e07687042b6b6dbf 100644 (file)
@@ -1537,4 +1537,15 @@ bitcoinjs.bitcoin.networks.blockstamp = {
   pubKeyHash: 0x00,
   scriptHash: 0x05,
   wif:  0x80,
-};
\ No newline at end of file
+};
+
+bitcoinjs.bitcoin.networks.deeponion = {
+    messagePrefix: 'x18DeepOnion Signed Message:\n',
+    bip32: {
+      public: 0x0488B21E,
+      private: 0x0488ADE4,
+    },
+    pubKeyHash: 0x1F,
+    scriptHash: 0x4E,
+    wif: 0x9F,
+};
index 6085f1bb2824c33d27ae22827e0defcb0c0a7905..88b1e097fe5aa90c03e2ac5c3b18b93f2930bcab 100644 (file)
                 setHdCoin(200);
             },
         },
+        {
+            name: "ONION - DeepOnion",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.deeponion;
+                setHdCoin(305);
+            },
+        },
         {
             name: "ONX - Onixcoin",
             onSelect: function() {
index 42dc7925e4394bfcfa1ba8ea8ef84a578d7f8d97..e3f7e1c1a6469a7b1850a6207b3bf7afa7cd1409 100644 (file)
@@ -1077,6 +1077,13 @@ it('Allows selection of Omnicore', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of DeepOnion', function(done) {
+    var params = {
+        selectText: "ONION - DeepOnion",
+        firstAddress: "DVioZ2Rjc9krDf5bbHuixznSDumzvGpzVw",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of Pesobit', function(done) {
     var params = {
         selectText: "PSB - Pesobit",