Polymesh SDK API Reference
v6.0.0
v6.0.0
  • Introduction
  • Globals
  • Classes
    • Account
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • Context
    • CorporateAction
    • CorporateActions
    • Count
    • CurrentAccount
    • CurrentIdentity
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • Middleware
    • NumberedPortfolio
    • Offerings
    • Percentage
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • SecurityToken
    • Settlements
    • Sto
    • TickerReservation
    • TokenHolders
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
    • AffirmationStatus
    • AuthorizationType
    • CalendarUnit
    • ClaimType
    • ConditionTarget
    • ConditionType
    • CorporateActionKind
    • CountryCode
    • ErrorCode
    • InstructionStatus
    • InstructionType
    • KnownTokenType
    • ProposalStage
    • RoleType
    • ScopeType
    • StoBalanceStatus
    • StoSaleStatus
    • StoTimingStatus
    • TargetTreatment
    • TickerReservationStatus
    • TokenIdentifierType
    • TransactionArgumentType
    • TransactionQueueStatus
    • TransactionStatus
    • TransferError
    • TransferRestrictionType
    • TransferStatus
    • TxGroup
    • VenueType
  • Interfaces
    • AccountData
    • ActiveTransferRestrictions
    • AddBatchTransactionOpts
    • AddClaimsParams
    • AddInstructionParams
    • AddInstructionsParams
    • AddInvestorUniquenessClaimParams
    • AddTransactionOpts
    • AddTransactionOptsBase
    • ArrayTransactionArgument
    • Balance
    • CalendarPeriod
    • CddProviderRole
    • CheckpointWithData
    • ClaimClassicTickerParams
    • ClaimData
    • ClaimScope
    • ClaimTarget
    • ComplexTransactionArgument
    • ConditionCompliance
    • ConnectParamsBase
    • ConstructorParams
    • ConsumeParams
    • ControllerTransferParams
    • CorporateActionDefaults
    • CorporateActionTargets
    • CountTransferRestriction
    • CountTransferRestrictionInput
    • CreateCheckpointScheduleParams
    • CreateSecurityTokenParams
    • CreateVenueParams
    • DeletePortfolioParams
    • DistributionParticipant
    • DistributionPayment
    • DistributionWithDetails
    • DividendDistributionDetails
    • DividendDistributionParams
    • EditClaimsParams
    • EventIdentifier
    • ExtrinsicData
    • Fees
    • HistoricSettlement
    • IdentityBalance
    • IdentityWithClaims
    • InstructionAffirmation
    • InvestInStoParams
    • Investment
    • InviteAccountParams
    • IssueTokensParams
    • KeyringPair
    • LeaveIdentityParams
    • Leg
    • LinkCaDocsParams
    • MiddlewareConfig
    • ModifyCorporateActionsAgentParams
    • ModifyInstructionAffirmationParams
    • ModifyPrimaryIssuanceAgentParams
    • ModifySignerPermissionsParams
    • ModifyTokenTrustedClaimIssuersAddSetParams
    • ModifyTokenTrustedClaimIssuersRemoveParams
    • MoveFundsParams
    • NetworkProperties
    • PaginationOptions
    • PayDividendsParams
    • PercentageTransferRestriction
    • PercentageTransferRestrictionInput
    • Permissions
    • PermissionsLike
    • PlainTransactionArgument
    • PortfolioBalance
    • PortfolioCustodianRole
    • PortfolioMovement
    • ProcedureAuthorizationStatus
    • ProcedureMethod
    • ProposalDetails
    • ProposalTimeFrames
    • ProposalVote
    • RedeemTokenParams
    • RegisterIdentityParams
    • RemoveCheckpointScheduleParams
    • RemoveCorporateActionParams
    • RemoveSecondaryKeysParams
    • RenamePortfolioParams
    • Requirement
    • RequirementCompliance
    • ReserveTickerParams
    • ResultSet
    • RevokeClaimsParams
    • ScheduleDetails
    • ScheduleWithDetails
    • Scope
    • SecondaryKey
    • SecurityTokenDetails
    • SetAssetRequirementsParams
    • SetCountTransferRestrictionsParams
    • SetCustodianParams
    • SetPercentageTransferRestrictionsParams
    • SetTokenDocumentsParams
    • SettlementLeg
    • SimpleEnumTransactionArgument
    • StoDetails
    • StoStatus
    • StoTier
    • StoWithDetails
    • TaxWithholding
    • TickerOwnerRole
    • TickerReservationDetails
    • Tier
    • ToggleFreezeSecondaryKeysParams
    • ToggleFreezeStoParams
    • ToggleFreezeTransfersParams
    • TogglePauseRequirementsParams
    • TokenCaaRole
    • TokenDocument
    • TokenIdentifier
    • TokenOwnerRole
    • TokenPiaRole
    • TransferBreakdown
    • TransferPolyxParams
    • TransferRestriction
    • TransferRestrictionInputBase
    • TransferRestrictionResult
    • TransferTickerOwnershipParams
    • TransferTokenOwnershipParams
    • TrustedClaimIssuer
    • UiKeyring
    • UniqueIdentifiers
    • VenueDetails
    • VenueOwnerRole
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Constructors
  • Properties
  • Methods
  • Constructors
  • constructor
  • Properties
  • authorizations
  • Protected context
  • did
  • portfolios
  • uuid
  • Methods
  • areSecondaryKeysFrozen
  • createVenue
  • freezeSecondaryKeys
  • getHeldTokens
  • getPendingDistributions
  • getPendingInstructions
  • getPrimaryKey
  • getScopeId
  • getSecondaryKeys
  • getTokenBalance
  • getTrustingTokens
  • getVenues
  • hasRole
  • hasRoles
  • hasValidCdd
  • inviteAccount
  • isCddProvider
  • isEqual
  • isGcMember
  • modifyPermissions
  • removeSecondaryKeys
  • revokePermissions
  • unfreezeSecondaryKeys
  • Static generateUuid
  • Static unserialize

