import { ChainType, ChainId } from './chain'; export interface ErrorMsg { name?: string; code?: number; message?: string; } export type SendOptions = { from?: string; gasPrice?: string; gas?: number; value?: number | string; nonce?: number; /** * transactionHash: The transaction is committed without confirmation * receipt: The transaction has been confirmed and returns receipt */ onMethod?: 'transactionHash' | 'receipt' | 'confirmation'; appendParams?: any; }; export type CallOptions = { defaultBlock?: number | string; options?: any; callback?: any; appendParams?: any; }; export interface ViewResult { data?: T; error?: ErrorMsg; } export interface SendResult extends ViewResult { transactionId?: string; } export interface IContract { address?: string; chainId?: ChainId; type: ChainType; callViewMethod(functionName: string, paramsOption?: any, callOptions?: CallOptions): Promise>; callSendMethod(functionName: string, account: string, paramsOption?: any, sendOptions?: SendOptions): Promise>; } export type ICallViewMethod = (functionName: string, paramsOption?: any, callOptions?: { defaultBlock: number | string; options?: any; callback?: any; }) => Promise; export type ICallSendMethod = (functionName: string, account: string, paramsOption?: any, sendOptions?: SendOptions) => Promise; //# sourceMappingURL=contract.d.ts.map