X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Findex.js;h=3aa78e02e210d3b217512690f5215b2a235099ea;hb=562ece8004ffa37a215f9cd0c5d365227a0b8d08;hp=8dd553dccb42807098cb6ede650644533a51e329;hpb=8cb07685fd1faf519cb1b02024b7320d0c19ce4b;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/index.js b/src/js/index.js index 8dd553d..3aa78e0 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -931,6 +931,19 @@ privkey = ethUtil.addHexPrefix(privkey); pubkey = ethUtil.addHexPrefix(pubkey); } + + // Stellar is different + if (networks[DOM.network.val()].name == "XLM - Stellar") { + var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44); + var coin = parseIntNoNaN(DOM.bip44coin.val(), 0); + var path = "m/"; + path += purpose + "'/"; + path += coin + "'/" + index + "'"; + var keypair = stellarUtil.getKeypair(path, seed); + indexText = path; + privkey = keypair.secret(); + pubkey = address = keypair.publicKey(); + } if ((networks[DOM.network.val()].name == "NAS - Nebulas")) { var NasAccount = require("nebulas-account"); var privKeyBuffer = keyPair.d.toBuffer(32); @@ -1692,6 +1705,13 @@ setHdCoin(220); }, }, + { + name: "BOLI - Bolivarcoin", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.bolivarcoin; + setHdCoin(278); + }, + }, { name: "BCA - Bitcoin Atom", onSelect: function() { @@ -2671,6 +2691,13 @@ setHdCoin(65); }, }, + { + name: "XLM - Stellar", + onSelect: function() { + network = ''; // doesn't apply, using stellar-lib + setHdCoin(148); + }, + }, { name: "XMY - Myriadcoin", onSelect: function() {