Polymesh SDK API Reference
v4.0.0
v4.0.0
  • Introduction
  • Globals
  • Classes
    • Account
    • AuthorizationRequest
    • Authorizations
    • Claims
    • Compliance
    • Context
    • Count
    • CurrentAccount
    • CurrentIdentity
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Documents
    • Entity
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • Middleware
    • NumberedPortfolio
    • Offerings
    • Percentage
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • SecurityToken
    • Settlements
    • Sto
    • TickerReservation
    • TokenHolders
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
    • AffirmationStatus
    • AuthorizationType
    • ClaimType
    • ConditionTarget
    • ConditionType
    • CountryCode
    • ErrorCode
    • InstructionStatus
    • InstructionType
    • KnownTokenType
    • ProposalStage
    • RoleType
    • ScopeType
    • StoStatus
    • TickerReservationStatus
    • TokenIdentifierType
    • TransactionArgumentType
    • TransactionQueueStatus
    • TransactionStatus
    • TransferStatus
    • TxGroup
    • VenueType
  • Interfaces
    • AccountBalance
    • AccountData
    • ActiveTransferRestrictions
    • AddBatchTransactionOpts
    • AddClaimsParams
    • AddInstructionParams
    • AddInvestorUniquenessClaimParams
    • AddTransactionOpts
    • AddTransactionOptsBase
    • ArrayTransactionArgument
    • CddProviderRole
    • ClaimData
    • ClaimScope
    • ClaimTarget
    • ComplexTransactionArgument
    • ConditionCompliance
    • ConnectParamsBase
    • ConstructorParams
    • ConsumeParams
    • CountTransferRestriction
    • CountTransferRestrictionInput
    • CreateSecurityTokenParams
    • CreateVenueParams
    • DeletePortfolioParams
    • EditClaimsParams
    • EventIdentifier
    • ExtrinsicData
    • Fees
    • HistoricSettlement
    • IdentityBalance
    • IdentityWithClaims
    • InstructionAffirmation
    • Investment
    • InviteAccountParams
    • IssueTokensParams
    • KeyringPair
    • Leg
    • MiddlewareConfig
    • ModifyInstructionAffirmationParams
    • ModifyPrimaryIssuanceAgentParams
    • ModifySignerPermissionsParams
    • ModifyTokenTrustedClaimIssuersAddSetParams
    • ModifyTokenTrustedClaimIssuersRemoveParams
    • MoveFundsParams
    • NetworkProperties
    • PaginationOptions
    • PercentageTransferRestriction
    • PercentageTransferRestrictionInput
    • Permissions
    • PermissionsLike
    • PlainTransactionArgument
    • PortfolioBalance
    • PortfolioCustodianRole
    • PortfolioMovement
    • ProcedureAuthorizationStatus
    • ProposalDetails
    • ProposalTimeFrames
    • ProposalVote
    • RedeemTokenParams
    • RegisterIdentityParams
    • RemoveSecondaryKeysParams
    • RenamePortfolioParams
    • Requirement
    • RequirementCompliance
    • ReserveTickerParams
    • ResultSet
    • RevokeClaimsParams
    • Scope
    • SecondaryKey
    • SecurityTokenDetails
    • SetAssetRequirementsParams
    • SetCountTransferRestrictionsParams
    • SetCustodianParams
    • SetPercentageTransferRestrictionsParams
    • SetTokenDocumentsParams
    • SettlementLeg
    • SimpleEnumTransactionArgument
    • StoDetails
    • StoTier
    • StoWithDetails
    • TickerOwnerRole
    • TickerReservationDetails
    • Tier
    • ToggleFreezeStoParams
    • ToggleFreezeTransfersParams
    • TogglePauseRequirementsParams
    • TokenDocument
    • TokenHolderOptions
    • TokenHolderProperties
    • TokenIdentifier
    • TokenOwnerRole
    • TokenPiaRole
    • TransferPolyXParams
    • TransferRestrictionInputBase
    • TransferTokenOwnershipParams
    • TrustedClaimIssuer
    • UiKeyring
    • UniqueIdentifiers
    • VenueDetails
    • VenueOwnerRole
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Properties
  • Accessors
  • Methods
  • Properties
  • claims
  • middleware
  • registerIdentity
  • reserveTicker
  • transferPolyX
  • Accessors
  • _polkadotApi
  • Methods
  • getAccount
  • getAccountBalance
  • getCurrentIdentity
  • getIdentity
  • getLatestBlock
  • getNetworkProperties
  • getSecurityToken
  • getSecurityTokens
  • getTickerReservation
  • getTickerReservations
  • getTransactionFees
  • getTreasuryAccount
  • getTreasuryBalance
  • isIdentityValid
  • isTickerAvailable
  • onConnectionError
  • onDisconnect
  • Static connect

