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 InternalGetAddrParameters, type InternalGetAddrReturnType } from './_getAddr.js'; export type GetAddressRecordParameters = Prettify; export type GetAddressRecordReturnType = Prettify; declare const encode: (client: ClientWithEns, { name, coin, gatewayUrls, }: Omit) => SimpleTransactionRequest; declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { coin, strict, gatewayUrls, }: Pick) => Promise; type BatchableFunctionObject = GeneratedFunction; /** * Gets an address record for a name and specified coin * @param client - {@link ClientWithEns} * @param parameters - {@link GetAddressRecordParameters} * @returns Coin value object, or `null` if not found. {@link GetAddressRecordReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addEnsContracts } from '@etn-sc/ensjs' * import { getAddressRecord } from '@etn-sc/ensjs/public' * * const client = createPublicClient({ * chain: addEnsContracts(mainnet), * transport: http(), * }) * const result = await getAddressRecord(client, { name: 'ens.eth', coin: 'ETH' }) * // { id: 60, name: 'ETH , value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' } */ declare const getAddressRecord: ((client: ClientWithEns, { name, coin, bypassFormat, strict, gatewayUrls }: GetAddressRecordParameters) => Promise) & BatchableFunctionObject; export default getAddressRecord;