Skip to main content
Version: 23.2.x

Class: Identities

api/client/Identities.Identities

Handles all Identity related functionality

Methods

attestPrimaryKeyRotation

attestPrimaryKeyRotation(args, opts?): Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>

Get CDD Provider's attestation to change primary key

Parameters

NameType
argsAttestPrimaryKeyRotationParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>

Note

the transaction signer must be a CDD provider

Note

this creates an Authorization Requests which have to be accepted by the targetAccount along with the authorization for RotatingPrimaryKey. An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived. Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne

Note

required role:

  • Customer Due Diligence Provider

Note

this method is of type ProcedureMethod, which means you can call attestPrimaryKeyRotation.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Identities.ts:116


createChild

createChild(args, opts?): Promise<GenericPolymeshTransaction<ChildIdentity, ChildIdentity>>

Creates a child identity and makes the secondaryKey as the primary key of the child identity

Parameters

NameType
argsCreateChildIdentityParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<ChildIdentity, ChildIdentity>>

Note

the given secondaryKey is removed as secondary key from the signing Identity

Throws

if

  • the transaction signer is not the primary account of which the secondaryKey is a secondary key
  • the secondaryKey can't be unlinked (can happen when it's part of a multisig with some balance)
  • the signing account is not a primary key
  • the signing Identity is already a child of some other identity

Note

this method is of type ProcedureMethod, which means you can call createChild.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Identities.ts:193


createPortfolio

createPortfolio(args, opts?): Promise<GenericPolymeshTransaction<NumberedPortfolio[], NumberedPortfolio>>

Create a new Portfolio under the ownership of the signing Identity

Parameters

NameType
argsObject
args.namestring
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<NumberedPortfolio[], NumberedPortfolio>>

Note

this method is of type ProcedureMethod, which means you can call createPortfolio.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Identities.ts:140


createPortfolios

createPortfolios(args, opts?): Promise<GenericPolymeshTransaction<NumberedPortfolio[], NumberedPortfolio[]>>

Creates a set of new Portfolios under the ownership of the signing Identity

Parameters

NameType
argsObject
args.namesstring[]
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<NumberedPortfolio[], NumberedPortfolio[]>>

Note

this method is of type ProcedureMethod, which means you can call createPortfolios.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Identities.ts:150


getChildIdentity

getChildIdentity(args): Promise<ChildIdentity>

Create a ChildIdentity instance from a DID

Parameters

NameType
argsObject
args.didstring

Returns

Promise<ChildIdentity>

Throws

if there is no ChildIdentity with the passed DID

Defined in

api/client/Identities.ts:168


getIdentity

getIdentity(args): Promise<Identity>

Create an Identity instance from a DID

Parameters

NameType
argsObject
args.didstring

Returns

Promise<Identity>

Throws

if there is no Identity with the passed DID

Defined in

api/client/Identities.ts:159


isIdentityValid

isIdentityValid(args): Promise<boolean>

Return whether the supplied Identity/DID exists

Parameters

NameType
argsObject
args.identitystring | Identity

Returns

Promise<boolean>

Defined in

api/client/Identities.ts:175


registerIdentity

registerIdentity(args, opts?): Promise<GenericPolymeshTransaction<Identity, Identity>>

Register an Identity, possibly with a CDD claim

Parameters

NameType
argsRegisterIdentityParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<Identity, Identity>>

Note

the transaction signer must be a CDD provider

Note

this may create Authorization Requests which have to be accepted by the targetAccount. An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived. Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne

Note

required role:

  • Customer Due Diligence Provider

Note

this method is of type ProcedureMethod, which means you can call registerIdentity.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Identities.ts:98


rotatePrimaryKey

rotatePrimaryKey(args, opts?): Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>

Creates an Authorization to rotate primary key of the signing Identity by the targetAccount

Parameters

NameType
argsRotatePrimaryKeyParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>

Note

this creates an Authorization Requests which have to be accepted by the targetAccount along with the optional CDD authorization generated by CDD provider attesting the rotation of primary key An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived. Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne

Note

this method is of type ProcedureMethod, which means you can call rotatePrimaryKey.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Identities.ts:130