UNPKG

koinos-rpc

Version:

Typescript library to communicate with Koinos API via RPC

24 lines (23 loc) 963 B
import { Chain } from './service/Chain'; import { BlockStore } from './service/BlockStore'; import { TransactionStore } from './service/TransactionStore'; import { ContractMetaStore } from './service/ContractMetaStore'; import { ServiceMethods } from './types'; import { AccountHistory } from './service/AccountHistory'; interface ClientOptions { timeout?: number; } export declare class Client { readonly chain: Chain; readonly blockStore: BlockStore; readonly transactionStore: TransactionStore; readonly contractMetaStore: ContractMetaStore; readonly accountHistory: AccountHistory; private readonly addresses; private readonly currentAddress; private options; constructor(address: string | string[], options?: ClientOptions); call<Result, Service extends keyof ServiceMethods, Method = ServiceMethods[Service]>(service: Service, method: Method, params?: any): Promise<Result>; private formatError; } export {};