UNPKG

tnb-hd-wallet

Version:

A hd wallet that derives public and private keys from a 12 word mnemonic phrase with support

43 lines (42 loc) 1.45 kB
/// <reference types="node" /> import { Address, CoinDetails, Curve, Path } from "../models"; export declare class BaseHdWallet { readonly mnemonic: string | null; readonly seed: string | Buffer; readonly cryptocurrency: string | null; readonly purpose: number; readonly coinType: number; readonly curve: keyof typeof Curve; readonly masterKey: Address; private slip10; protected _addressGapLimit: number; constructor(mnemonicOrSeed: string, coinDetails: CoinDetails | string, configOptions?: any); set addressGapLimit(gapLimit: number); get addressGapLimit(): number; /** * Takes in an account and address index and returns its derivatiion path * * @param accountIndex The account location for the path * * @param addressIndex The last */ getPath: (accountIndex: number, addressIndex?: number, isInternalChain?: boolean) => Path; /** * Gets an address object from a specified path * * @param path The derivation path * * @returns an address object containing all the derived keys */ getAddressFromPath(path: Path): Address; /** * Gets an address object from a specified account and address index * * @param accountIndex * * @param addressIndex * * @returns an address object containing all the derived keys */ getAddress(accountIndex: number, addressIndex?: number): Address; }