Wallet Class
Class
export default class Wallet {
constructor(
public name: string,
public key: string,
public prefix?: string
) {}Name
Type
Description
Methods
fromMnemonic
static async fromMnemonic(
name: string,
mnemonic: string,
passphrase: string,
prefix: string
) {
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, {
prefix,
});
const key = await wallet.serialize(passphrase);
return new Wallet(name, key, prefix);
}Name
Type
Description
getWallet
Name
Type
Description
getAccounts
Name
Type
Description
getAddress
Name
Type
Description
Last updated