Skip to content

accountFromMnemonic

function accountFromMnemonic(
mnemonic: string,
type: "SECP256K1" | "BLS",
path: string,
password?: string,
network?: Network): {
address: IAddress;
path: string;
privateKey: Uint8Array;
publicKey: Uint8Array;
type: "SECP256K1" | "BLS";
}

Defined in: packages/iso-filecoin/src/wallet.js:60

Get HD account from mnemonic

Parameters

ParameterTypeDescription
mnemonicstring
type"SECP256K1" | "BLS"
pathstring
password?string
network?Network

Returns

{
address: IAddress;
path: string;
privateKey: Uint8Array;
publicKey: Uint8Array;
type: "SECP256K1" | "BLS";
}

address

address: IAddress;

path

path: string;

Derivation path - only for HD wallets

privateKey

privateKey: Uint8Array;

Private key - only for RAW and HD wallets

publicKey

publicKey: Uint8Array;

type

type: "SECP256K1" | "BLS";