import { AuthorizationRequest, Context, Identity, NumberedPortfolio } from '../../internal'; import { AllowIdentityToCreatePortfoliosParams, AttestPrimaryKeyRotationParams, NoArgsProcedureMethod, ProcedureMethod, RegisterDidParams, RegisterIdentityParams, RevokeIdentityToCreatePortfoliosParams, RotatePrimaryKeyParams, RotatePrimaryKeyToSecondaryParams } from '../../types'; /** * Handles all Identity related functionality */ export declare class Identities { private readonly context; /** * @hidden */ constructor(context: Context); /** * Register an Identity * * @deprecated as of chain v8, `createCdd`/`expiry` no longer have any on-chain effect (the * underlying `cdd_register_did`/`cdd_register_did_with_cdd` calls are deprecated and no longer * attach a `CustomerDueDiligence` claim). Use {@link registerDid} instead. * @note the transaction signer must be a DID Registrar * @note this may create {@link AuthorizationRequest | Authorization Requests} which have to be accepted by the `targetAccount`. * An {@link api/entities/Account!Account | Account} or {@link Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}. * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne} * * @note required role: * - DID Registrar */ registerIdentity: ProcedureMethod; /** * Register a new DID for the signing Account * * @throws if the signing Account is already linked to an Identity */ selfRegisterDid: NoArgsProcedureMethod; /** * Register a new DID for the `targetAccount` * * @note the transaction signer must be an active DID Registrar * @note unlike {@link registerIdentity}, this does not support secondary keys or CDD claims * * @throws if the `targetAccount` is already linked to an Identity */ registerDid: ProcedureMethod; /** * Get a DID Registrar's attestation to change primary key * * @note the transaction signer must be a DID Registrar * @note this creates an {@link AuthorizationRequest | Authorization Requests} which have to be accepted by the `targetAccount` along with the authorization for `RotatingPrimaryKey`. * An {@link api/entities/Account!Account | Account} or {@link Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}. * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne} * * @note required role: * - DID Registrar */ attestPrimaryKeyRotation: ProcedureMethod; /** * Creates an Authorization to rotate primary key of the signing Identity by the `targetAccount` * * @note this creates an {@link AuthorizationRequest | Authorization Requests} which have to be accepted by the `targetAccount` * An {@link api/entities/Account!Account | Account} or {@link Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}. * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne} */ rotatePrimaryKey: ProcedureMethod; /** * Creates an Authorization to rotate primary key of the signing Identity to an existing secondary key identified by the `targetAccount` * * @note the given `targetAccount` must be an existing secondaryKey or unlinked to any other Identity * @note this creates an {@link AuthorizationRequest | Authorization Requests} which have to be accepted by the `targetAccount` * An {@link api/entities/Account!Account | Account} or {@link Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}. * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne} * @throws if the given `targetAccount` is linked with another Identity * @throws if the given `targetAccount` is already the primary key of the signing Identity * @throws if the given `targetAccount` already has a pending invitation to become the primary key of the signing Identity */ rotatePrimaryKeyToSecondary: ProcedureMethod; /** * Create a new Portfolio under the ownership of the signing Identity * @note the `ownerDid` is optional. If provided portfolios will be created as Custody Portfolios under the `ownerDid` */ createPortfolio: ProcedureMethod<{ name: string; ownerDid?: string; }, NumberedPortfolio[], NumberedPortfolio>; /** * Creates a set of new Portfolios under the ownership of the signing Identity * @note the `ownerDid` is optional. If provided portfolios will be created as Custody Portfolios under the `ownerDid` */ createPortfolios: ProcedureMethod<{ names: string[]; ownerDid?: string; }, NumberedPortfolio[]>; /** * Create an Identity instance from a DID * * @throws if there is no Identity with the passed DID */ getIdentity(args: { did: string; }): Promise; /** * Return whether the supplied Identity/DID exists */ isIdentityValid(args: { identity: Identity | string; }): Promise; /** * Gives permission to the Identity to create Portfolios on behalf of the signing Identity * * @throws if * - the provided Identity already has permissions to create portfolios for signing Identity * - the provided Identity does not exist */ allowIdentityToCreatePortfolios: ProcedureMethod; /** * Revokes permission from the Identity to create Portfolios on behalf of the signing Identity * * @throws if * - the provided Identity already does not have permissions to create portfolios for signing Identity * - the provided Identity does not exist */ revokeIdentityToCreatePortfolios: ProcedureMethod; /** * Returns a list of allowed custodian did(s) for Identity * @throws if * - the provided Identity does not exist */ getAllowedCustodians(did: string | Identity): Promise; } //# sourceMappingURL=Identities.d.ts.map