import type { BaseError, Hex } from 'viem'; import type { ClientWithEns } from '../../contracts/consts.js'; import type { GenericPassthrough, Prettify, SimpleTransactionRequest } from '../../types.js'; import { type GeneratedFunction } from '../../utils/generateFunction.js'; import { type InternalGetAbiParameters, type InternalGetAbiReturnType } from './_getAbi.js'; export type GetAbiRecordParameters = Prettify; export type GetAbiRecordReturnType = Prettify; declare const encode: (client: ClientWithEns, { name, supportedContentTypes, gatewayUrls, }: Omit) => SimpleTransactionRequest; declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { strict, gatewayUrls, }: Pick) => Promise; type BatchableFunctionObject = GeneratedFunction; /** * Gets the ABI record for a name * @param client - {@link ClientWithEns} * @param parameters - {@link GetAbiRecordParameters} * @returns ABI record for the name, or `null` if not found. {@link GetAbiRecordReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addEnsContracts } from '@etn-sc/ensjs' * import { getAbiRecord } from '@etn-sc/ensjs/public' * * const client = createPublicClient({ * chain: addEnsContracts(mainnet), * transport: http(), * }) * const result = await getAbiRecord(client, { name: 'ens.eth' }) * // TODO: real example */ declare const getAbiRecord: ((client: ClientWithEns, { name, strict, gatewayUrls, supportedContentTypes }: GetAbiRecordParameters) => Promise) & BatchableFunctionObject; export default getAbiRecord;