import { type Address, type BaseError, type Hex } from 'viem'; import type { ClientWithEns } from '../../contracts/consts.js'; import type { SimpleTransactionRequest, TransactionRequestWithPassthrough } from '../../types.js'; export type GetSupportedInterfacesParameters = { address: Address; interfaces: TInterfaces; }; export type GetSupportedInterfacesReturnType = { -readonly [K in keyof TInterfaces]: boolean; }; declare const encode: (client: ClientWithEns, { address, interfaces }: GetSupportedInterfacesParameters) => TransactionRequestWithPassthrough; declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: SimpleTransactionRequest[]) => Promise>; type EncoderFunction = typeof encode; type DecoderFunction = typeof decode; type BatchableFunctionObject = { encode: EncoderFunction; decode: DecoderFunction; batch: >(args: TParams) => { args: [TParams]; encode: EncoderFunction; decode: typeof decode; }; }; /** * Gets the supported interfaces for any contract address. * @param client - {@link ClientWithEns} * @param parameters - {@link GetSupportedInterfacesParameters} * @returns Array of booleans matching the input array {@link GetSupportedInterfacesReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addEnsContracts } from '@etn-sc/ensjs' * import { getSupportedInterfaces } from '@etn-sc/ensjs/public' * * const client = createPublicClient({ * chain: addEnsContracts(mainnet), * transport: http(), * }) * const result = await getSupportedInterfaces(client, { * address: '0x58774Bb8acD458A640aF0B88238369A167546ef2', * interfaces: ['0x2f435428', '0x23b872dd'], * }) * // [true, false] */ declare const getSupportedInterfaces: ((client: ClientWithEns, { address, interfaces }: GetSupportedInterfacesParameters) => Promise>) & BatchableFunctionObject; export default getSupportedInterfaces;