chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
82 lines (81 loc) • 4.47 kB
TypeScript
import { Seed } from '../../entities/Secret/implementations/Seed';
import { Wallet } from '../../Wallet';
import { Transports } from '../../../Currencies/CurrencyWallet/Transports';
import { AllCurrencies, CurrencyModules } from '../../../Currencies/CurrencyModules';
import { Client } from '@hey-api/client-fetch';
import { TtlCache } from '../../../InternalUtils/TtlCache';
import { GlobalMarketsResponse } from '../../../Client';
export type WalletOf<C extends keyof typeof CurrencyModules> = InstanceType<(typeof CurrencyModules)[C]['wallet']>;
export declare abstract class HDWallet<DerivationResult, SupportedCurrencies extends (typeof AllCurrencies)[number]> extends Wallet<SupportedCurrencies> {
abstract getSeed(): Promise<Seed>;
protected derivationPaths: Map<string, string>;
protected derivationResults: Map<string, DerivationResult>;
protected constructor(client: Client, transports: Transports, markets: TtlCache<GlobalMarketsResponse>);
protected abstract deriveFromPath(derivationPath: string): Promise<DerivationResult>;
protected deriveFromPathUsingCache(derivationPath: string): Promise<DerivationResult>;
protected generateAllCurrencyDefaultDerivations(): Promise<void>;
protected setDerivationPath<C extends SupportedCurrencies>(id: C, derivationPath: string): Map<string, string>;
protected getDerivationPath<C extends SupportedCurrencies>(id: C): string;
currency<C extends SupportedCurrencies>(id: C): InstanceType<{
readonly bitcoin: {
readonly info: import("../../..").CurrencyInfo;
readonly utils: typeof import("../../..").BitcoinUtils;
readonly wallet: typeof import("../../..").BitcoinWallet;
};
readonly bitcoinTestnet: {
readonly info: import("../../..").CurrencyInfo;
readonly utils: typeof import("../../..").BitcoinTestnetUtils;
readonly wallet: typeof import("../../..").BitcoinTestnetWallet;
};
readonly litecoin: {
readonly info: import("../../..").CurrencyInfo;
readonly utils: typeof import("../../..").LitecoinUtils;
readonly wallet: typeof import("../../..").LitecoinWallet;
};
readonly dogecoin: {
readonly info: import("../../..").CurrencyInfo;
readonly utils: typeof import("../../..").DogecoinUtils;
readonly wallet: typeof import("../../..").DogecoinWallet;
};
readonly bitcoinCash: {
readonly info: import("../../..").CurrencyInfo;
readonly utils: typeof import("../../..").BitcoinCashUtils;
readonly wallet: typeof import("../../..").BitcoinCashWallet;
};
readonly ethereum: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").EthereumUtils;
readonly wallet: typeof import("../../..").EthereumWallet;
};
readonly arbitrum: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").ArbitrumUtils;
readonly wallet: typeof import("../../..").ArbitrumWallet;
};
readonly avalanche: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").AvalancheUtils;
readonly wallet: typeof import("../../..").AvalancheWallet;
};
readonly base: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").BaseUtils;
readonly wallet: typeof import("../../..").BaseWallet;
};
readonly bnbChain: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").BnbUtils;
readonly wallet: typeof import("../../..").BnbWallet;
};
readonly fantom: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").FantomUtils;
readonly wallet: typeof import("../../..").FantomWallet;
};
readonly polygon: {
readonly info: import("../../..").EvmCurrencyInfo;
readonly utils: typeof import("../../..").PolygonUtils;
readonly wallet: typeof import("../../..").PolygonWallet;
};
}[C]["wallet"]> & import("./CurrencyWithDerivationPaths").ICurrencyWithDerivationPaths;
}