@zlattice/lattice-js
Version:
Lattice blockchain TypeScript SDK with dual module support (CJS + ESM)
23 lines • 1.08 kB
TypeScript
import { Interface, ParamType } from "@ethersproject/abi";
/**
* LatticeAbi is a wrapper around the ethers Interface class.
* It provides a more user-friendly API for encoding and decoding function data and event logs.
*/
declare class LatticeAbi {
private iface;
constructor(abiJson: string | string[]);
getInterface(): Interface;
getFunction(name: string): import("@ethersproject/abi").FunctionFragment;
getEvent(name: string): import("@ethersproject/abi").EventFragment;
encodeFunctionData(name: string, args?: any[]): string;
decodeFunctionData(name: string, data: string): import("@ethersproject/abi").Result;
encodeEventLog(name: string, args?: any[]): {
data: string;
topics: Array<string>;
};
decodeEventLog(name: string, data: string): import("@ethersproject/abi").Result;
}
declare function convertArguments(args: ParamType[], params: any[]): any[];
declare function convertArgument(pt: ParamType, param: any): any;
export { convertArguments, convertArgument, LatticeAbi };
//# sourceMappingURL=abi.d.ts.map