Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
create(): string {
const privateKey = zcrypto.schnorr.generatePrivateKey();
const newAccount = new Account(privateKey);
this.accounts = { ...this.accounts, [newAccount.address]: newAccount };
if (!this.defaultAccount) {
this.defaultAccount = newAccount;
}
return newAccount.address;
}