X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Findex.js;h=96fc4510c80c796a985fed943c92ff22671e003f;hb=9a82f12b915b179c39719af2ea12dace01287575;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..96fc451 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) { @@ -1398,6 +1419,12 @@ privkey = FIObufferToPrivate(keyPair.d.toBuffer(32)); } + if (networks[DOM.network.val()].name == "ATOM - Cosmos Hub") { + address = CosmosBufferToAddress(keyPair.getPublicKeyBuffer()); + pubkey = CosmosBufferToPublic(keyPair.getPublicKeyBuffer()); + privkey = keyPair.d.toBuffer().toString("base64"); + } + //Groestlcoin Addresses are different if(isGRS()) { @@ -2213,6 +2240,13 @@ setHdCoin(357); }, }, + { + name: "ATOM - Cosmos Hub", + onSelect: function() { + network = libs.bitcoin.networks.bitcoin; + setHdCoin(118); + }, + }, { name: "AUR - Auroracoin", onSelect: function() { @@ -3218,6 +3252,13 @@ setHdCoin(4); }, }, + { + name: "RITO - Ritocoin", + onSelect: function() { + network = libs.bitcoin.networks.ritocoin; + setHdCoin(19169); + }, + }, { name: "RVR - RevolutionVR", onSelect: function() {