import { type Client, type ClientConfig, type PublicRpcSchema, type Transport } from 'viem'; import type { ChainWithBaseContracts, ChainWithPns } from '../contracts/consts.js'; import type { Prettify } from '../types.js'; import { type PnsPublicActions } from './decorators/public.js'; import { type PnsSubgraphActions } from './decorators/subgraph.js'; export type PnsPublicClientConfig = Pick, 'batch' | 'key' | 'name' | 'pollingInterval' | 'transport'> & { chain: TChain; }; export type PnsPublicClient = Prettify>; /** * Creates a PNS Public Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html). * * @param config - {@link PnsPublicClientConfig} * @returns An PNS Public Client. {@link PnsPublicClient} * * @example * import { http } from 'viem' * import { mainnet } from 'viem/chains' * import { createPnsPublicClient } from '@pnsdomains/pnsjs' * * const client = createPnsPublicClient({ * chain: mainnet, * transport: http(), * }) */ export declare const createPnsPublicClient: ({ batch, chain, key, name, transport, pollingInterval, }: PnsPublicClientConfig) => { account: undefined; batch?: { multicall?: boolean | { batchSize?: number | undefined; wait?: number | undefined; } | undefined; } | undefined; cacheTime: number; ccipRead?: false | { request?: ((parameters: import("viem").CcipRequestParameters) => Promise<`0x${string}`>) | undefined; } | undefined; chain: ChainWithPns; key: string; name: string; pollingInterval: number; request: import("viem").EIP1193RequestFn; transport: ReturnType["config"] & ReturnType["value"]; type: string; uid: string; pnsBatch: (...parameters: TBatchFunctions) => Promise>; getAbiRecord: ({ name, gatewayUrls, strict, supportedContentTypes, }: { name: string; supportedContentTypes?: bigint | undefined; strict?: boolean | undefined; gatewayUrls?: string[] | undefined; }) => Promise; getAddressRecord: ({ name, coin, bypassFormat, gatewayUrls, strict, }: { name: string; coin?: string | number | undefined; bypassFormat?: boolean | undefined; strict?: boolean | undefined; gatewayUrls?: string[] | undefined; }) => Promise; getAvailable: ({ name, }: import("../public.js").GetAvailableParameters) => Promise; getContentHashRecord: ({ name, gatewayUrls, strict, }: { name: string; strict?: boolean | undefined; gatewayUrls?: string[] | undefined; }) => Promise; getExpiry: ({ name, contract, }: { name: string; contract?: ("registrar" | "nameWrapper") | undefined; }) => Promise; getName: ({ address, allowMismatch, gatewayUrls, strict, }: import("../public.js").GetNameParameters) => Promise; getOwner: ({ name, contract, }: import("../public.js").GetOwnerParameters) => Promise; getPrice: ({ nameOrNames, duration, }: import("../public.js").GetPriceParameters) => Promise; getRecords: ({ name, texts, coins, contentHash, abi, resolver, gatewayUrls, }: import("../public.js").GetRecordsParameters) => Promise<(TContentHash extends true ? { contentHash: import("../public.js").InternalGetContentHashReturnType; } : {}) & (TAbi extends true ? { abi: import("../public.js").InternalGetAbiReturnType; } : {}) & (TTexts extends readonly string[] ? { texts: import("../types.js").DecodedText[]; } : {}) & (TCoins extends readonly (string | number)[] ? { coins: import("../types.js").DecodedAddr[]; } : {}) & { resolverAddress: `0x${string}`; } extends infer T ? { [K in keyof T]: ((TContentHash extends true ? { contentHash: import("../public.js").InternalGetContentHashReturnType; } : {}) & (TAbi extends true ? { abi: import("../public.js").InternalGetAbiReturnType; } : {}) & (TTexts extends readonly string[] ? { texts: import("../types.js").DecodedText[]; } : {}) & (TCoins extends readonly (string | number)[] ? { coins: import("../types.js").DecodedAddr[]; } : {}) & { resolverAddress: `0x${string}`; })[K]; } : never>; getResolver: ({ name, }: import("../public.js").GetResolverParameters) => Promise; getTextRecord: ({ name, key, gatewayUrls, strict, }: { name: string; key: string; strict?: boolean | undefined; gatewayUrls?: string[] | undefined; }) => Promise; getWrapperData: ({ name, }: import("../public.js").GetWrapperDataParameters) => Promise; getWrapperName: ({ name, }: import("../functions/public/getWrapperName.js").GetWrapperNameParameters) => Promise; getDecodedName: ({ name, allowIncomplete, }: import("../subgraph.js").GetDecodedNameParameters) => Promise; getNameHistory: ({ name, }: import("../subgraph.js").GetNameHistoryParameters) => Promise; getNamesForAddress: ({ address, filter, orderBy, orderDirection, pageSize, previousPage, }: import("../subgraph.js").GetNamesForAddressParameters) => Promise; getSubgraphRecords: ({ name, resolverAddress, }: import("../subgraph.js").GetSubgraphRecordsParameters) => Promise; getSubgraphRegistrant: ({ name, }: import("../subgraph.js").GetSubgraphRegistrantParameters) => Promise; getSubnames: ({ name, searchString, allowExpired, allowDeleted, orderBy, orderDirection, pageSize, previousPage, }: import("../subgraph.js").GetSubnamesParameters) => Promise; getReferralBlacklists: ({}: import("../subgraph.js").GetReferralBlacklistsParameters) => Promise; getReferralStats: ({ address, }: import("../subgraph.js").GetReferralStatsParameters) => Promise; getGracePeriodNames: ({}: import("../subgraph.js").GetGracePeriodNamesParameters) => Promise; extend: , undefined>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: Client, undefined, PublicRpcSchema, PnsPublicActions & PnsSubgraphActions>) => client) => Client, undefined, PublicRpcSchema, { [K_1 in keyof client]: client[K_1]; } & PnsPublicActions & PnsSubgraphActions>; }; //# sourceMappingURL=public.d.ts.map