api_entities_Identity.Identity

@polymeshassociation/polymesh-sdk / Modules / api/entities/Identity / Identity

Class: Identity

api/entities/Identity.Identity

Represents an Identity in the Polymesh blockchain

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Identity(identifiers, context)

Create an Identity entity

Parameters

Name
Type

context

Context

Overrides

Entity<UniqueIdentifiers, string&gt;.constructor

Defined in

api/entities/Identity/index.ts:104arrow-up-right

Properties

assetPermissions

assetPermissions: AssetPermissions

Defined in

api/entities/Identity/index.ts:99arrow-up-right


authorizations

authorizations: IdentityAuthorizations

Defined in

api/entities/Identity/index.ts:97arrow-up-right


did

did: string

Identity ID as stored in the blockchain

Defined in

api/entities/Identity/index.ts:94arrow-up-right


portfolios

portfolios: Portfolios

Defined in

api/entities/Identity/index.ts:98arrow-up-right


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46arrow-up-right

Methods

areSecondaryAccountsFrozen

areSecondaryAccountsFrozen(): Promise<boolean>

Check whether secondary Accounts are frozen

note can be subscribed to

Returns

Promise<boolean>

Defined in

api/entities/Identity/index.ts:594arrow-up-right

areSecondaryAccountsFrozen(callback): Promise<UnsubCallback>

Parameters

Name
Type

callback

SubCallback<boolean>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Identity/index.ts:595arrow-up-right


checkRoles

checkRoles(roles): Promise<CheckRolesResult>

Check whether this Identity possesses all specified roles

Parameters

Name
Type

roles

Returns

Promise<CheckRolesResult>

Defined in

api/entities/Identity/index.ts:362arrow-up-right


exists

exists(): Promise<boolean>

Determine whether this Identity exists on chain

note asset Identities aren't considered to exist for the

Returns

Promise<boolean>

Overrides

Entity.exists

Defined in

api/entities/Identity/index.ts:751arrow-up-right


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>

Defined in

api/entities/Identity/index.ts:166arrow-up-right

getAssetBalance(args, callback): Promise<UnsubCallback>

Parameters

Name
Type

args

Object

args.ticker

string

callback

SubCallback<BigNumber>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Identity/index.ts:167arrow-up-right


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

Promise<ResultSet<Asset>>

Defined in

api/entities/Identity/index.ts:320arrow-up-right


getInstructions

getInstructions(): Promise<GroupedInstructions>

Retrieve all Instructions where this Identity is a participant, grouped by status

Returns

Promise<GroupedInstructions>

Defined in

api/entities/Identity/index.ts:472arrow-up-right


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[]>

Defined in

api/entities/Identity/index.ts:631arrow-up-right


getPendingInstructions

getPendingInstructions(): Promise<Instruction[]>

Retrieve all pending Instructions involving this Identity

deprecated in favor of getInstructions

Returns

Promise<Instruction[]>

Defined in

api/entities/Identity/index.ts:541arrow-up-right


getPrimaryAccount

getPrimaryAccount(): Promise<PermissionedAccount>

Retrieve the primary Account associated with the Identity

note can be subscribed to

Returns

Promise<PermissionedAccount>

Defined in

api/entities/Identity/index.ts:267arrow-up-right

getPrimaryAccount(callback): Promise<UnsubCallback>

Parameters

Returns

Promise<UnsubCallback>

Defined in

api/entities/Identity/index.ts:268arrow-up-right


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 herearrow-up-right and herearrow-up-right

Parameters

Name
Type

args

Object

args.asset

string | Asset

Returns

Promise<null | string>

Defined in

api/entities/Identity/index.ts:450arrow-up-right


getSecondaryAccounts

getSecondaryAccounts(): Promise<PermissionedAccount[]>

Get the list of secondary Accounts related to the Identity

note can be subscribed to

note This method currently lacks pagination and may be slow for identities with many thousands of keys

Returns

Promise<PermissionedAccount[]>

Defined in

api/entities/Identity/index.ts:686arrow-up-right

getSecondaryAccounts(callback): Promise<UnsubCallback>

Parameters

Name
Type

Returns

Promise<UnsubCallback>

Defined in

api/entities/Identity/index.ts:687arrow-up-right


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[]>

Defined in

api/entities/Identity/index.ts:397arrow-up-right


getVenues

getVenues(): Promise<Venue[]>

Retrieve all Venues created by this Identity

note can be subscribed to

Returns

Promise<Venue[]>

Defined in

api/entities/Identity/index.ts:414arrow-up-right

getVenues(callback): Promise<UnsubCallback>

Parameters

Name
Type

callback

Returns

Promise<UnsubCallback>

Defined in

api/entities/Identity/index.ts:415arrow-up-right


hasRole

hasRole(role): Promise<boolean>

Check whether this Identity possesses the specified Role

Parameters

Name
Type

role

Returns

Promise<boolean>

Defined in

api/entities/Identity/index.ts:118arrow-up-right


hasRoles

hasRoles(roles): Promise<boolean>

Check whether this Identity possesses all specified roles

deprecated in favor of checkRoles

Parameters

Name
Type

roles

Returns

Promise<boolean>

Defined in

api/entities/Identity/index.ts:386arrow-up-right


hasValidCdd

hasValidCdd(): Promise<boolean>

Check whether this Identity has a valid CDD claim

Returns

Promise<boolean>

Defined in

api/entities/Identity/index.ts:215arrow-up-right


isCddProvider

isCddProvider(): Promise<boolean>

Check whether this Identity is a CDD provider

Returns

Promise<boolean>

Defined in

api/entities/Identity/index.ts:248arrow-up-right


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

Entity.isEqual

Defined in

api/entities/Entity.ts:61arrow-up-right


isGcMember

isGcMember(): Promise<boolean>

Check whether this Identity is Governance Committee member

Returns

Promise<boolean>

Defined in

api/entities/Identity/index.ts:231arrow-up-right


toHuman

toHuman(): string

Return the Identity's DID

Returns

string

Overrides

Entity.toHuman

Defined in

api/entities/Identity/index.ts:774arrow-up-right


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

Entity.generateUuid

Defined in

api/entities/Entity.ts:14arrow-up-right


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

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23arrow-up-right

Last updated

Was this helpful?