UNPKG

chaingate

Version:

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

15 lines (14 loc) 709 B
import { GlobalMarketsResponse } from './Client'; import { TtlCache } from './InternalUtils/TtlCache'; import { Client } from '@hey-api/client-fetch'; import { CurrencyModules } from './Currencies/CurrencyModules'; type CurrencyKey = keyof typeof CurrencyModules; type CurrencyUtilsCtor<K extends CurrencyKey> = (typeof CurrencyModules)[K]['utils']; type CurrencyUtilsInst<K extends CurrencyKey> = InstanceType<CurrencyUtilsCtor<K>>; export declare class CurrencyUtilsProvider { private readonly client; private readonly markets; constructor(client: Client, markets: TtlCache<GlobalMarketsResponse>); currency<C extends keyof typeof CurrencyModules>(id: C): CurrencyUtilsInst<C>; } export {};