Skip to main content
Version: 29.0.x

Class: Identity

Defined in: src/api/entities/Identity/index.ts:106

Represents an Identity in the Polymesh blockchain

Extends

Extended by

Properties

assetPermissions

assetPermissions: AssetPermissions

Defined in: src/api/entities/Identity/index.ts:125


authorizations

authorizations: IdentityAuthorizations

Defined in: src/api/entities/Identity/index.ts:123


did

did: string

Defined in: src/api/entities/Identity/index.ts:120

Identity ID as stored in the blockchain


portfolios

portfolios: Portfolios

Defined in: src/api/entities/Identity/index.ts:124


uuid

uuid: string

Defined in: src/api/entities/Entity.ts:46

Inherited from

Entity.uuid

Methods

areSecondaryAccountsFrozen()

Call Signature

areSecondaryAccountsFrozen(): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:753

Check whether secondary Accounts are frozen

Returns

Promise<boolean>

Promise that resolves to true if secondary accounts are frozen, false otherwise

Call Signature

areSecondaryAccountsFrozen(callback: SubCallback<boolean>): Promise<UnsubCallback>

Defined in: src/api/entities/Identity/index.ts:764

Check whether secondary Accounts are frozen (with subscription support)

Parameters
ParameterTypeDescription

callback

SubCallback<boolean>

Callback function that receives frozen status updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

can be subscribed to, if connected to node using a web socket


checkRoles()

checkRoles(roles: Role[]): Promise<CheckRolesResult>

Defined in: src/api/entities/Identity/index.ts:521

Check whether this Identity possesses all specified roles

Parameters

ParameterType

roles

Role[]

Returns

Promise<CheckRolesResult>


exists()

exists(): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:964

Determine whether this Identity exists on chain

Returns

Promise<boolean>

Note

asset Identities aren't considered to exist for this check

Overrides

Entity.exists


getAssetBalance()

Call Signature

getAssetBalance(args: object): Promise<BigNumber>

Defined in: src/api/entities/Identity/index.ts:203

Retrieve the balance of a particular Asset by ticker

Parameters
ParameterTypeDescription

args

{ ticker: string; }

args.ticker

string

Asset ticker

Returns

Promise<BigNumber>

Promise that resolves to the Asset balance

Call Signature

getAssetBalance(args: object): Promise<BigNumber>

Defined in: src/api/entities/Identity/index.ts:212

Retrieve the balance of a particular Asset by Asset ID

Parameters
ParameterTypeDescription

args

{ assetId: string; }

args.assetId

string

Asset identifier

Returns

Promise<BigNumber>

Promise that resolves to the Asset balance

Call Signature

getAssetBalance(args: object, callback: SubCallback<BigNumber>): Promise<UnsubCallback>

Defined in: src/api/entities/Identity/index.ts:224

Retrieve the balance of a particular Asset by ticker (with subscription support)

Parameters
ParameterTypeDescription

args

{ ticker: string; }

args.ticker

string

Asset ticker

callback

SubCallback<BigNumber>

Callback function that receives balance updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

can be subscribed to, if connected to node using a web socket

Call Signature

getAssetBalance(args: object, callback: SubCallback<BigNumber>): Promise<UnsubCallback>

Defined in: src/api/entities/Identity/index.ts:239

Retrieve the balance of a particular Asset by Asset ID (with subscription support)

Parameters
ParameterTypeDescription

args

{ assetId: string; }

args.assetId

string

Asset identifier

callback

SubCallback<BigNumber>

Callback function that receives balance updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

can be subscribed to, if connected to node using a web socket


getChildIdentities()

getChildIdentities(): Promise<ChildIdentity[]>

Defined in: src/api/entities/Identity/index.ts:1028

Returns the list of all child identities

Returns

Promise<ChildIdentity[]>

Note

this query can be potentially SLOW depending on the number of parent Identities present on the chain


getHeldAssets()

getHeldAssets(opts: object): Promise<ResultSet<FungibleAsset>>

Defined in: src/api/entities/Identity/index.ts:416

Retrieve a list of all Assets which were held at one point by this Identity

Parameters

ParameterType

opts

