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

17 lines
847 B
TypeScript
Raw Permalink Normal View History

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;
2020-09-07 19:55:52 -04:00
_getReader(data: Uint8Array, allowLoose?: boolean): Reader;
2019-05-14 18:48:48 -04:00
_getWriter(): Writer;
2021-03-30 15:22:45 -04:00
getDefaultValue(types: ReadonlyArray<string | ParamType>): Result;
encode(types: ReadonlyArray<string | ParamType>, values: ReadonlyArray<any>): string;
decode(types: ReadonlyArray<string | ParamType>, data: BytesLike, loose?: boolean): Result;
2019-05-14 18:48:48 -04:00
}
export declare const defaultAbiCoder: AbiCoder;
//# sourceMappingURL=abi-coder.d.ts.map