Was this helpful?

  1. Classes

CurrentIdentity

Represents the Identity associated to the current Account

Hierarchy

↳ Identity

↳ CurrentIdentity

Index

Constructors

  • constructor

Properties

  • authorizations

  • context

  • did

  • portfolios

  • uuid

Methods

  • areSecondaryKeysFrozen

  • createVenue

  • freezeSecondaryKeys

  • getHeldTokens

  • getPendingDistributions

  • getPendingInstructions

  • getPrimaryKey

  • getScopeId

  • getSecondaryKeys

  • getTokenBalance

  • getTrustingTokens

  • getVenues

  • hasRole

  • hasRoles

  • hasValidCdd

  • inviteAccount

  • isCddProvider

  • isEqual

  • isGcMember

  • modifyPermissions

  • removeSecondaryKeys

  • revokePermissions

  • unfreezeSecondaryKeys

  • generateUuid

  • unserialize

Constructors

constructor

+ new CurrentIdentity(identifiers: UniqueIdentifiers, context: Context): CurrentIdentity

Overrides Identity.constructor

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

Create a CurrentIdentity entity

Parameters:

Name

Type

identifiers

UniqueIdentifiers

context

Returns: CurrentIdentity

Properties

authorizations

• authorizations: IdentityAuthorizations

Inherited from Identity.authorizations

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

Protected context

• context: Context

Inherited from CheckpointSchedule.context

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

did

• did: string

Inherited from Identity.did

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

identity ID as stored in the blockchain

portfolios

• portfolios: Portfolios

Inherited from Identity.portfolios

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

uuid

• uuid: string

Inherited from CheckpointSchedule.uuid

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

Methods

areSecondaryKeysFrozen

▸ areSecondaryKeysFrozen(): Promise‹boolean›

Inherited from Identity.areSecondaryKeysFrozen

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

Check whether secondary keys are frozen

note can be subscribed to

Returns: Promise‹boolean›

▸ areSecondaryKeysFrozen(callback: SubCallback‹boolean›): Promise‹UnsubCallback›

Inherited from Identity.areSecondaryKeysFrozen

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

Parameters:

Name

Type

callback

Returns: Promise‹UnsubCallback›

createVenue

▸ createVenue(args: CreateVenueParams): Promise‹TransactionQueue‹Venue››

Defined in src/api/entities/CurrentIdentity.ts:146