{ order?: AssetHoldersOrderBy; size?: BigNumber; start?: BigNumber; }

opts.order?

AssetHoldersOrderBy

opts.size?

BigNumber

opts.start?

BigNumber

Returns

Promise<ResultSet<FungibleAsset>>

Note

uses the middlewareV2

Note

supports pagination


getHeldNfts()

getHeldNfts(opts: object): Promise<ResultSet<HeldNfts>>

Defined in: src/api/entities/Identity/index.ts:463

Retrieve a list of all NftCollections which were held at one point by this Identity

Parameters

ParameterType

opts

{ order?: NftHoldersOrderBy; size?: BigNumber; start?: BigNumber; }

opts.order?

NftHoldersOrderBy

opts.size?

BigNumber

opts.start?

BigNumber

Returns

Promise<ResultSet<HeldNfts>>

Note

uses the middlewareV2

Note

supports pagination


getHistoricalInstructions()

getHistoricalInstructions(filter?: Omit<HistoricalInstructionFilters, "identity">): Promise<ResultSet<HistoricInstruction>>

Defined in: src/api/entities/Identity/index.ts:998

Retrieve all Instructions that have been associated with this Identity's DID

Parameters

ParameterType

filter?

Omit<HistoricalInstructionFilters, "identity">

Returns

Promise<ResultSet<HistoricInstruction>>

Note

uses the middleware V2

Note

supports pagination


getInstructions()

getInstructions(): Promise<GroupedInstructions>

Defined in: src/api/entities/Identity/index.ts:594

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>

Defined in: src/api/entities/Identity/index.ts:692

Retrieve all Instructions where this Identity is a participant (owner/custodian), grouped by the role of the Identity and Instruction status

Returns

Promise<GroupedInvolvedInstructions>


getMultiSigSigners()

getMultiSigSigners(): Promise<MultiSigSigners[]>

Defined in: src/api/entities/Identity/index.ts:1137

Returns the list of MultiSig accounts along with their signatories this identity has responsibility for. The roles possible are:

  • Admin: The identity is able to unilaterally modify the MultiSig properties, such as the signers and signatures required for a proposal
  • Payer: The identity's primary key will be deducted any POLYX fees the MultiSig may incur

Returns

Promise<MultiSigSigners[]>

Note

this query can be potentially SLOW depending on the number of MultiSigs present on the chain


getOffChainAuthorizationNonce()

getOffChainAuthorizationNonce(): Promise<BigNumber>

Defined in: src/api/entities/Identity/index.ts:1215

Returns the off chain authorization nonce for this Identity

Returns

Promise<BigNumber>


getPendingDistributions()

getPendingDistributions(): Promise<DistributionWithDetails[]>

Defined in: src/api/entities/Identity/index.ts:802

Retrieve every Dividend Distribution for which this Identity is eligible and hasn't been paid

Returns

Promise<DistributionWithDetails[]>

Note

uses the middleware

Note

this query can be potentially SLOW depending on which Assets this Identity has held


getPrimaryAccount()

Call Signature

getPrimaryAccount(): Promise<PermissionedAccount>

Defined in: src/api/entities/Identity/index.ts:342

Retrieve the primary Account associated with the Identity

Returns

Promise<PermissionedAccount>

Promise that resolves to the primary Account information

Call Signature

getPrimaryAccount(callback: SubCallback<PermissionedAccount>): Promise<UnsubCallback>

Defined in: src/api/entities/Identity/index.ts:353

Retrieve the primary Account associated with the Identity (with subscription support)

Parameters
ParameterTypeDescription

callback

SubCallback<PermissionedAccount>

Callback function that receives primary Account updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

can be subscribed to, if connected to node using a web socket


getSecondaryAccounts()

Call Signature

getSecondaryAccounts(paginationOpts?: PaginationOptions): Promise<ResultSet<PermissionedAccount>>

Defined in: src/api/entities/Identity/index.ts:861

Get the list of secondary Accounts related to the Identity

Parameters
ParameterTypeDescription

paginationOpts?

PaginationOptions

Options for pagination

Returns

Promise<ResultSet<PermissionedAccount>>

Promise that resolves to a paginated result of secondary accounts

Note

supports pagination

Call Signature

