aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/bitcoinjs-extensions.js23
-rw-r--r--src/js/index.js35
2 files changed, 58 insertions, 0 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index b049d78..84de8da 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -1219,6 +1219,17 @@ libs.bitcoin.networks.revolutionvr = {
1219 wif: 0xc6, 1219 wif: 0xc6,
1220}; 1220};
1221 1221
1222libs.bitcoin.networks.ritocoin = {
1223 messagePrefix: '\x15Rito Signed Message:\n',
1224 bip32: {
1225 public: 0x0488B21E,
1226 private: 0x0488ADE4,
1227 },
1228 pubKeyHash: 0x19,
1229 scriptHash: 0x69,
1230 wif: 0x8b,
1231};
1232
1222libs.bitcoin.networks.rsk = { 1233libs.bitcoin.networks.rsk = {
1223 messagePrefix: '\x18RSK Signed Message:\n', 1234 messagePrefix: '\x18RSK Signed Message:\n',
1224 bip32: { 1235 bip32: {
@@ -1553,6 +1564,18 @@ libs.bitcoin.networks.hush3 = {
1553 wif: 0xBC, 1564 wif: 0xBC,
1554}; 1565};
1555 1566
1567libs.bitcoin.networks.zoobc = {
1568 messagePrefix: '\x18ZooBC Signed Message:\n',
1569 bech32: 'bc',
1570 bip32: {
1571 public: 0x0488b21e,
1572 private: 0x0488ade4,
1573 },
1574 pubKeyHash: 0x00,
1575 scriptHash: 0x05,
1576 wif: 0x80,
1577};
1578
1556libs.bitcoin.networks.zclassic = { 1579libs.bitcoin.networks.zclassic = {
1557 messagePrefix: '\x18Zcash Signed Message:\n', 1580 messagePrefix: '\x18Zcash Signed Message:\n',
1558 bip32: { 1581 bip32: {
diff --git a/src/js/index.js b/src/js/index.js
index fd8c16b..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) {
@@ -3219,6 +3240,13 @@
3219 }, 3240 },
3220 }, 3241 },
3221 { 3242 {
3243 name: "RITO - Ritocoin",
3244 onSelect: function() {
3245 network = libs.bitcoin.networks.ritocoin;
3246 setHdCoin(19169);
3247 },
3248 },
3249 {
3222 name: "RVR - RevolutionVR", 3250 name: "RVR - RevolutionVR",
3223 onSelect: function() { 3251 onSelect: function() {
3224 network = libs.bitcoin.networks.revolutionvr; 3252 network = libs.bitcoin.networks.revolutionvr;
@@ -3541,6 +3569,13 @@
3541 }, 3569 },
3542 }, 3570 },
3543 { 3571 {
3572 name: "ZBC - ZooBlockchain",
3573 onSelect: function () {
3574 network = libs.bitcoin.networks.zoobc;
3575 setHdCoin(883);
3576 },
3577 },
3578 {
3544 name: "ZCL - Zclassic", 3579 name: "ZCL - Zclassic",
3545 onSelect: function() { 3580 onSelect: function() {
3546 network = libs.bitcoin.networks.zclassic; 3581 network = libs.bitcoin.networks.zclassic;