import { Writable, Readable } from '@hazae41/binary'; import { Cursor } from '@hazae41/cursor'; import { TextCursor } from '../../libs/cursor/cursor.js'; interface AbiFactory = any> extends Readable { readonly dynamic: boolean; create(create: C): S; fromOrThrow(from: F): S; decodeOrThrow(cursor: TextCursor): S; readOrThrow(cursor: Cursor): S; codegen(): string; } declare namespace AbiFactory { type Create = T extends AbiFactory ? C : never; type Creates = { readonly [I in keyof T]: Create; }; type From = T extends AbiFactory ? F : never; type Froms = { readonly [I in keyof T]: From; }; type Instance = T extends AbiFactory ? I : never; type Instances = { readonly [I in keyof T]: Instance; }; type Into = AbiInstance.Into>; type Intos = { readonly [I in keyof T]: Into; }; type Json = AbiInstance.Json>; type Jsons = { readonly [I in keyof T]: Json; }; } interface AbiInstance extends Writable { readonly dynamic: boolean; intoOrThrow(): I; encodeOrThrow(): string; encodePackedOrThrow(): string; sizeOrThrow(): number; writeOrThrow(cursor: Cursor): void; toJSON(): J; } declare namespace AbiInstance { type Into = T extends AbiInstance ? I : never; type Json = T extends AbiInstance ? J : never; } export { AbiFactory, AbiInstance };