X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=libs%2Fnanocurrency-web%2Fnano-util.js;fp=libs%2Fnanocurrency-web%2Fnano-util.js;h=ec354f65b1d1362473e839b2da055a82323f1ef0;hb=e0863058952af909f8860f4ec003f13f683d534c;hp=0000000000000000000000000000000000000000;hpb=863eee8ed754e4aebd5059b712deb4fca8709c27;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/libs/nanocurrency-web/nano-util.js b/libs/nanocurrency-web/nano-util.js new file mode 100755 index 0000000..ec354f6 --- /dev/null +++ b/libs/nanocurrency-web/nano-util.js @@ -0,0 +1,15 @@ +const NanoBase = require('nanocurrency-web'); + +window.nanoUtil = { + getKeypair: function (index, seed) { + const accounts = NanoBase.wallet.accounts(seed, index, index) + return {privKey: accounts[0].privateKey, pubKey: accounts[0].publicKey, address: accounts[0].address}; + }, + dummyNetwork: { + bip32: {public: 0, private: 0}, + messagePrefix: '', + pubKeyHash: 0, + scriptHash: 0, + wif: 0, + }, +}