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
  • Properties
  • Accessors
  • Methods
  • Properties
  • claims
  • middleware
  • Accessors
  • _polkadotApi
  • Methods
  • claimClassicTicker
  • disconnect
  • getAccount
  • getAccountBalance
  • getCurrentIdentity
  • getIdentity
  • getLatestBlock
  • getNetworkProperties
  • getSecurityToken
  • getSecurityTokens
  • getTickerReservation
  • getTickerReservations
  • getTransactionFees
  • getTreasuryAccount
  • getTreasuryBalance
  • isIdentityValid
  • isTickerAvailable
  • onConnectionError
  • onDisconnect
  • registerIdentity
  • reserveTicker
  • transferPolyx
  • Static connect

Was this helpful?

  1. Classes

Polymesh

PreviousPercentageNextPolymeshError

Last updated 3 years ago

Was this helpful?

Main entry point of the Polymesh SDK

Hierarchy

  • Polymesh

Index

Properties

Accessors

Methods

Properties

claims

middleware

Accessors

_polkadotApi

• get _polkadotApi(): ApiPromise

Polkadot client

Returns: ApiPromise

Methods

claimClassicTicker

Claim a ticker symbol that was reserved in Polymath Classic (Ethereum). The Ethereum account that owns the ticker must sign a special message that contains the DID of the Identity that will own the ticker in Polymesh, and provide the signed data to this call

Parameters:

Name

Type

args

disconnect

▸ disconnect(): Promise‹void›

Disconnect the client and close all open connections and subscriptions

Returns: Promise‹void›

getAccount

Create an Account instance from an address. If no address is passed, the current Account is returned

Parameters:

â–ª args: object

Name

Type

address

string

getAccountBalance

Get the free/locked POLYX balance of an Account

note can be subscribed to

Parameters:

Name

Type

args?

undefined | object

Parameters:

Name

Type

callback

Parameters:

â–ª args: object

Name

Type

account

getCurrentIdentity

Retrieve the Identity associated to the current Account (null if there is none)

getIdentity

Create an Identity instance from a DID

Parameters:

â–ª args: object

Name

Type

did

string

getLatestBlock

▸ getLatestBlock(): Promise‹BigNumber›

Retrieve the number of the latest block in the chain

Returns: Promise‹BigNumber›

getNetworkProperties

Retrieve information for the current network

getSecurityToken

Retrieve a Security Token

Parameters:

â–ª args: object

Name

Type

Description

ticker

string

Security Token ticker

getSecurityTokens

Retrieve all the Security Tokens owned by an Identity

note tokens with unreadable characters in their tickers will be left out

Parameters:

Name

Type

args?

undefined | object

getTickerReservation

Retrieve a Ticker Reservation

Parameters:

â–ª args: object

Name

Type

Description

ticker

string

Security Token ticker

getTickerReservations

Retrieve all the ticker reservations currently owned by an Identity. This doesn't include tokens that have already been launched

note reservations with unreadable characters in their tickers will be left out

Parameters:

Name

Type

args?

undefined | object

getTransactionFees

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

Retrieve the protocol fees associated with running a specific transaction

Parameters:

â–ª args: object

Name

Type

Description

tag

TxTag

transaction tag (i.e. TxTags.asset.CreateAsset or "asset.createAsset")

Returns: Promise‹BigNumber›

getTreasuryAccount

Get the treasury wallet address

getTreasuryBalance

▸ getTreasuryBalance(): Promise‹BigNumber›

Get the Treasury POLYX balance

note can be subscribed to

Returns: Promise‹BigNumber›

Parameters:

Name

Type

callback

isIdentityValid

▸ isIdentityValid(args: object): Promise‹boolean›

Return whether the supplied Identity/DID exists

Parameters:

â–ª args: object

Name

Type

identity

Returns: Promise‹boolean›

isTickerAvailable

▸ isTickerAvailable(args: object): Promise‹boolean›

Check if a ticker hasn't been reserved

note can be subscribed to

Parameters:

â–ª args: object

Name

Type

ticker

string

Returns: Promise‹boolean›

Parameters:

â–ª args: object

Name

Type

ticker

string

onConnectionError

â–¸ onConnectionError(callback: function): function

Handle connection errors

Parameters:

â–ª callback: function

â–¸ (...args: unknown[]): unknown

Parameters:

Name

Type

...args

unknown[]

Returns: function

an unsubscribe callback

â–¸ (): void

onDisconnect

â–¸ onDisconnect(callback: function): function

Handle disconnection

Parameters:

â–ª callback: function

â–¸ (...args: unknown[]): unknown

Parameters:

Name

Type

...args

unknown[]

Returns: function

an unsubscribe callback

â–¸ (): void

registerIdentity

Register an Identity

note must be a CDD provider

note required role:

  • Customer Due Diligence Provider

Parameters:

Name

Type

args

reserveTicker

Reserve a ticker symbol to later use in the creation of a Security Token. The ticker will expire after a set amount of time, after which other users can reserve it

Parameters:

Name

Type

args

transferPolyx

Transfer an amount of POLYX to a specified Account

Parameters:

Name

Type

args

Static connect

Create the instance and connect to the Polymesh node using an account seed

Parameters:

Name

Type

params

Create the instance and connect to the Polymesh node using a keyring

Parameters:

Name

Type

params

Create the instance and connect to the Polymesh node using an account URI

Parameters:

Name

Type

params

Create the instance and connect to the Polymesh node using an account mnemonic

Parameters:

Name

Type

params

Create the instance and connect to the Polymesh node without an account

Parameters:

Name

Type

params

• claims:

