Class: Identity
api/entities/Identity.Identity
Represents an Identity in the Polymesh blockchain
Hierarchy
Entity
<UniqueIdentifiers
,string
>↳
Identity
Properties
assetPermissions
• assetPermissions: AssetPermissions
Defined in
api/entities/Identity/index.ts:114
authorizations
• authorizations: IdentityAuthorizations
Defined in
api/entities/Identity/index.ts:112
did
• did: string
Identity ID as stored in the blockchain
Defined in
api/entities/Identity/index.ts:109
portfolios
• portfolios: Portfolios
Defined in
api/entities/Identity/index.ts:113
uuid
• uuid: string
Inherited from
Defined in
Methods
areSecondaryAccountsFrozen
▸ areSecondaryAccountsFrozen(): Promise
<boolean
>
Check whether secondary Accounts are frozen
Note
can be subscribed to
Returns
Promise
<boolean
>
▸ areSecondaryAccountsFrozen(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <boolean > |
Returns
Promise
<UnsubCallback
>
checkRoles
▸ checkRoles(roles
): Promise
<CheckRolesResult
>
Check whether this Identity possesses all specified roles
Parameters
Name | Type |
---|---|
roles | Role [] |
Returns
Promise
<CheckRolesResult
>
exists
▸ exists(): Promise
<boolean
>
Determine whether this Identity exists on chain
Note
asset Identities aren't considered to exist for this check
Returns
Promise
<boolean
>
Overrides
getAssetBalance
▸ getAssetBalance(args
): Promise
<BigNumber
>
Retrieve the balance of a particular Asset
Note
can be subscribed to
Parameters
Name | Type |
---|---|
args | Object |
args.ticker | string |
Returns
Promise
<BigNumber
>
▸ getAssetBalance(args
, callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
args | Object |
args.ticker | string |
callback | SubCallback <BigNumber > |
Returns
Promise
<UnsubCallback
>
getHeldAssets
▸ getHeldAssets(opts?
): Promise
<ResultSet
<Asset
>>
Retrieve a list of all Assets which were held at one point by this Identity
Note
uses the middleware
Note
supports pagination
Parameters
Name | Type |
---|---|
opts | Object |
opts.order? | Order |
opts.size? | BigNumber |
opts.start? | BigNumber |
Returns
getHeldAssetsV2
▸ getHeldAssetsV2(opts?
): Promise
<ResultSet
<Asset
>>
Retrieve a list of all Assets which were held at one point by this Identity
Note
uses the middlewareV2
Note
supports pagination
Parameters
Name | Type |
---|---|
opts | Object |
opts.order? | AssetHoldersOrderBy |
opts.size? | BigNumber |
opts.start? | BigNumber |
Returns
getHistoricalInstructions
▸ getHistoricalInstructions(): Promise
<HistoricInstruction
[]>
Retrieve all Instructions that have been associated with this Identity's DID
Note
uses the middleware V2
Returns
Promise
<HistoricInstruction
[]>
getInstructions
▸ getInstructions(): Promise
<GroupedInstructions
>
Retrieve all Instructions where this Identity is a custodian of one or more portfolios in the legs, grouped by status
Returns
Promise
<GroupedInstructions
>
getInvolvedInstructions
▸ getInvolvedInstructions(): Promise
<GroupedInvolvedInstructions
>
Retrieve all Instructions where this Identity is a participant (owner/custodian), grouped by the role of the Identity and Instruction status
Returns
Promise
<GroupedInvolvedInstructions
>
getPendingDistributions
▸ getPendingDistributions(): Promise
<DistributionWithDetails
[]>
Retrieve every Dividend Distribution for which this Identity is eligible and hasn't been paid
Note
uses the middleware
Note
this query can be potentially SLOW depending on which Assets this Identity has held
Returns
Promise
<DistributionWithDetails
[]>
getPrimaryAccount
▸ getPrimaryAccount(): Promise
<PermissionedAccount
>
Retrieve the primary Account associated with the Identity
Note
can be subscribed to
Returns
Promise
<PermissionedAccount
>
▸ getPrimaryAccount(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <PermissionedAccount > |
Returns
Promise
<UnsubCallback
>
getScopeId
▸ getScopeId(args
): Promise
<null
| string
>
Retrieve the Scope ID associated to this Identity's Investor Uniqueness Claim for a specific Asset, or null if there is none
Note
more on Investor Uniqueness here and here
Parameters
Name | Type |
---|---|
args | Object |
args.asset | string | Asset |
Returns
Promise
<null
| string
>
getSecondaryAccounts
▸ getSecondaryAccounts(paginationOpts?
): Promise
<ResultSet
<PermissionedAccount
>>
Get the list of secondary Accounts related to the Identity
Note
supports pagination
Note
can be subscribed to
Parameters
Name | Type |
---|---|
paginationOpts? | PaginationOptions |
Returns
Promise
<ResultSet
<PermissionedAccount
>>
▸ getSecondaryAccounts(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <PermissionedAccount []> |
Returns
Promise
<UnsubCallback
>
▸ getSecondaryAccounts(paginationOpts
, callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
paginationOpts | PaginationOptions |
callback | SubCallback <PermissionedAccount []> |
Returns
Promise
<UnsubCallback
>
getTrustingAssets
▸ getTrustingAssets(): Promise
<Asset
[]>
Get the list of Assets for which this Identity is a trusted claim issuer
Note
uses the middleware
Returns
Promise
<Asset
[]>
getTrustingAssetsV2
▸ getTrustingAssetsV2(): Promise
<Asset
[]>
Get the list of Assets for which this Identity is a trusted claim issuer
Note
uses the middlewareV2
Returns
Promise
<Asset
[]>
getVenues
▸ getVenues(): Promise
<Venue
[]>
Retrieve all Venues created by this Identity
Note
can be subscribed to
Returns
Promise
<Venue
[]>
▸ getVenues(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <Venue []> |
Returns
Promise
<UnsubCallback
>
hasRole
▸ hasRole(role
): Promise
<boolean
>
Check whether this Identity possesses the specified Role
Parameters
Name | Type |
---|---|
role | Role |
Returns
Promise
<boolean
>
hasValidCdd
▸ hasValidCdd(): Promise
<boolean
>
Check whether this Identity has a valid CDD claim
Returns
Promise
<boolean
>
isCddProvider
▸ isCddProvider(): Promise
<boolean
>
Check whether this Identity is a CDD provider
Returns
Promise
<boolean
>
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
Name | Type |
---|---|
entity | Entity <unknown , unknown > |
Returns
boolean
Inherited from
isGcMember
▸ isGcMember(): Promise
<boolean
>
Check whether this Identity is Governance Committee member
Returns
Promise
<boolean
>
toHuman
▸ toHuman(): string
Return the Identity's DID
Returns
string
Overrides
generateUuid
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Type parameters
Name |
---|
Identifiers |
Parameters
Name | Type |
---|---|
identifiers | Identifiers |
Returns
string
Inherited from
unserialize
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Type parameters
Name |
---|
Identifiers |
Parameters
Name | Type | Description |
---|---|---|
serialized | string | UUID to unserialize |
Returns
Identifiers