Was this helpful?

  1. Classes

Polymesh

PreviousPercentageNextPolymeshError

Last updated 4 years ago

Was this helpful?

Main entry point of the Polymesh SDK

Hierarchy

  • Polymesh

Index

Properties

Accessors

Methods

Properties

claims

middleware

registerIdentity

Register an Identity

note must be a CDD provider

note required role:

  • Customer Due Diligence Provider

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

param ticker symbol to reserve

note required role:

  • Ticker Owner

transferPolyX

Transfer an amount of POLYX to a specified Account

param account that will receive the POLYX

param amount of POLYX to be transferred

param identifier string to help differentiate transfers

Accessors

_polkadotApi

• get _polkadotApi(): ApiPromise

Polkadot client

Returns: ApiPromise

Methods

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

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

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

• registerIdentity: ProcedureMethod‹, ›

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

• reserveTicker: ProcedureMethod‹, ›

Defined in

• transferPolyX: ProcedureMethod‹, void›

Defined in

Defined in

â–¸ 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

▸ 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:74
Middleware
src/Polymesh.ts:75
RegisterIdentityParams
Identity
src/Polymesh.ts:624
ReserveTickerParams
TickerReservation
src/Polymesh.ts:319
TransferPolyXParams
src/Polymesh.ts:258
src/Polymesh.ts:638
CurrentAccount
src/Polymesh.ts:432
CurrentAccount
Account
src/Polymesh.ts:433
Account
AccountBalance
src/Polymesh.ts:267
AccountBalance
src/Polymesh.ts:268
src/Polymesh.ts:269
CurrentIdentity
src/Polymesh.ts:425
CurrentIdentity
Identity
src/Polymesh.ts:418
Identity
src/Polymesh.ts:629
NetworkProperties
src/Polymesh.ts:570
NetworkProperties
SecurityToken
src/Polymesh.ts:544
SecurityToken
SecurityToken
src/Polymesh.ts:512
SecurityToken
TickerReservation
src/Polymesh.ts:392
TickerReservation
TickerReservation
src/Polymesh.ts:358
TickerReservation
src/Polymesh.ts:460
Account
src/Polymesh.ts:467
Account
src/Polymesh.ts:594
src/Polymesh.ts:595
src/Polymesh.ts:449
src/Polymesh.ts:326
src/Polymesh.ts:327
src/Polymesh.ts:476
src/Polymesh.ts:493
ConnectParamsBase
Polymesh
src/Polymesh.ts:103
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:113
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:127
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:137
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:146
Polymesh
claims
middleware
registerIdentity
reserveTicker
transferPolyX
_polkadotApi
getAccount
getAccountBalance
getCurrentIdentity
getIdentity
getLatestBlock
getNetworkProperties
getSecurityToken
getSecurityTokens
getTickerReservation
getTickerReservations
getTransactionFees
getTreasuryAccount
getTreasuryBalance
isIdentityValid
isTickerAvailable
onConnectionError
onDisconnect
connect
Account
Identity
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
Authorization Requests
Accounts
AccountBalance
AccountBalance
AccountBalance
AccountBalance
Identities
SubCallback
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
SubCallback