import type { ClientWithPns } from '../../contracts/consts.js'; import { type Name } from './utils.js'; type GetGracePeriodNamesOrderBy = 'expiryDate' | 'name' | 'labelName' | 'createdAt'; type GetGracePeriodNamesRelation = { /** Names with registrant as address (default: true) */ registrant?: boolean; /** Names with owner as address (default: true) */ owner?: boolean; /** Names with wrapped owner as address (default: true) */ wrappedOwner?: boolean; /** Names with matching resolving address (default: true) */ resolvedAddress?: boolean; }; type GetGracePeriodNamesFilter = GetGracePeriodNamesRelation & { /** Search string filter for name */ searchString?: string; /** Search string filter type (default: `labelName`) */ searchType?: 'labelName' | 'name'; /** Allows reverse record nodes to be included (default: false) */ allowReverseRecord?: boolean; /** Allows deleted names to be included (default: false) */ allowDeleted?: boolean; /** Allows expires/expired names or both to be included (default: all) */ status?: 'expired' | 'expires' | 'all'; }; export type GetGracePeriodNamesParameters = { /** Names to get, in relation to address */ filter?: GetGracePeriodNamesFilter; /** Parameter to order names by (default: name) */ orderBy?: GetGracePeriodNamesOrderBy; /** Direction to order names in (default: asc) */ orderDirection?: 'asc' | 'desc'; /** Previous page of names, used for pagination */ previousPage?: NameWithRelation[]; /** Page size (default: 100) */ pageSize?: number; }; export type NameWithRelation = Name & { relation: GetGracePeriodNamesRelation; }; export type GetGracePeriodNamesReturnType = NameWithRelation[]; /** * Gets the names for an address from the subgraph. * @param client - {@link ClientWithPns} * @param parameters - {@link GetGracePeriodNamesParameters} * @returns Name array. {@link GetGracePeriodNamesReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addPnsContracts } from '@pnsdomains/pnsjs' * import { getGracePeriodNames } from '@pnsdomains/pnsjs/subgraph' * * const client = createPublicClient({ * chain: addPnsContracts(mainnet), * transport: http(), * }) * const result = await getGracePeriodNames(client) */ declare const getGracePeriodNames: (client: ClientWithPns, { filter: _filter, orderBy, orderDirection, pageSize, previousPage, }: GetGracePeriodNamesParameters) => Promise; export default getGracePeriodNames; //# sourceMappingURL=getGracePeriodNames.d.ts.map