import type { Abi, AbiParameter } from 'abitype'; export interface ContractDef { events: EventDef[]; functions: FunctionDef[]; } export interface DocDef { notice?: string; dev?: string; params?: Record; returns?: Record; } /** NatSpec documentation extracted from a compilation artifact's userdoc/devdoc fields. */ export interface NatSpec { userdoc?: { methods?: Record; events?: Record; }; devdoc?: { methods?: Record; returns?: Record; }>; events?: Record; }>; }; } export interface EventDef { name: string; signature: string; topic: string; inputs: FieldDef[]; key: string; typeName: string; docs?: DocDef; } export interface FunctionDef { name: string; signature: string; selector: string; inputs: FieldDef[]; outputs: FieldDef[]; key: string; paramsTypeName: string; returnTypeName: string; docs?: DocDef; } export interface FieldDef { name: string; type: TypeDef; indexed?: boolean; doc?: string; } export type TypeDef = { kind: 'primitive'; name: string; } | { kind: 'array'; item: TypeDef; } | { kind: 'fixedArray'; item: TypeDef; size: number; } | { kind: 'tuple'; fields: FieldDef[]; }; export declare function describe(abi: Abi, natspec?: NatSpec): ContractDef; export declare function canonicalType(p: AbiParameter): string; //# sourceMappingURL=description.d.ts.map