getSecondaryAccounts(callback: SubCallback<PermissionedAccount[]>): Promise<UnsubCallback>

Defined in: src/api/entities/Identity/index.ts:874

Get the list of secondary Accounts related to the Identity (with subscription support)

Parameters
ParameterTypeDescription

callback

SubCallback<PermissionedAccount[]>

Callback function that receives secondary account updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

can be subscribed to, if connected to node using a web socket

Call Signature

getSecondaryAccounts(paginationOpts: PaginationOptions, callback: SubCallback<PermissionedAccount[]>): Promise<UnsubCallback>

Defined in: src/api/entities/Identity/index.ts:889

Get the list of secondary Accounts related to the Identity (with pagination and subscription support)

Parameters
ParameterTypeDescription

paginationOpts

PaginationOptions

Options for pagination

callback

SubCallback<PermissionedAccount[]>

Callback function that receives secondary account updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

supports pagination

Note

can be subscribed to, if connected to node using a web socket


getTrustingAssets()

getTrustingAssets(): Promise<FungibleAsset[]>

Defined in: src/api/entities/Identity/index.ts:547

Get the list of Assets for which this Identity is a trusted claim issuer

Returns

Promise<FungibleAsset[]>

Note

uses the middlewareV2


getVenues()

getVenues(): Promise<Venue[]>

Defined in: src/api/entities/Identity/index.ts:566

Retrieve all Venues created by this Identity

Returns

Promise<Venue[]>


hasRole()

hasRole(role: Role): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:153

Check whether this Identity possesses the specified Role

Parameters

ParameterType

role

Role

Returns

Promise<boolean>


hasValidCdd()

hasValidCdd(): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:290

Check whether this Identity has a valid CDD claim

Returns

Promise<boolean>


isAssetPreApproved()

isAssetPreApproved(asset: string | BaseAsset): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:1109

Returns whether or not this Identity has pre-approved a particular asset

Parameters

ParameterType

asset

string | BaseAsset

Returns

Promise<boolean>


isCddProvider()

isCddProvider(): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:323

Check whether this Identity is a CDD provider

Returns

Promise<boolean>


isChild()

isChild(): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:1064

Check whether this Identity is a child Identity

Returns

Promise<boolean>


isEqual()

isEqual(entity: Entity<unknown, unknown>): boolean

Defined in: src/api/entities/Entity.ts:61

Determine whether this Entity is the same as another one

Parameters

ParameterType

entity

Entity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual


isGcMember()

isGcMember(): Promise<boolean>

Defined in: src/api/entities/Identity/index.ts:306

Check whether this Identity is Governance Committee member

Returns

Promise<boolean>


preApprovedAssets()

preApprovedAssets(paginationOpts?: PaginationOptions): Promise<ResultSet<Asset>>

Defined in: src/api/entities/Identity/index.ts:1075

Returns a list of all assets this Identity has pre-approved. These assets will not require affirmation when being received in settlements

Parameters

ParameterType

paginationOpts?

PaginationOptions

Returns

Promise<ResultSet<Asset>>


toHuman()

toHuman(): string

Defined in: src/api/entities/Identity/index.ts:987

Return the Identity's DID

Returns

string

Overrides

Entity.toHuman


unlinkChild()

unlinkChild(args: UnlinkChildParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Identity/index.ts:1059

Unlinks a child identity

Parameters

ParameterType

args

UnlinkChildParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Throws

if

  • the child is not a child of this identity
  • the transaction signer is not the primary key of the parent identity

Note

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


generateUuid()

static generateUuid<Identifiers>(identifiers: Identifiers): string

Defined in: src/api/entities/Entity.ts:14

Generate the Entity's UUID from its identifying properties

Type Parameters

Type Parameter

Identifiers

Parameters

ParameterTypeDescription

identifiers

Identifiers

Returns

string

Inherited from

Entity.generateUuid


unserialize()

static unserialize<Identifiers>(serialized: string): Identifiers

Defined in: src/api/entities/Entity.ts:23

Unserialize a UUID into its Unique Identifiers

Type Parameters

Type Parameter

Identifiers

Parameters

ParameterTypeDescription

serialized

string

UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize