-
Notifications
You must be signed in to change notification settings - Fork 11
api.client.Identities
@polymeshassociation/polymesh-sdk / api/client/Identities
Defined in: api/client/Identities.ts:37
Handles all Identity related functionality
allowIdentityToCreatePortfolios(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/client/Identities.ts:269
Gives permission to the Identity to create Portfolios on behalf of the signing Identity
| Parameter | Type |
|---|---|
args |
AllowIdentityToCreatePortfoliosParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
if
- the provided Identity already has permissions to create portfolios for signing Identity
- the provided Identity does not exist
this method is of type ProcedureMethod, which means you can call allowIdentityToCreatePortfolios.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
attestPrimaryKeyRotation(
args,opts?):Promise<GenericPolymeshTransaction<AuthorizationRequest,AuthorizationRequest>>
Defined in: api/client/Identities.ts:155
Get CDD Provider's attestation to change primary key
| Parameter | Type |
|---|---|
args |
AttestPrimaryKeyRotationParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>
the transaction signer must be a CDD provider
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
required role:
- Customer Due Diligence Provider
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
createChild(
args,opts?):Promise<GenericPolymeshTransaction<ChildIdentity,ChildIdentity>>
Defined in: api/client/Identities.ts:245
Creates a child identity and makes the secondaryKey as the primary key of the child identity
| Parameter | Type |
|---|---|
args |
CreateChildIdentityParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<ChildIdentity, ChildIdentity>>
the given secondaryKey is removed as secondary key from the signing Identity
if
- the transaction signer is not the primary account of which the
secondaryKeyis a secondary key - the
secondaryKeycan'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
Child identities are no longer supported in chain v8
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
createChildren(
args,opts?):Promise<GenericPolymeshTransaction<ChildIdentity[],ChildIdentity[]>>
Defined in: api/client/Identities.ts:260
Create child identities using off chain authorization
| Parameter | Type |
|---|---|
args |
CreateChildIdentitiesParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<ChildIdentity[], ChildIdentity[]>>
the list of key provided in the params should not be linked to any other account
if
- the signing account is not a primary key
- the signing Identity is already a child of some other identity
-
expiresAtis not a future date - the any
keyinchildKeyAuthsis already linked to an Identity
Child identities are no longer supported in chain v8
this method is of type ProcedureMethod, which means you can call createChildren.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
createPortfolio(
args,opts?):Promise<GenericPolymeshTransaction<NumberedPortfolio[],NumberedPortfolio>>
Defined in: api/client/Identities.ts:189
Create a new Portfolio under the ownership of the signing Identity
| Parameter | Type |
|---|---|
args |
{ name: string; ownerDid?: string; } |
args.name |
string |
args.ownerDid? |
string |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<NumberedPortfolio[], NumberedPortfolio>>
the ownerDid is optional. If provided portfolios will be created as Custody Portfolios under the ownerDid
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
createPortfolios(
args,opts?):Promise<GenericPolymeshTransaction<NumberedPortfolio[],NumberedPortfolio[]>>
Defined in: api/client/Identities.ts:199
Creates a set of new Portfolios under the ownership of the signing Identity
| Parameter | Type |
|---|---|
args |
{ names: string[]; ownerDid?: string; } |
args.names |
string[] |
args.ownerDid? |
string |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<NumberedPortfolio[], NumberedPortfolio[]>>
the ownerDid is optional. If provided portfolios will be created as Custody Portfolios under the ownerDid
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
getAllowedCustodians(
did):Promise<string[]>
Defined in: api/client/Identities.ts:291
Returns a list of allowed custodian did(s) for Identity
| Parameter | Type |
|---|---|
did |
string | Identity
|
Promise<string[]>
if
- the provided Identity does not exist
getChildIdentity(
args):Promise<ChildIdentity>
Defined in: api/client/Identities.ts:220
Create a ChildIdentity instance from a DID
| Parameter | Type |
|---|---|
args |
{ did: string; } |
args.did |
string |
Promise<ChildIdentity>
if there is no ChildIdentity with the passed DID
Child identities are no longer supported in chain v8
getIdentity(
args):Promise<Identity>
Defined in: api/client/Identities.ts:209
Create an Identity instance from a DID
| Parameter | Type |
|---|---|
args |
{ did: string; } |
args.did |
string |
Promise<Identity>
if there is no Identity with the passed DID
isIdentityValid(
args):Promise<boolean>
Defined in: api/client/Identities.ts:228
Return whether the supplied Identity/DID exists
| Parameter | Type |
|---|---|
args |
{ identity: string | Identity; } |
args.identity |
string | Identity
|
Promise<boolean>
registerIdentity(
args,opts?):Promise<GenericPolymeshTransaction<Identity,Identity>>
Defined in: api/client/Identities.ts:135
Register an Identity
| Parameter | Type |
|---|---|
args |
RegisterIdentityParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<Identity, Identity>>
the transaction signer must be a DID Registrar
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
required role:
- DID Registrar
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
revokeIdentityToCreatePortfolios(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/client/Identities.ts:281
Revokes permission from the Identity to create Portfolios on behalf of the signing Identity
| Parameter | Type |
|---|---|
args |
RevokeIdentityToCreatePortfoliosParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
if
- the provided Identity already does not have permissions to create portfolios for signing Identity
- the provided Identity does not exist
this method is of type ProcedureMethod, which means you can call revokeIdentityToCreatePortfolios.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
rotatePrimaryKey(
args,opts?):Promise<GenericPolymeshTransaction<AuthorizationRequest,AuthorizationRequest>>
Defined in: api/client/Identities.ts:167
Creates an Authorization to rotate primary key of the signing Identity by the targetAccount
| Parameter | Type |
|---|---|
args |
RotatePrimaryKeyParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>
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
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
rotatePrimaryKeyToSecondary(
args,opts?):Promise<GenericPolymeshTransaction<AuthorizationRequest,AuthorizationRequest>>
Defined in: api/client/Identities.ts:180
Creates an Authorization to rotate primary key of the signing Identity to an existing secondary key identified by the targetAccount
| Parameter | Type |
|---|---|
args |
RotatePrimaryKeyToSecondaryParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>
the given targetAccount must be an existing secondaryKey or unlinked to any other Identity
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
if the given targetAccount is linked with another Identity
if the given targetAccount is already the primary key of the signing Identity
if the given targetAccount already has a pending invitation to become the primary key of the signing Identity
this method is of type ProcedureMethod, which means you can call rotatePrimaryKeyToSecondary.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
selfRegisterDid(
opts?):Promise<GenericPolymeshTransaction<Identity,Identity>>
Defined in: api/client/Identities.ts:142
Register a new DID for the signing Account
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<Identity, Identity>>
if the signing Account is already linked to an Identity
this method is of type NoArgsProcedureMethod, which means you can call selfRegisterDid.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it