aboutsummaryrefslogtreecommitdiff
path: root/src/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/index.js')
-rw-r--r--src/js/index.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js
index f7835fa..713b5e8 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1348,6 +1348,27 @@
1348 address = libs.bchaddrSlp.toSlpAddress(address); 1348 address = libs.bchaddrSlp.toSlpAddress(address);
1349 } 1349 }
1350 } 1350 }
1351
1352 // ZooBC address format may vary
1353 if (networks[DOM.network.val()].name == "ZBC - ZooBlockchain") {
1354
1355 var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
1356 var coin = parseIntNoNaN(DOM.bip44coin.val(), 0);
1357 var path = "m/";
1358 path += purpose + "'/";
1359 path += coin + "'/" + index + "'";
1360 var result = libs.zoobcUtil.getKeypair(path, seed);
1361
1362 let publicKey = result.pubKey.slice(1, 33);
1363 let privateKey = result.key;
1364
1365 privkey = privateKey.toString('hex');
1366 pubkey = publicKey.toString('hex');
1367
1368 indexText = path;
1369 address = libs.zoobcUtil.getZBCAddress(publicKey, 'ZBC');
1370 }
1371
1351 // Segwit addresses are different 1372 // Segwit addresses are different
1352 if (isSegwit) { 1373 if (isSegwit) {
1353 if (!segwitAvailable) { 1374 if (!segwitAvailable) {
@@ -3548,6 +3569,13 @@
3548 }, 3569 },
3549 }, 3570 },
3550 { 3571 {
3572 name: "ZBC - ZooBlockchain",
3573 onSelect: function () {
3574 network = libs.bitcoin.networks.zoobc;
3575 setHdCoin(883);
3576 },
3577 },
3578 {
3551 name: "ZCL - Zclassic", 3579 name: "ZCL - Zclassic",
3552 onSelect: function() { 3580 onSelect: function() {
3553 network = libs.bitcoin.networks.zclassic; 3581 network = libs.bitcoin.networks.zclassic;