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

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

index 1a286289331d7de24854f50716a6204bedd1e47c,0658ae7054cc91b7667e41ad5b28bd5a5e2f8124..ac9f315a7c48c20855099167602e47e95e24219e
@@@ -1462,17 -1462,6 +1462,17 @@@ bitcoinjs.bitcoin.networks.hush = 
    wif: 0x80,
  };
  
 +bitcoinjs.bitcoin.networks.hush3 = {
 +  messagePrefix: '\x18Hush Signed Message:\n',
 +  bip32: {
 +    public: 0x0488B21E,
 +    private: 0x0488ADE4,
 +  },
 +  pubKeyHash: 0x3C,
 +  scriptHash: 0x55,
 +  wif: 0xBC,
 +};
 +
  bitcoinjs.bitcoin.networks.zclassic = {
    messagePrefix: '\x18Zcash Signed Message:\n',
    bip32: {
@@@ -1649,3 -1638,48 +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
+ };
diff --combined src/js/index.js
index deb88d4571d39dcab94a9bc93f1f1a9deebc4775,b3450d3eb895d97a96b798c33c513f88b09af968..fff1e40ebb6b5204e401e533de2119359eda1a97
                  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() {
              },
          },
                {
 -            name: "HUSH - Hush",
 +            name: "HUSH - Hush (Legacy)",
              onSelect: function() {
                  network = bitcoinjs.bitcoin.networks.hush;
                  setHdCoin(197);
              },
 +        },
 +              {
 +            name: "HUSH - Hush3",
 +            onSelect: function() {
 +                network = bitcoinjs.bitcoin.networks.hush3;
 +                setHdCoin(197);
 +            },
          },
          {
              name: "INSN - Insane",
                  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() {
              },
          },
          {
 -            name: "ZEN - Zencash",
 +            name: "ZEN - Horizen",
              onSelect: function() {
                  network = bitcoinjs.bitcoin.networks.zencash;
                  setHdCoin(121);
diff --combined tests/spec/tests.js
index 76f52971f06f601e5495206817be7aa42e8215ef,8b77b4a24b60b62e4b60cf81a8676b549d7286ac..09013111294e66fdc4e28c47f9fb8bb4f7f79c5c
@@@ -732,6 -732,13 +732,13 @@@ it('Allows selection of Asiacoin', func
      };
      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 +781,13 @@@ it('Allows selection of Bitcoin Private
      };
      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 +1194,13 @@@ it('Allows selection of Putincoin', fun
      };
      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",
@@@ -1376,9 -1397,9 +1397,9 @@@ it('Allows selection of Zclassic', func
      };
      testNetwork(done, params);
  });
 -it('Allows selection of Zencash', function(done) {
 +it('Allows selection of Horizen', function(done) {
      var params = {
 -        selectText: "ZEN - Zencash",
 +        selectText: "ZEN - Horizen",
          firstAddress: "znWh9XASyW2dZq5tck84wFjiwuqVysi7q3p",
      };
      testNetwork(done, params);
@@@ -1411,6 -1432,14 +1432,14 @@@ it('Allows selection of MIX', function(
      };
      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",
@@@ -1441,18 -1470,11 +1470,18 @@@ it('Allows selection of Callisto', func
  });
  it('Allows selection of HUSH', function(done) {
      var params = {
 -        selectText: "HUSH - Hush",
 +        selectText: "HUSH - Hush (Legacy)",
          firstAddress: "t1g6rLXUnJaiJuu4q4zmJjoa9Gk4fwKpiuA",
      };
      testNetwork(done, params);
  });
 +it('Allows selection of HUSH3', function(done) {
 +    var params = {
 +        selectText: "HUSH - Hush3",
 +        firstAddress: "RXWSQhwvw5jHPGP8bjwJhWoRnMLBnuPDKD",
 +    };
 +    testNetwork(done, params);
 +});
  it('Allows selection of ExchangeCoin', function(done) {
      var params = {
          selectText: "EXCC - ExchangeCoin",