UNPKG

chaingate

Version:

A complete TypeScript library for connecting to and making transactions on different blockchains

19 lines (18 loc) 1.32 kB
import { ChainGateClient } from 'chaingate-client'; import { Seed } from '../../entities/Secret/implementations/Seed'; import { ICurrencyWithDerivationPaths } from './CurrencyWithDerivationPaths'; import { AllCurrencies, CurrencyMap, Wallet } from '../../Wallet'; import { CurrencyInfo } from '../../entities/Currency/CurrencyInfo'; import { CurrencyProviders } from '../../entities/Currency/CurrencyProviders'; export declare abstract class HDWallet<DerivationResult, SupportedCurrencies extends AllCurrencies> extends Wallet<SupportedCurrencies> { abstract getSeed(): Promise<Seed>; protected derivationPaths: Map<string, string>; protected derivationResults: Map<string, DerivationResult>; protected constructor(apiClient: ChainGateClient, currencyProviders: CurrencyProviders); protected abstract deriveFromPath(derivationPath: string): Promise<DerivationResult>; protected deriveFromPathUsingCache(derivationPath: string): Promise<DerivationResult>; protected generateAllCurrencyDefaultDerivations(): Promise<void>; protected setDerivationPath(currencyInfo: CurrencyInfo, derivationPath: string): Map<string, string>; protected getDerivationPath(currencyInfo: CurrencyInfo): string; currency<T extends AllCurrencies>(currency: T): CurrencyMap[T] & ICurrencyWithDerivationPaths; }