import { Deferrable } from '@ethersproject/properties'; import { OnceBlockable } from '@ethersproject/web'; import { Network } from '../networks'; import { AccountAddress, BlockTag, BlockWithTransactions, CallRequest, EventFilter, Filter, HashValue, ModuleId, MoveStruct, MoveValue, TransactionEventView, TransactionInfoView, TransactionOutput, TransactionRequest, TransactionResponse, U128, U64 } from '../types'; export declare type EventType = string | Array | EventFilter; export declare type Listener = (...args: any[]) => void; export declare abstract class Provider implements OnceBlockable { abstract getNetwork(): Promise; abstract getBlockNumber(): Promise; abstract getGasPrice(): Promise; getBalance(address: AccountAddress | Promise, token?: string, blockTag?: BlockTag | Promise): Promise; getBalances(address: AccountAddress | Promise, blockTag?: BlockTag | Promise): Promise<{ [k: string]: U128; } | undefined>; getSequenceNumber(address: AccountAddress | Promise, blockTag?: BlockTag | Promise): Promise; abstract getCode(moduleId: ModuleId | Promise, blockTag?: BlockTag | Promise): Promise; abstract getResource(address: AccountAddress | Promise, resource_struct_tag: string | Promise, blockTag?: BlockTag | Promise): Promise; abstract getResources(address: AccountAddress | Promise, blockTag?: BlockTag | Promise): Promise<{ [k: string]: MoveStruct; }>; abstract sendTransaction(signedTransaction: string | Promise): Promise; abstract call(transaction: CallRequest | Promise, blockTag?: BlockTag | Promise): Promise>; abstract dryRun(transaction: Deferrable): Promise; abstract getBlock(blockHashOrBlockTag: BlockTag | Promise): Promise; abstract getTransaction(transactionHash: HashValue): Promise; abstract getTransactionInfo(transactionHash: HashValue): Promise; abstract getEventsOfTransaction(transactionHash: HashValue): Promise; abstract getTransactionEvents(filter: Filter): Promise>; abstract on(eventName: EventType, listener: Listener): Provider; abstract once(eventName: EventType, listener: Listener): Provider; abstract emit(eventName: EventType, ...args: Array): boolean; abstract listenerCount(eventName?: EventType): number; abstract listeners(eventName?: EventType): Array; abstract off(eventName: EventType, listener?: Listener): Provider; abstract removeAllListeners(eventName?: EventType): Provider; addListener(eventName: EventType, listener: Listener): Provider; removeListener(eventName: EventType, listener: Listener): Provider; abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; readonly _isProvider: boolean; constructor(); static isProvider(value: any): value is Provider; }