ethers.js/packages/abi/lib.esm/abi-coder.d.ts

16 lines
663 B
TypeScript
Raw Normal View History

2019-05-15 01:48:48 +03:00
import { BytesLike } from "@ethersproject/bytes";
import { Coder, Reader, Writer } from "./coders/abstract-coder";
import { ParamType } from "./fragments";
export declare type CoerceFunc = (type: string, value: any) => any;
export declare class AbiCoder {
readonly coerceFunc: CoerceFunc;
constructor(coerceFunc?: CoerceFunc);
_getCoder(param: ParamType): Coder;
_getWordSize(): number;
_getReader(data: Uint8Array): Reader;
_getWriter(): Writer;
encode(types: Array<string | ParamType>, values: Array<any>): string;
decode(types: Array<string | ParamType>, data: BytesLike): any;
}
export declare const defaultAbiCoder: AbiCoder;