Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
generateKeyPair(seed?: Buffer): KeyPair {
const pair = seed ? generateAccountFromSeed(seed) : generateAccount();
return {
pub: pair.addr, // encoded pub
prv: Seed.encode(pair.sk), // encoded seed
};
}