Create a Venue

note this method is of type ProcedureMethod, which means you can call createVenue.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Name

Type

args

Returns: Promise‹TransactionQueue‹Venue››

freezeSecondaryKeys

▸ freezeSecondaryKeys(args: void): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentIdentity.ts:156

Freeze all the secondary keys in this Identity. This means revoking their permission to perform any operation on the blockchain and freezing their funds until the keys are unfrozen via unfreezeSecondaryKeys

note this method is of type ProcedureMethod, which means you can call freezeSecondaryKeys.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Name

Type

args

void

Returns: Promise‹TransactionQueue‹void››

getHeldTokens

▸ getHeldTokens(opts: object): Promise‹ResultSet‹SecurityToken››

Inherited from Identity.getHeldTokens

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

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

note uses the middleware

note supports pagination

Parameters:

▪Default value opts: object= { order: Order.Asc }

Name

Type

order?

Order

size?

undefined | number

start?

undefined | number

Returns: Promise‹ResultSet‹SecurityToken››

getPendingDistributions

▸ getPendingDistributions(): Promise‹DistributionWithDetails[]›

Inherited from Identity.getPendingDistributions

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

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 Tokens this Identity has held

Returns: Promise‹DistributionWithDetails[]›

getPendingInstructions

▸ getPendingInstructions(): Promise‹Instruction[]›

Inherited from Identity.getPendingInstructions

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

Retrieve all pending Instructions involving this Identity

Returns: Promise‹Instruction[]›

getPrimaryKey

▸ getPrimaryKey(): Promise‹string›

Inherited from Identity.getPrimaryKey

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

Retrieve the primary key associated with the Identity

note can be subscribed to

Returns: Promise‹string›

▸ getPrimaryKey(callback: SubCallback‹string›): Promise‹UnsubCallback›

Inherited from Identity.getPrimaryKey

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

Parameters:

Name

Type

callback

Returns: Promise‹UnsubCallback›

getScopeId

▸ getScopeId(args: object): Promise‹string›

Inherited from Identity.getScopeId

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

Retrieve the Scope ID associated to this Identity's Investor Uniqueness Claim for a specific Security Token

note more on Investor Uniqueness: https://developers.polymesh.live/confidential_identity

Parameters:

▪ args: object

Name

Type

token

Returns: Promise‹string›

getSecondaryKeys

▸ getSecondaryKeys(): Promise‹SecondaryKey[]›

Defined in src/api/entities/CurrentIdentity.ts:80

Get the list of secondary keys related to the Identity

note can be subscribed to

Returns: Promise‹SecondaryKey[]›

▸ getSecondaryKeys(callback: SubCallback‹SecondaryKey[]›): Promise‹UnsubCallback›

Defined in src/api/entities/CurrentIdentity.ts:81

Parameters:

Name

Type

callback

Returns: Promise‹UnsubCallback›

getTokenBalance

▸ getTokenBalance(args: object): Promise‹BigNumber›

Inherited from Identity.getTokenBalance

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

Retrieve the balance of a particular Security Token

note can be subscribed to

Parameters:

▪ args: object

Name

Type

ticker

string

Returns: Promise‹BigNumber›

▸ getTokenBalance(args: object, callback: SubCallback‹BigNumber›): Promise‹UnsubCallback›

Inherited from Identity.getTokenBalance

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

Parameters:

▪ args: object

Name

Type

ticker

string

▪ callback: SubCallback‹BigNumber›

Returns: Promise‹UnsubCallback›

getTrustingTokens

▸ getTrustingTokens(args: object): Promise‹SecurityToken[]›

Inherited from Identity.getTrustingTokens

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

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

note uses the middleware

Parameters:

▪Default value args: object= { order: Order.Asc }

Name

Type

order

Order

Returns: Promise‹SecurityToken[]›

getVenues

▸ getVenues(): Promise‹Venue[]›

Inherited from Identity.getVenues

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

Retrieve all Venues created by this Identity

note can be subscribed to

Returns: Promise‹Venue[]›

▸ getVenues(callback: SubCallback‹Venue[]›): Promise‹UnsubCallback›

Inherited from Identity.getVenues

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

Parameters:

Name

Type

callback

