Hello, how can i generate a new waves account (seed, address, keypair) in nodeJs?
Been using waves-api lib that had a Waves.Seed.create() method returning an object with seed, address and keypair but it is no longer maintained, waves-transactions is only offering transactions.
Any pointer on how to do that without waves-api?
Thank you.
Thanks a lot will check this
I tried this:
npm install @waves /waves-signature-generator --save
const sign_gen = require('@waves/waves-signature-generator')
const seed = sign_gen.Seed.create();
console.log(seed);
But im getting this error:
App threw an error during load
Error: Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11
Any idea ? not working with electron ?
The same issue happened in waves-api so maybe the same fix could apply?
var WavesAPI = require('@waves/waves-api');
const Waves = WavesAPI.create(WavesAPI.TESTNET_CONFIG);
const seed = Waves.Seed.create();
console.log(seed);
(function (exports, require, module, __filename, __dirname) { (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var...
bug
izanf
January 7, 2019, 10:41pm
6
My method to create a seed is:
import bip39 from 'bip39';
import { SeedAdapter } from '@waves/signature-adapter';
export const createWallet = () => {
const words = bip39.generateMnemonic(160);
const adapter = new SeedAdapter(words).seed;
return adapter;
};
Thanks bro, will try this as well