-
Notifications
You must be signed in to change notification settings - Fork 11
api.client.Identities.Identities
api/client/Identities.Identities
Handles all Identity related functionality
- allowIdentityToCreatePortfolios
- attestPrimaryKeyRotation
- createChild
- createChildren
- createPortfolio
- createPortfolios
- getAllowedCustodians
- getChildIdentity
- getIdentity
- isIdentityValid
- registerIdentity
- revokeIdentityToCreatePortfolios
- rotatePrimaryKey
- rotatePrimaryKeyToSecondary
▸ allowIdentityToCreatePortfolios(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Gives permission to the Identity to create Portfolios on behalf of the signing Identity
Name | Type |
---|---|
args |
AllowIdentityToCreatePortfoliosParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Throws
if
- the provided Identity already has permissions to create portfolios for signing Identity
- the provided Identity does not exist
Note
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
>>
Get CDD Provider's attestation to change primary key
Name | Type |
---|---|
args |
AttestPrimaryKeyRotationParams |
opts? |
ProcedureOpts |
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
▸ createChild(args
, opts?
): Promise
<GenericPolymeshTransaction
<ChildIdentity
, ChildIdentity
>>
Creates a child identity and makes the secondaryKey
as the primary key of the child identity
Name | Type |
---|---|
args |
CreateChildIdentityParams |
opts? |
ProcedureOpts |
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
▸ createChildren(args
, opts?
): Promise
<GenericPolymeshTransaction
<ChildIdentity
[], ChildIdentity
[]>>
Create child identities using off chain authorization
Name | Type |
---|---|
args |
CreateChildIdentitiesParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<ChildIdentity
[], ChildIdentity
[]>>
Note
the list of key
provided in the params should not be linked to any other account
Throws
if
- the signing account is not a primary key
- the signing Identity is already a child of some other identity
-
expiresAt
is not a future date - the any
key
inchildKeyAuths
is already linked to an Identity
Note
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
>>
Create a new Portfolio under the ownership of the signing Identity
Name | Type |
---|---|
args |
Object |
args.name |
string |
args.ownerDid? |
string |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<NumberedPortfolio
[], NumberedPortfolio
>>
Note
the ownerDid
is optional. If provided portfolios will be created as Custody Portfolios under the ownerDid
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
▸ createPortfolios(args
, opts?
): Promise
<GenericPolymeshTransaction
<NumberedPortfolio
[], NumberedPortfolio
[]>>
Creates a set of new Portfolios under the ownership of the signing Identity
Name | Type |
---|---|
args |
Object |
args.names |
string [] |
args.ownerDid? |
string |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<NumberedPortfolio
[], NumberedPortfolio
[]>>
Note
the ownerDid
is optional. If provided portfolios will be created as Custody Portfolios under the ownerDid
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
▸ getAllowedCustodians(did
): Promise
<string
[]>
Returns a list of allowed custodian did(s) for Identity
Name | Type |
---|---|
did |
string | Identity
|
Promise
<string
[]>
Throws
if
- the provided Identity does not exist
▸ getChildIdentity(args
): Promise
<ChildIdentity
>
Create a ChildIdentity instance from a DID
Name | Type |
---|---|
args |
Object |
args.did |
string |
Promise
<ChildIdentity
>
Throws
if there is no ChildIdentity with the passed DID
▸ getIdentity(args
): Promise
<Identity
>
Create an Identity instance from a DID
Name | Type |
---|---|
args |
Object |
args.did |
string |
Promise
<Identity
>
Throws
if there is no Identity with the passed DID
▸ isIdentityValid(args
): Promise
<boolean
>
Return whether the supplied Identity/DID exists
Name | Type |
---|---|
args |
Object |
args.identity |
string | Identity
|
Promise
<boolean
>
▸ registerIdentity(args
, opts?
): Promise
<GenericPolymeshTransaction
<Identity
, Identity
>>
Register an Identity, possibly with a CDD claim
Name | Type |
---|---|
args |
RegisterIdentityParams |
opts? |
ProcedureOpts |
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
▸ revokeIdentityToCreatePortfolios(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Revokes permission from the Identity to create Portfolios on behalf of the signing Identity
Name | Type |
---|---|
args |
RevokeIdentityToCreatePortfoliosParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Throws
if
- the provided Identity already does not have permissions to create portfolios for signing Identity
- the provided Identity does not exist
Note
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
>>
Creates an Authorization to rotate primary key of the signing Identity by the targetAccount
Name | Type |
---|---|
args |
RotatePrimaryKeyParams |
opts? |
ProcedureOpts |
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
▸ rotatePrimaryKeyToSecondary(args
, opts?
): Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
Creates an Authorization to rotate primary key of the signing Identity to an existing secondary key identified by the targetAccount
Name | Type |
---|---|
args |
RotatePrimaryKeyToSecondaryParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
Note
the given targetAccount
must be an existing secondaryKey or unlinked to any other Identity
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
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
Note
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
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types