const Web3 = require('web3');

let url = 'infuralink';
let web3 = new Web3(url);

This is the code of many tutorials for do a key pair. it is completely secure or do I need to pass a parameter to have enough entropy?


Yes it is secure. If you don't pass entropy to it, it will use randomhex, see Web3 docs. That uses the secure crypto.randomBytes function which is pretty secure. It's just a wrapper around OpenSSL's RAND_bytes().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.