import { GraphQLFieldConfigMap, GraphQLInputFieldConfigMap } from "graphql"; import type { Abi } from "./blockchain/get_abi.js"; interface BaseFieldInfo { object: boolean; optional: boolean; list: boolean; binary_ex: boolean; variant: boolean; } interface ASTField { name: string; type: string; $info: BaseFieldInfo; } interface ABIField { name: string; type: string; } interface ABIStruct { name: string; base?: string; fields: ABIField[]; } interface ABIAction { name: string; type: string; ricardian_contract?: string; } export interface ABI { version: string; tables: { name: string; type: string; }[]; actions: ABIAction[]; structs: ABIStruct[]; types?: any[]; variants?: any[]; } /** * Generate an Abstract syntax tree (AST) for an EOSIO application Binary interface (ABI). * @param abi EOSIO smart contract Application Binary interface (ABI). * @returns a GraphQL AST for a given smart contract. */ export declare function abi_to_graphql_ast(abi: ABI): Readonly>; /** * Generates GraphQL query and mutation fields from an ABI AST. * @param AST Abstract syntax tree generated by abi_to_graphql_ast function. * @param ABI Antelope application binary interface (ABI). * @param account_name Blockchain account name. * @param chainName Optional chain name. * @returns GraphQL query and mutation fields. */ export declare function get_graphql_fields_from_AST(AST: Readonly>, ABI: Abi, account_name?: string, chainName?: string): { query_fields: GraphQLFieldConfigMap; mutation_fields: GraphQLInputFieldConfigMap; }; export {};