UNPKG

@paragon-wallet/novo-hd-keyring

Version:

A simple standard interface for a seed phrase generated set of Novo accounts.

53 lines (52 loc) 1.49 kB
import { SimpleKeyring } from "@paragon-wallet/novo-simple-keyring"; import * as novo from "@paragon-wallet/novocore-lib"; interface DeserializeOption { hdPath?: string; mnemonic?: string; activeIndexes?: number[]; } export declare class HdKeyring extends SimpleKeyring { static type: string; type: string; mnemonic: string; phrase: string; network: "mainnet" | "testnet"; hdPath: string; root: novo.HDPrivateKey; hdWallet?: novo.Mnemonic; wallets: novo.PrivateKey[]; private _index2wallet; activeIndexes: number[]; page: number; perPage: number; constructor(opts: any); serialize(): Promise<DeserializeOption>; deserialize(_opts?: any): Promise<void>; initFromMnemonic(mnemonic: string): void; addAccounts(numberOfAccounts?: number): Promise<string[]>; activeAccounts(indexes: number[]): string[]; getFirstPage(): Promise<{ address: string; index: number; }[]>; getNextPage(): Promise<{ address: string; index: number; }[]>; getPreviousPage(): Promise<{ address: string; index: number; }[]>; getAddresses(start: number, end: number): { address: string; index: number; }[]; __getPage(increment: number): Promise<{ address: string; index: number; }[]>; getAccounts(): Promise<string[]>; getIndexByAddress(address: string): number; private _addressFromIndex; } export {};