import { type BytesToHexErrorType, type Hex, type StringToHexErrorType } from 'viem'; import { type ErrorType, UnknownContentTypeError } from '../../errors/utils.js'; import type { Prettify } from '../../types/index.js'; export type AbiEncodeAs = 'json' | 'zlib' | 'cbor' | 'uri'; type AbiContentType = 1 | 2 | 4 | 8; declare const abiEncodeMap: { readonly json: 1; readonly zlib: 2; readonly cbor: 4; readonly uri: 8; }; type AbiEncodeMap = typeof abiEncodeMap; type GetAbiContentType = AbiEncodeMap[encodeAs]; export type EncodeAbiParameters = encodeAs extends 'uri' ? { encodeAs: encodeAs; data: string | null; } : { encodeAs: encodeAs; data: Record | null; }; export type EncodedAbi = { contentType: contentType; encodedData: Hex; }; export type EncodeAbiReturnType = EncodedAbi; export type ContentTypeToEncodeAsErrorType = UnknownContentTypeError; /** * Converts a content type to an encode as * * @throws {ContentTypeToEncodeAsErrorType} * @param contentType - The content type to convert */ export declare const contentTypeToEncodeAs: (contentType: AbiContentType) => AbiEncodeAs; export type EncodeAsToContentTypeErrorType = UnknownContentTypeError; export declare const encodeAsToContentType: (encodeAs: AbiEncodeAs) => AbiContentType; export type EncodeAbiErrorType = UnknownContentTypeError | StringToHexErrorType | BytesToHexErrorType | ErrorType; export declare const encodeAbi: >({ encodeAs, data, }: EncodeAbiParameters) => Promise>>; export {}; //# sourceMappingURL=encodeAbi.d.ts.map