Open you21979 opened 7 years ago
function generateSeed() {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
assert(!options.entropy || options.entropy.length >= 16, 'entropy too short');
var entropy = options.entropy ? options.entropy.slice(0, 16) : brorand(16);
var type = options.algorithm === 'ed25519' ? 'ed25519' : 'secp256k1';
return addressCodec.encodeSeed(entropy, type);
}
bip32 master seed buffer ->64byte ripple encode -> 16byte