import type { ABISerializableObject } from "../serializer/Serializable.js";
import { ABIDecoder } from "../serializer/Decoder.js";
import { ABIEncoder } from "../serializer/Encoder.js";
import { Blob } from "./Blob.js";
import { NameType } from "./Name.js";
export type ABIDef = string | Partial<ABI.Def> | ABI | Blob;
export declare class ABI implements ABISerializableObject {
    static abiName: string;
    static version: string;
    version: string;
    types: ABI.TypeDef[];
    variants: ABI.Variant[];
    structs: ABI.Struct[];
    actions: ABI.Action[];
    tables: ABI.Table[];
    ricardian_clauses: ABI.Clause[];
    action_results: ABI.ActionResult[];
    enums: ABI.Enum[];
    constructor(args: Partial<ABI.Def>);
    static from(value: ABIDef): ABI;
    static fromABI(decoder: ABIDecoder): ABI;
    toABI(encoder: ABIEncoder): void;
    private static assertUint16;
    private static readUint16LE;
    private static writeUint16LE;
    resolveType(name: string): ABI.ResolvedType;
    resolveAll(): {
        types: ABI.ResolvedType[];
        variants: ABI.ResolvedType[];
        structs: ABI.ResolvedType[];
        enums: ABI.ResolvedType[];
    };
    private resolve;
    getStruct(name: string): ABI.Struct | undefined;
    getVariant(name: string): ABI.Variant | undefined;
    getEnum(name: string): ABI.Enum | undefined;
    /** Return arguments type of an action in this ABI. */
    getActionType(actionName: NameType): string | undefined;
    equals(other: ABIDef): boolean;
    toJSON(): {
        version: string;
        types: ABI.TypeDef[];
        structs: ABI.Struct[];
        actions: ABI.Action[];
        tables: ABI.Table[];
        ricardian_clauses: ABI.Clause[];
        error_messages: any[];
        abi_extensions: any[];
        variants: ABI.Variant[];
        action_results: ABI.ActionResult[];
        enums: ABI.Enum[];
    };
}
export declare namespace ABI {
    interface TypeDef {
        new_type_name: string;
        type: string;
    }
    interface Field {
        name: string;
        type: string;
    }
    interface Struct {
        name: string;
        base: string;
        fields: Field[];
    }
    interface Action {
        name: NameType;
        type: string;
        ricardian_contract: string;
    }
    interface Index {
        name: string;
        key_type: string;
        /** uint16 DJB2(name) % 65536; always present in on-chain ABIs,
         *  defaults to 0 on encode when omitted from a hand-built ABI. */
        table_id?: number;
    }
    interface Table {
        name: string;
        index_type: string;
        key_names: string[];
        key_types: string[];
        type: string;
        table_id?: number;
        secondary_indexes?: Index[];
    }
    interface Clause {
        id: string;
        body: string;
    }
    interface Variant {
        name: string;
        types: string[];
    }
    interface Def {
        version: string;
        types: TypeDef[];
        variants: Variant[];
        structs: Struct[];
        actions: Action[];
        tables: Table[];
        ricardian_clauses: Clause[];
        action_results: ActionResult[];
        enums: Enum[];
    }
    interface ActionResult {
        name: NameType;
        result_type: string;
    }
    interface EnumValue {
        name: string;
        value: number;
    }
    interface Enum {
        name: string;
        type: string;
        values: EnumValue[];
    }
    class ResolvedType {
        name: string;
        id: number;
        isArray: boolean;
        isOptional: boolean;
        isExtension: boolean;
        base?: ResolvedType;
        fields?: {
            name: string;
            type: ResolvedType;
        }[];
        variant?: ResolvedType[];
        ref?: ResolvedType;
        enum?: {
            type: string;
            values: EnumValue[];
        };
        constructor(fullName: string, id?: number);
        /**
         * Type name including suffixes: [] array, ? optional, $ binary ext
         */
        get typeName(): string;
        /** All fields including base struct(s), undefined if not a struct type. */
        get allFields(): {
            name: string;
            type: ResolvedType;
        }[];
    }
}
//# sourceMappingURL=Abi.d.ts.map