add bitcoin private testnet support

This commit is contained in:
J62
2021-03-29 19:46:51 -07:00
parent 23f393acfb
commit 1820b6ac67
3 changed files with 33 additions and 5 deletions
+12 -5
View File
@@ -1350,21 +1350,21 @@
}
// ZooBC address format may vary
if (networks[DOM.network.val()].name == "ZBC - ZooBlockchain") {
if (networks[DOM.network.val()].name == "ZBC - ZooBlockchain") {
var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
var coin = parseIntNoNaN(DOM.bip44coin.val(), 0);
var path = "m/";
path += purpose + "'/";
path += coin + "'/" + index + "'";
var result = libs.zoobcUtil.getKeypair(path, seed);
let publicKey = result.pubKey.slice(1, 33);
let privateKey = result.key;
privkey = privateKey.toString('hex');
pubkey = publicKey.toString('hex');
indexText = path;
address = libs.zoobcUtil.getZBCAddress(publicKey, 'ZBC');
}
@@ -2389,6 +2389,13 @@
setHdCoin(183);
},
},
{
name: "BTCPt - Bitcoin Private Testnet",
onSelect: function() {
network = libs.bitcoin.networks.bitcoinprivatetestnet;
setHdCoin(1);
},
},
{
name: "BSC - Binance Smart Chain",
onSelect: function() {