import { BigNumber } from '../utils/bignumber'; import { BigNumberish } from '../utils/bignumber'; import { EventFragment, FunctionFragment, ParamType } from '../utils/abi-coder'; export interface Indexed { readonly hash: string; } export interface DeployDescription { readonly inputs: Array; readonly payable: boolean; encode(bytecode: string, params: Array): string; } export interface FunctionDescription { readonly type: "call" | "transaction"; readonly name: string; readonly signature: string; readonly sighash: string; readonly inputs: Array; readonly outputs: Array; readonly payable: boolean; readonly gas: BigNumber; encode(params: Array): string; decode(data: string): any; } export interface EventDescription { readonly name: string; readonly signature: string; readonly inputs: Array; readonly anonymous: boolean; readonly topic: string; encodeTopics(params: Array): Array; decode(data: string, topics?: Array): any; } export interface LogDescription { readonly decode: (data: string, topics: Array) => any; readonly name: string; readonly signature: string; readonly topic: string; readonly values: any; } export interface TransactionDescription { readonly name: string; readonly args: Array; readonly signature: string; readonly sighash: string; readonly decode: (data: string) => any; readonly value: BigNumber; } declare class Description { constructor(info: any); } declare class _DeployDescription extends Description implements DeployDescription { readonly inputs: Array; readonly payable: boolean; encode(bytecode: string, params: Array): string; } declare class _FunctionDescription extends Description implements FunctionDescription { readonly type: "call" | "transaction"; readonly name: string; readonly signature: string; readonly sighash: string; readonly inputs: Array; readonly outputs: Array; readonly payable: boolean; readonly gas: BigNumber; encode(params: Array): string; decode(data: string): any; } declare class _EventDescription extends Description implements EventDescription { readonly name: string; readonly signature: string; readonly inputs: Array; readonly anonymous: boolean; readonly topic: string; encodeTopics(params: Array): Array; decode(data: string, topics?: Array): any; } declare class _TransactionDescription extends Description implements TransactionDescription { readonly name: string; readonly args: Array; readonly signature: string; readonly sighash: string; readonly decode: (data: string) => any; readonly value: BigNumber; } declare class _LogDescription extends Description implements LogDescription { readonly name: string; readonly signature: string; readonly topic: string; readonly decode: (data: string, topics: Array) => any; readonly values: any; } export declare class Interface { readonly abi: Array; readonly functions: { [name: string]: _FunctionDescription; }; readonly events: { [name: string]: _EventDescription; }; readonly deployFunction: _DeployDescription; constructor(abi: Array | string); parseTransaction(tx: { data: string; value?: BigNumberish; }): _TransactionDescription; parseLog(log: { topics: Array; data: string; }): _LogDescription; static isInterface(value: any): value is Interface; static isIndexed(value: any): value is Indexed; } export {};