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

16 lines
713 B
TypeScript
Raw Normal View History

2019-05-15 01:48:48 +03:00
import { BytesLike } from "@ethersproject/bytes";
2020-01-08 03:58:04 +03:00
import { Coder, Reader, Result, Writer } from "./coders/abstract-coder";
2019-05-15 01:48:48 +03: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;
2020-09-08 02:55:52 +03:00
_getReader(data: Uint8Array, allowLoose?: boolean): Reader;
2019-05-15 01:48:48 +03:00
_getWriter(): Writer;
encode(types: Array<string | ParamType>, values: Array<any>): string;
2020-09-08 02:55:52 +03:00
decode(types: Array<string | ParamType>, data: BytesLike, loose?: boolean): Result;
2019-05-15 01:48:48 +03:00
}
export declare const defaultAbiCoder: AbiCoder;