Merge pull request #352 from PavlosTze/bsv-rpd-monkey-arya
authoriancoleman <1281387+iancoleman@users.noreply.github.com>
Thu, 12 Sep 2019 00:36:30 +0000 (10:36 +1000)
committerGitHub <noreply@github.com>
Thu, 12 Sep 2019 00:36:30 +0000 (10:36 +1000)
Support BSV, RPD, MONKEY, ARYA

src/js/bitcoinjs-extensions.js
src/js/index.js
tests/spec/tests.js

index 1a286289331d7de24854f50716a6204bedd1e47c..ac9f315a7c48c20855099167602e47e95e24219e 100644 (file)
@@ -1649,3 +1649,48 @@ bitcoinjs.bitcoin.networks.wagerr = {
   scriptHash: 0x3f,
   wif: 0xc7
 };
+
+bitcoinjs.bitcoin.networks.bitcoinsv = {
+  messagePrefix: 'unused',
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488ade4
+  },
+  pubKeyHash: 0x00,
+  scriptHash: 0x05,
+  wif: 0x80
+};
+
+bitcoinjs.bitcoin.networks.monkeyproject = {
+  messagePrefix: 'Monkey Signed Message:\n',
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488dde4
+  },
+  pubKeyHash: 0x33,
+  scriptHash: 0x1c,
+  wif: 0x37
+};
+
+bitcoinjs.bitcoin.networks.rapids = {
+  messagePrefix: 'DarkNet Signed Message:\n',
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488ade4
+  },
+  pubKeyHash: 0x3d,
+  scriptHash: 0x06,
+  wif: 0x2e
+};
+
+bitcoinjs.bitcoin.networks.aryacoin = {
+  messagePrefix: '\x18Aryacoin Signed Message:\n',
+  bech32: 'arya',
+  bip32: {
+    public: 0x0488B21E,
+    private: 0x0488ADE4,
+  },
+  pubKeyHash: 0x17,
+  scriptHash: 0x6f,
+  wif: 0x97
+};
index deb88d4571d39dcab94a9bc93f1f1a9deebc4775..fff1e40ebb6b5204e401e533de2119359eda1a97 100644 (file)
                 setHdCoin(161);
             },
         },
+        {
+            name: "ARYA - Aryacoin",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.aryacoin;
+                setHdCoin(357);
+            },
+        },
         {
             name: "AUR - Auroracoin",
             onSelect: function() {
                 setHdCoin(183);
             },
         },
+        {
+            name: "BSV - BitcoinSV",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.bitcoinsv;
+                setHdCoin(236);
+            },
+        },
         {
             name: "BTCZ - Bitcoinz",
             onSelect: function() {
                 setHdCoin(22);
             },
         },
+        {
+            name: "MONK - Monkey Project",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.monkeyproject,
+                setHdCoin(214);
+            },
+        },
         {
             name: "MUSIC - Musicoin",
             segwitAvailable: false,
                 setHdCoin(122);
             },
         },
+        {
+            name: "RPD - Rapids",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.rapids;
+                setHdCoin(320);
+            },
+        },
         {
             name: "RVN - Ravencoin",
             onSelect: function() {
index 76f52971f06f601e5495206817be7aa42e8215ef..09013111294e66fdc4e28c47f9fb8bb4f7f79c5c 100644 (file)
@@ -732,6 +732,13 @@ it('Allows selection of Asiacoin', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of Aryacoin', function(done) {
+    var params = {
+        selectText: "ARYA - Aryacoin",
+        firstAddress: "Abr6gX25KaU9BpwD34UfsL3A4n89NvYYSf",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of Auroracoin', function(done) {
     var params = {
         selectText: "AUR - Auroracoin",
@@ -774,6 +781,13 @@ it('Allows selection of Bitcoin Private', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of Bitcoin SV', function(done) {
+    var params = {
+        selectText: "BSV - BitcoinSV",
+        firstAddress: "1N4mgtE5yxifch9jWs7Sds6oVqxdy2t576",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of Bitcoinz', function(done) {
     var params = {
         selectText: "BTCZ - Bitcoinz",
@@ -1180,6 +1194,13 @@ it('Allows selection of Putincoin', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of Rapids', function(done) {
+    var params = {
+        selectText: "RPD - Rapids",
+        firstAddress: "Ri8XxUdZaXS5LqxmFJcFEjFinkaMbmhSUp",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of Ravencoin', function(done) {
     var params = {
         selectText: "RVN - Ravencoin",
@@ -1411,6 +1432,14 @@ it('Allows selection of MIX', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of Monkey Project', function(done) {
+    var params = {
+        selectText: "MONK - Monkey Project",
+        firstAddress: "MnLrcnnUzKnf7TzufjRe5DLZqQJz18oYyu",
+    };
+    testNetwork(done, params);
+});
+
 it('Allows selection of Musicoin', function(done) {
     var params = {
         selectText: "MUSIC - Musicoin",