import { publicResolverAbiSnippet } from '@ensdomains/ensjs-abi/v1/publicResolver'; import { type DecodeFunctionResultErrorType, type Hex, type HexToBytesErrorType, type HexToStringErrorType, type NamehashErrorType, type TrimErrorType } from 'viem'; import type { ErrorType } from '../../errors/utils.js'; import type { DecodedAbi, Prettify } from '../../types/index.js'; /** @deprecated */ export type GetAbiParameters = { /** Name to get ABI record for */ name: string; /** Supported content types as bitwise * ID 1: JSON * ID 2: zlib compressed JSON * ID 4: CBOR * ID 8: URI */ supportedContentTypes?: bigint | undefined; /** Whether or not to throw decoding errors */ strict?: boolean | undefined; }; /** * @deprecated */ export type GetAbiReturnType = Prettify; /** * @deprecated */ export type GetAbiErrorType = Error; export type GetAbiParametersParameters = { /** Name to get ABI record for */ name: string; /** Supported content types as bitwise * ID 1: JSON * ID 2: zlib compressed JSON * ID 4: CBOR * ID 8: URI */ supportedContentTypes?: bigint | undefined; }; export type GetAbiParametersReturnType = { abi: typeof publicResolverAbiSnippet; functionName: 'ABI'; args: readonly [Hex, bigint]; }; export type GetAbiParametersErrorType = NamehashErrorType; export declare function getAbiParameters({ name, supportedContentTypes, }: GetAbiParametersParameters): GetAbiParametersReturnType; export type DecodeAbiResultFromPrimitiveTypesParameters = { decodedData: readonly [bigint, Hex]; }; export type DecodeAbiResultFromPrimitiveTypesReturnType = Prettify; export type DecodeAbiResultFromPrimitiveTypesErrorType = TrimErrorType | HexToStringErrorType | HexToBytesErrorType | ErrorType; export declare function decodeAbiResultFromPrimitiveTypes({ decodedData: [bigintContentType, encodedAbiData], }: DecodeAbiResultFromPrimitiveTypesParameters): Promise; export type DecodeAbiResultParameters = { /** Whether or not to throw decoding errors */ strict?: boolean | undefined; }; export type DecodeAbiResultReturnType = Prettify; export type DecodeAbiResultErrorType = DecodeFunctionResultErrorType; /** * Decodes an ABI result from a hex string. * @param data - The hex string to decode. * @param strict - Whether or not to throw decoding errors. * @throws {DecodeAbiResultErrorType} * @returns The decoded ABI result. */ export declare function decodeAbiResult(data: Hex, { strict }: DecodeAbiResultParameters): Promise; //# sourceMappingURL=getAbi.d.ts.map