import { type Client } from 'viem'; import type { Address } from 'viem/accounts'; import { type ReadContractErrorType } from 'viem/actions'; import { type DecodeRoleCountsReturnType, registryRoles } from '../../../../utils/v2/index.js'; export type GetRoleCountsParameters = { registryAddress: Address; label: string; }; export type GetRoleCountsReturnType = { decoded: DecodeRoleCountsReturnType; raw: bigint; }; export type GetRoleCountsErrorType = ReadContractErrorType; /** * Gets the registry's role counts for a name's label. * @param client - {@link Client} * @param parameters - {@link GetRoleCountsParameters} * @returns Decoded and raw role counts. {@link GetRoleCountsReturnType} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { addEnsContracts } from '@ensdomains/ensjs' * import { getRoleCounts } from '@ensdomains/ensjs/public/v2' * * const client = createPublicClient({ * chain: addEnsContracts(mainnet), * transport: http(), * }) * const result = await getRoleCounts(client, { registryAddress: '0x0f3eb298470639a96bd548cea4a648bc80b2cee2', label: 'raffy' }) */ export declare function getRoleCounts(client: Client, { registryAddress, label }: GetRoleCountsParameters): Promise; //# sourceMappingURL=getRoleCounts.d.ts.map