X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Findex.js;h=713b5e847c1a5da4046d89fccd790ca03e58c425;hb=545348d1594a428a604614b480a271f6450bf47a;hp=61a2dd551ee4937372ca2806b12d3b34bf86cdaa;hpb=0cb81e1117053c93debfa501a5bdb11169636dd2;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/index.js b/src/js/index.js index 61a2dd5..713b5e8 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1348,6 +1348,27 @@ address = libs.bchaddrSlp.toSlpAddress(address); } } + + // ZooBC address format may vary + 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'); + } + // Segwit addresses are different if (isSegwit) { if (!segwitAvailable) { @@ -3218,6 +3239,13 @@ setHdCoin(4); }, }, + { + name: "RITO - Ritocoin", + onSelect: function() { + network = libs.bitcoin.networks.ritocoin; + setHdCoin(19169); + }, + }, { name: "RVR - RevolutionVR", onSelect: function() {