Defined in

• middleware:

Defined in

Defined in

▸ claimClassicTicker(args: ): Promise‹‹››

Defined in

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

Returns: Promise‹‹››

Defined in

note the SDK will become unusable after this operation. It will throw an error when attempting to access any chain or middleware data. If you wish to continue using the SDK, you must create a new instance by calling

â–¸ getAccount():

Defined in

Returns:

â–¸ getAccount(args: object):

Defined in

Returns:

▸ getAccountBalance(args?: undefined | object): Promise‹›

Defined in

Returns: Promise‹›

▸ getAccountBalance(callback: ‹›): Promise‹›

Defined in

‹›

Returns: Promise‹›

▸ getAccountBalance(args: object, callback: ‹›): Promise‹›

Defined in

string |

▪ callback: ‹›

Returns: Promise‹›

▸ getCurrentIdentity(): Promise‹ | null›

Defined in

Returns: Promise‹ | null›

â–¸ getIdentity(args: object):

Defined in

Returns:

Defined in

▸ getNetworkProperties(): Promise‹›

Defined in

Returns: Promise‹›

▸ getSecurityToken(args: object): Promise‹›

Defined in

Returns: Promise‹›

▸ getSecurityTokens(args?: undefined | object): Promise‹[]›

Defined in

Returns: Promise‹[]›

▸ getTickerReservation(args: object): Promise‹›

Defined in

Returns: Promise‹›

▸ getTickerReservations(args?: undefined | object): Promise‹[]›

Defined in

Returns: Promise‹[]›

Defined in

â–¸ getTreasuryAccount():

Defined in

Returns:

Defined in

▸ getTreasuryBalance(callback: ‹BigNumber›): Promise‹›

Defined in

‹BigNumber›

Returns: Promise‹›

Defined in

| string

Defined in

▸ isTickerAvailable(args: object, callback: ‹boolean›): Promise‹›

Defined in

▪ callback: ‹boolean›

Returns: Promise‹›

Defined in

Defined in

▸ registerIdentity(args: ): Promise‹‹››

Defined in

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

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

Returns: Promise‹‹››

▸ reserveTicker(args: ): Promise‹‹››

Defined in

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

Returns: Promise‹‹››

▸ transferPolyx(args: ): Promise‹‹void››

Defined in

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

Returns: Promise‹‹void››

▸ connect(params: & object): Promise‹›

Defined in

& object

Returns: Promise‹›

▸ connect(params: & object): Promise‹›

Defined in

& object

Returns: Promise‹›

▸ connect(params: & object): Promise‹›

Defined in

& object

Returns: Promise‹›

▸ connect(params: & object): Promise‹›

Defined in

& object

Returns: Promise‹›

▸ connect(params: ): Promise‹›

Defined in

Returns: Promise‹›

Claims
src/Polymesh.ts:77
Middleware
src/Polymesh.ts:78
src/Polymesh.ts:699
ClaimClassicTickerParams
TransactionQueue
TickerReservation
src/Polymesh.ts:350
ProcedureMethod
TransactionQueue
TickerReservation
src/Polymesh.ts:689
CurrentAccount
src/Polymesh.ts:472
CurrentAccount
Account
src/Polymesh.ts:473
Account
src/Polymesh.ts:288
src/Polymesh.ts:289
src/Polymesh.ts:290
CurrentIdentity
src/Polymesh.ts:465
CurrentIdentity
Identity
src/Polymesh.ts:458
Identity
src/Polymesh.ts:678
NetworkProperties
src/Polymesh.ts:614
NetworkProperties
SecurityToken
src/Polymesh.ts:588
SecurityToken
SecurityToken
src/Polymesh.ts:556
SecurityToken
TickerReservation
src/Polymesh.ts:425
TickerReservation
TickerReservation
src/Polymesh.ts:391
TickerReservation
src/Polymesh.ts:500
Account
src/Polymesh.ts:507
Account
src/Polymesh.ts:638
src/Polymesh.ts:639
src/Polymesh.ts:489
src/Polymesh.ts:359
src/Polymesh.ts:360
src/Polymesh.ts:520
src/Polymesh.ts:537
RegisterIdentityParams
TransactionQueue
Identity
src/Polymesh.ts:671
ProcedureMethod
TransactionQueue
Identity
ReserveTickerParams
TransactionQueue
TickerReservation
src/Polymesh.ts:338
ProcedureMethod
TransactionQueue
TickerReservation
TransferPolyxParams
TransactionQueue
src/Polymesh.ts:277
ProcedureMethod
TransactionQueue
ConnectParamsBase
Polymesh
src/Polymesh.ts:124
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:134
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:148
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:158
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:167
Polymesh
claims
middleware
_polkadotApi
claimClassicTicker
disconnect
getAccount
getAccountBalance
getCurrentIdentity
getIdentity
getLatestBlock
getNetworkProperties
getSecurityToken
getSecurityTokens
getTickerReservation
getTickerReservations
getTransactionFees
getTreasuryAccount
getTreasuryBalance
isIdentityValid
isTickerAvailable
onConnectionError
onDisconnect
registerIdentity
reserveTicker
transferPolyx
connect
connect
ClaimClassicTickerParams
Account
Identity
RegisterIdentityParams
ReserveTickerParams
TransferPolyxParams
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
Authorization Requests
Accounts
Identities
AccountBalance
AccountBalance
SubCallback
AccountBalance
UnsubCallback
UnsubCallback
SubCallback
AccountBalance
UnsubCallback
SubCallback
AccountBalance
UnsubCallback
SubCallback
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
AccountBalance
SubCallback