Returns: Promise‹UnsubCallback›

hasRole

▸ hasRole(role: Role): Promise‹boolean›

Inherited from Identity.hasRole

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

Check whether this Identity possesses the specified Role

Parameters:

Name

Type

role

Returns: Promise‹boolean›

hasRoles

▸ hasRoles(roles: Role[]): Promise‹boolean›

Inherited from Identity.hasRoles

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

Check whether this Identity possesses all specified roles

Parameters:

Name

Type

roles

Returns: Promise‹boolean›

hasValidCdd

▸ hasValidCdd(): Promise‹boolean›

Inherited from Identity.hasValidCdd

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

Check whether this Identity has a valid CDD claim

Returns: Promise‹boolean›

inviteAccount

▸ inviteAccount(args: InviteAccountParams): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentIdentity.ts:136

Send an invitation to an Account to join this Identity

note this may create AuthorizationRequest which have to be accepted by the corresponding Account. An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived

note this method is of type ProcedureMethod, which means you can call inviteAccount.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Name

Type

args

Returns: Promise‹TransactionQueue‹void››

isCddProvider

▸ isCddProvider(): Promise‹boolean›

Inherited from Identity.isCddProvider

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

Check whether this Identity is a CDD provider

Returns: Promise‹boolean›

isEqual

▸ isEqual(entity: Entity‹unknown›): boolean

Inherited from CheckpointSchedule.isEqual

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

Whether this Entity is the same as another one

Parameters:

Name

Type

entity

Returns: boolean

isGcMember

▸ isGcMember(): Promise‹boolean›

Inherited from Identity.isGcMember

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

Check whether this Identity is Governance Committee member

Returns: Promise‹boolean›

modifyPermissions

▸ modifyPermissions(args: ModifySignerPermissionsParams): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentIdentity.ts:122

Modify all permissions of a list of secondary keys associated with the Identity

note this method is of type ProcedureMethod, which means you can call modifyPermissions.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Name

Type

args

Returns: Promise‹TransactionQueue‹void››

removeSecondaryKeys

▸ removeSecondaryKeys(args: RemoveSecondaryKeysParams): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentIdentity.ts:102

Remove a list of secondary keys associated with the Identity

note this method is of type ProcedureMethod, which means you can call removeSecondaryKeys.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Name

Type

args

Returns: Promise‹TransactionQueue‹void››

revokePermissions

▸ revokePermissions(args: object): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentIdentity.ts:112

Revoke all permissions of a list of secondary keys associated with the Identity

note this method is of type ProcedureMethod, which means you can call revokePermissions.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

▪ args: object

Name

Type

secondaryKeys

Returns: Promise‹TransactionQueue‹void››

unfreezeSecondaryKeys

▸ unfreezeSecondaryKeys(args: void): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentIdentity.ts:166

Unfreeze all the secondary keys in this Identity. This will restore their permissions as they were before being frozen

note this method is of type ProcedureMethod, which means you can call unfreezeSecondaryKeys.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Name

Type

args

void

Returns: Promise‹TransactionQueue‹void››

Static generateUuid

▸ generateUuid‹Identifiers›(identifiers: Identifiers): string

Inherited from CheckpointSchedule.generateUuid

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

Generate the Entity's UUID from its identifying properties

Type parameters:

▪ Identifiers

Parameters:

Name

Type

Description

identifiers

Identifiers

Returns: string

Static unserialize

▸ unserialize‹Identifiers›(serialized: string): Identifiers

Inherited from CheckpointSchedule.unserialize

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

Unserialize a UUID into its Unique Identifiers

Type parameters:

▪ Identifiers

Parameters:

Name

Type

Description

serialized

string

UUID to unserialize

Returns: Identifiers

PreviousCurrentAccountNextDefaultPortfolio

Last updated 4 years ago

Was this helpful?

‹boolean›

‹string›

| string

‹[]›

‹[]›

[]

‹unknown›

[]

Context
SubCallback
CreateVenueParams
SubCallback
SecurityToken
SubCallback
SecondaryKey
SubCallback
Venue
Role
Role
InviteAccountParams
Entity
ModifySignerPermissionsParams
RemoveSecondaryKeysParams
Signer