import { BaseError, type Hex } from 'viem'; import type { ClientWithPns } from '../../contracts/consts.js'; import type { GenericPassthrough, TransactionRequestWithPassthrough } from '../../types.js'; import { type GeneratedFunction } from '../../utils/generateFunction.js'; export type GetWrapperNameParameters = { /** Name with unknown labels, e.g. "[4ca938ec1b323ca71c4fb47a712abb68cce1cabf39ea4d6789e42fbc1f95459b].pls" */ name: string; }; export type GetWrapperNameReturnType = string | null; declare const encode: (client: ClientWithPns, { name }: GetWrapperNameParameters) => TransactionRequestWithPassthrough; declare const decode: (_client: ClientWithPns, data: Hex | BaseError, passthrough: GenericPassthrough) => Promise; type BatchableFunctionObject = GeneratedFunction; /** * Gets the full name for a name with unknown labels from the NameWrapper. * @param client - {@link ClientWithPns} * @param parameters - {@link GetWrapperNameParameters} * @returns Full name, or null if name was not found. {@link GetWrapperNameReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addPnsContracts } from '@pnsdomains/pnsjs' * import { getWrapperName } from '@pnsdomains/pnsjs/public' * * const client = createPublicClient({ * chain: addPnsContracts(mainnet), * transport: http(), * }) * const result = await getWrapperName(client, { name: '[4ca938ec1b323ca71c4fb47a712abb68cce1cabf39ea4d6789e42fbc1f95459b].pls' }) * // wrapped.pls */ declare const getWrapperName: ((client: ClientWithPns, { name }: GetWrapperNameParameters) => Promise) & BatchableFunctionObject; export default getWrapperName; //# sourceMappingURL=getWrapperName.d.ts.map