import { type Address } from 'viem'; import type { ClientWithPns } from '../../contracts/consts.js'; export type GetSubgraphRegistrantParameters = { /** Name to get registrant for */ name: string; }; export type GetSubgraphRegistrantReturnType = Address | null; /** * Gets the name registrant from the subgraph. * @param client - {@link ClientWithPns} * @param parameters - {@link GetSubgraphRegistrantParameters} * @returns Registrant address, or null if name was not found. {@link GetSubgraphRegistrantReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addPnsContracts } from '@pnsdomains/pnsjs' * import { getSubgraphRegistrant } from '@pnsdomains/pnsjs/subgraph' * * const client = createPublicClient({ * chain: addPnsContracts(mainnet), * transport: http(), * }) * const result = await getSubgraphRegistrant(client, { name: 'pns.pls' }) * // 0xb6E040C9ECAaE172a89bD561c5F73e1C48d28cd9 */ declare const getSubgraphRegistrant: (client: ClientWithPns, { name }: GetSubgraphRegistrantParameters) => Promise; export default getSubgraphRegistrant; //# sourceMappingURL=getSubgraphRegistrant.d.ts.map