2019-05-14 18:48:48 -04:00
|
|
|
import { BytesLike } from "@ethersproject/bytes";
|
2020-01-07 19:58:04 -05:00
|
|
|
import { Coder, Reader, Result, Writer } from "./coders/abstract-coder";
|
2019-05-14 18:48:48 -04:00
|
|
|
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;
|
2020-01-07 19:58:04 -05:00
|
|
|
decode(types: Array<string | ParamType>, data: BytesLike): Result;
|
2019-05-14 18:48:48 -04:00
|
|
|
}
|
|
|
|
export declare const defaultAbiCoder: AbiCoder;
|