]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
add stash parameters
authorBeachM <11566409+BeachM@users.noreply.github.com>
Sat, 11 Aug 2018 04:07:36 +0000 (21:07 -0700)
committerBeachM <11566409+BeachM@users.noreply.github.com>
Sat, 11 Aug 2018 04:07:36 +0000 (21:07 -0700)
src/js/bitcoinjs-extensions.js
src/js/index.js
tests/spec/tests.js

index 8744142cd4d783e6de9cc25a703432f71d8262dd..06ad221dd4796f286e154a4c6d6636511933b075 100644 (file)
@@ -1045,6 +1045,28 @@ bitcoinjs.bitcoin.networks.solarcoin = {
   wif: 0x92,
 };
 
+bitcoinjs.bitcoin.networks.stash = {
+  messagePrefix: '\x18Stash Signed Message:\n',
+  bip32: {
+    public: 0x0488b21e,
+    private: 0x0488ade4
+  },
+  pubKeyHash: 0x4c,
+  scriptHash: 0x10,
+  wif: 0xcc
+};
+
+bitcoinjs.bitcoin.networks.stashtn = {
+  messagePrefix: '\x18Stash Test Signed Message:\n',
+  bip32: {
+    public: 0x043587cf,
+    private: 0x04358394
+  },
+  pubKeyHash: 0x8c,
+  scriptHash: 0x13,
+  wif: 0xef
+};
+
 bitcoinjs.bitcoin.networks.stratis = {
   messagePrefix: '\x18Stratis Signed Message:\n',
   bip32: {
index 589ba20fd891d612a0ad41bef636c45f96b23533..16c5cef5ce1da2837167f64650e843c46102a791 100644 (file)
                 setHdCoin(59);
             },
         },
+        {
+            name: "STASH - Stash",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.stash;
+                setHdCoin(0xC0C0);
+            },
+        },
+        {
+            name: "STASH - Stash Testnet",
+            onSelect: function() {
+                network = bitcoinjs.bitcoin.networks.stashtn;
+                setHdCoin(0xCAFE);
+            },
+        },
         {
             name: "STRAT - Stratis",
             onSelect: function() {
index 6208bfcd78bc9aba7deec7c41de0388dbc33cb5b..e0eea6b1c4bf75f153a7cf8a97c3f26918f7afb6 100644 (file)
@@ -296,7 +296,7 @@ describe('BIP39 Tool Tests', function() {
 
     beforeEach(function(done) {
         driver = newDriver();
-        driver.get(url).then(done);
+        driver.get(url).then(done);        
     });
 
     // Close the website after each test is run (so that it is opened fresh each time)
@@ -1089,6 +1089,20 @@ it('Allows selection of Solarcoin', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of stash', function(done) {
+    var params = {
+        selectText: "STASH - Stash",
+        firstAddress: "XxwAsWB7REDKmAvHA85SbEZQQtpxeUDxS3",
+    };
+    testNetwork(done, params);
+});
+it('Allows selection of stash testnet', function(done) {
+    var params = {
+        selectText: "STASH - Stash Testnet",
+        firstAddress: "YdbhtMuGsPSkE6bPdNTHoFSszQKmK4S5LT",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of Stratis', function(done) {
     var params = {
         selectText: "STRAT - Stratis",