import { BaseError, type Address, type Hex } from 'viem'; import type { ClientWithPns } from '../../contracts/consts.js'; import type { DateWithValue, GenericPassthrough, Prettify, TransactionRequestWithPassthrough } from '../../types.js'; import { type DecodedFuses } from '../../utils/fuses.js'; import { type GeneratedFunction } from '../../utils/generateFunction.js'; export type GetWrapperDataParameters = { /** Name to get wrapper data for */ name: string; }; export type GetWrapperDataReturnType = Prettify<{ /** Fuse object */ fuses: DecodedFuses & { value: number; }; /** Expiry of the name */ expiry: DateWithValue | null; /** Owner of the name */ owner: Address; } | null>; declare const encode: (client: ClientWithPns, { name }: GetWrapperDataParameters) => TransactionRequestWithPassthrough; declare const decode: (_client: ClientWithPns, data: Hex | BaseError, passthrough: GenericPassthrough) => Promise; type BatchableFunctionObject = GeneratedFunction; /** * Gets the wrapper data for a name. * @param client - {@link ClientWithPns} * @param parameters - {@link GetWrapperDataParameters} * @returns Wrapper data object, or null if name is not wrapped. {@link GetWrapperDataReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addPnsContracts } from '@pnsdomains/pnsjs' * import { getWrapperData } from '@pnsdomains/pnsjs/public' * * const client = createPublicClient({ * chain: addPnsContracts(mainnet), * transport: http(), * }) * const result = await getWrapperData(client, { name: 'ilikelasagna.pls' }) */ declare const getWrapperData: ((client: ClientWithPns, { name }: GetWrapperDataParameters) => Promise) & BatchableFunctionObject; export default getWrapperData; //# sourceMappingURL=getWrapperData.d.ts.map