]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
fix: define own libs.bitcoin.networks.rsk
authorbguiz <bguiz@users.noreply.github.com>
Tue, 3 Mar 2020 06:55:53 +0000 (14:55 +0800)
committerbguiz <bguiz@users.noreply.github.com>
Tue, 3 Mar 2020 06:55:53 +0000 (14:55 +0800)
src/js/bitcoinjs-extensions.js
src/js/index.js

index 17475b137c9b6ed891b5c884b44627d6fcd0fabd..85c39d17392ecca28a0fc275558166d943e35e28 100644 (file)
@@ -1175,6 +1175,31 @@ libs.bitcoin.networks.revolutionvr = {
   wif: 0xc6,
 };
 
+libs.bitcoin.networks.rsk = {
+  messagePrefix: '\x18RSK Signed Message:\n',
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488ade4
+  },
+  // TODO defaulting to Bitcoin value, check this
+  pubKeyHash: 0x00,
+  // TODO defaulting to Bitcoin value, check this
+  scriptHash: 0x05,
+  // TODO defaulting to Bitcoin value, check this
+  wif: 0x80
+};
+
+libs.bitcoin.networks.rsktestnet = {
+  messagePrefix: '\x18RSK Testnet Signed Message:\n',
+  bip32: {
+    public: 0x043587cf,
+    private: 0x04358394
+  },
+  pubKeyHash: 0x6f,
+  scriptHash: 0xc4,
+  wif: 0xef
+};
+
 libs.bitcoin.networks.rubycoin = {
   messagePrefix: '\x18Rubycoin Signed Message:\n',
   bip32: {
index c2d34a711ac3c2be0ca06cb79984f35419b6fc23..ad2b8597c13b5945b68e10a5fa87b61105752bb3 100644 (file)
             },
         },
         {
-            name: "RBTC - RSK",
+            name: "R-BTC - RSK",
             onSelect: function() {
-                network = libs.bitcoin.networks.rubycoin;
+                network = libs.bitcoin.networks.rsk;
                 setHdCoin(137);
             },
         },
         {
-            name: "tRBTC - RSK Testnet",
+            name: "tR-BTC - RSK Testnet",
             onSelect: function() {
-                network = libs.bitcoin.networks.rubycoin;
+                network = libs.bitcoin.networks.rsktestnet;
                 setHdCoin(37310);
             },
         },