import BigNumber from 'bignumber.js'; import { Context, Identity } from '../../internal'; import { ClaimData, ClaimScope, ClaimTypeInput, CustomClaimType, CustomClaimTypeWithDid, IdentityWithClaims, ModifyClaimsParams, ProcedureMethod, RegisterCustomClaimTypeParams, ResultSet, Scope } from '../../types'; /** * Handles all Claims related functionality */ export declare class Claims { private readonly context; /** * @hidden */ constructor(context: Context); /** * Add claims to Identities * * @note required roles: * - DID Registrar: if there is at least one CDD claim in the arguments */ addClaims: ProcedureMethod, void>; /** * Edit claims associated to Identities (only the expiry date can be modified) * * @note required roles: * - DID Registrar: if there is at least one CDD claim in the arguments */ editClaims: ProcedureMethod, void>; /** * Revoke claims from Identities * * @note a claim can only be revoked by the Identity that issued it */ revokeClaims: ProcedureMethod, void>; /** * Retrieve all claims issued by an Identity * * @param opts.target - Identity (optional, defaults to the signing Identity) * @param opts.includeExpired - whether to include expired claims. Defaults to true * * @note supports pagination * @note uses the middlewareV2 */ getIssuedClaims(opts?: { target?: string | Identity; includeExpired?: boolean; size?: BigNumber; start?: BigNumber; }): Promise>; /** * Retrieve a list of Identities with claims associated to them. Can be filtered using parameters * * @param opts.targets - Identities (or Identity IDs) for which to fetch targeting claims. Defaults to all targets * @param opts.trustedClaimIssuers - Identity IDs of claim issuers. Defaults to all claim issuers * @param opts.scope - scope of the claims to fetch. Defaults to any scope * @param opts.claimTypes - types of the claims to fetch. Defaults to any type * @param opts.includeExpired - whether to include expired claims. Defaults to true * @param opts.size - page size * @param opts.start - page offset * * @note supports pagination * @note uses the middleware V2 */ getIdentitiesWithClaims(opts?: { targets?: (string | Identity)[]; trustedClaimIssuers?: (string | Identity)[]; scope?: Scope; claimTypes?: ClaimTypeInput[]; includeExpired?: boolean; size?: BigNumber; start?: BigNumber; }): Promise>; /** * Retrieve all scopes in which claims have been made for the target Identity. * If the scope is an asset DID, the corresponding ticker is returned as well * * @param opts.target - Identity for which to fetch claim scopes (optional, defaults to the signing Identity) * @note in order for scopes to include scopes for custom claims, middlewareV2 is required */ getClaimScopes(opts?: { target?: string | Identity; }): Promise; /** * @hidden */ private getClaimsFromChain; /** * Retrieve all claims issued about an Identity, grouped by claim issuer * * @param opts.target - Identity for which to fetch targeting claims (optional, defaults to the signing Identity) * @param opts.includeExpired - whether to include expired claims. Defaults to true * * @note supports pagination * @note uses the middlewareV2 (optional) */ getTargetingClaims(opts?: { target?: string | Identity; scope?: Scope; trustedClaimIssuers?: (string | Identity)[]; includeExpired?: boolean; size?: BigNumber; start?: BigNumber; }): Promise>; /** * Creates a custom claim type using the `name` and returns the `id` of the created claim type * * @throws if * - the `name` is longer than allowed * - a custom claim type with the same `name` already exists */ registerCustomClaimType: ProcedureMethod; /** * Retrieves a custom claim type based on its name * * @param name - The name of the custom claim type to retrieve */ getCustomClaimTypeByName(name: string): Promise; /** * Retrieves a custom claim type based on its ID * * @param id - The ID of the custom claim type to retrieve */ getCustomClaimTypeById(id: BigNumber): Promise; /** * Retrieve registered CustomClaimTypes * * @param opts.dids - Fetch CustomClaimTypes issued by the given `dids` * * @note supports pagination * @note uses the middlewareV2 (Required) */ getAllCustomClaimTypes(opts?: { size?: BigNumber; start?: BigNumber; dids?: string[]; }): Promise>; } //# sourceMappingURL=Claims.d.ts.map