Polymesh SDK API Reference
v2.0.0
v2.0.0
  • Introduction
  • Globals
  • Classes
    • Account
    • AuthorizationRequest
    • Authorizations
    • Claims
    • Compliance
    • Context
    • CurrentAccount
    • CurrentIdentity
    • DefaultPortfolio
    • Documents
    • Entity
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • Middleware
    • NumberedPortfolio
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • Portfolio
    • Portfolios
    • Requirements
    • SecurityToken
    • Settlements
    • TickerReservation
    • TokenHolders
    • TransactionQueue
    • TrustedClaimIssuer
    • TrustedClaimIssuers
    • Venue
  • Enums
    • AuthorizationStatus
    • AuthorizationType
    • ClaimType
    • ConditionTarget
    • ConditionType
    • CountryCode
    • ErrorCode
    • InstructionStatus
    • InstructionType
    • KnownTokenType
    • Permission
    • ProposalStage
    • RoleType
    • ScopeType
    • TickerReservationStatus
    • TokenIdentifierType
    • TransactionArgumentType
    • TransactionQueueStatus
    • TransactionStatus
    • TransferStatus
    • VenueType
  • Interfaces
    • AccountBalance
    • AccountData
    • AddClaimItem
    • AddClaimsParams
    • AddInstructionParams
    • AddTransactionOpts
    • ArrayTransactionArgument
    • CddProviderRole
    • ClaimData
    • ClaimScope
    • ClaimTarget
    • ComplexTransactionArgument
    • ConditionCompliance
    • ConnectParamsBase
    • ConstructorParams
    • ConsumeParams
    • CreateSecurityTokenParams
    • CreateVenueParams
    • DeletePortfolioParams
    • EditClaimsParams
    • EventIdentifier
    • ExtrinsicData
    • Fees
    • IdentityBalance
    • IdentityWithClaims
    • InstructionAuthorization
    • InviteAccountParams
    • IssueTokensParams
    • KeyringPair
    • Leg
    • MiddlewareConfig
    • ModifyInstructionAuthorizationParams
    • ModifyPrimaryIssuanceAgentParams
    • ModifyTokenTrustedClaimIssuersParams
    • MoveFundsParams
    • NetworkProperties
    • PaginationOptions
    • PlainTransactionArgument
    • PortfolioBalance
    • PortfolioCustodianRole
    • PortfolioMovement
    • ProposalDetails
    • ProposalTimeFrames
    • ProposalVote
    • RegisterIdentityParams
    • RemoveSecondaryKeysParams
    • RenamePortfolioParams
    • Requirement
    • RequirementCompliance
    • ReserveTickerParams
    • ResultSet
    • RevokeClaimsParams
    • Scope
    • SecondaryKey
    • SecurityTokenDetails
    • SetAssetRequirementsParams
    • SetCustodianParams
    • SetTokenDocumentsParams
    • SimpleEnumTransactionArgument
    • TickerOwnerRole
    • TickerReservationDetails
    • ToggleFreezeTransfersParams
    • TogglePauseRequirementsParams
    • TokenDocument
    • TokenHolderOptions
    • TokenHolderProperties
    • TokenIdentifier
    • TokenOwnerRole
    • TransferPolyXParams
    • TransferTokenOwnershipParams
    • UiKeyring
    • UniqueIdentifiers
    • VenueDetails
    • VenueOwnerRole
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Properties
  • Accessors
  • Methods
  • Properties
  • claims
  • middleware
  • Accessors
  • _polkadotApi
  • Methods
  • 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

PreviousNumberedPortfolioNextPolymeshError

Last updated 4 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

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

registerIdentity

Register an Identity

note must be a CDD 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 without an account

Parameters:

Name

Type

params

• claims:

Defined in

• middleware:

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

▸ 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

Returns: Promise‹‹››

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

Defined in

Returns: Promise‹‹››

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

Defined in

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: ): Promise‹›

Defined in

Returns: Promise‹›

Claims
src/Polymesh.ts:78
Middleware
src/Polymesh.ts:79
src/Polymesh.ts:651
CurrentAccount
src/Polymesh.ts:441
CurrentAccount
Account
src/Polymesh.ts:442
Account
AccountBalance
src/Polymesh.ts:272
AccountBalance
src/Polymesh.ts:273
src/Polymesh.ts:274
CurrentIdentity
src/Polymesh.ts:434
CurrentIdentity
Identity
src/Polymesh.ts:427
Identity
src/Polymesh.ts:642
NetworkProperties
src/Polymesh.ts:584
NetworkProperties
SecurityToken
src/Polymesh.ts:558
SecurityToken
SecurityToken
src/Polymesh.ts:521
SecurityToken
TickerReservation
src/Polymesh.ts:401
TickerReservation
TickerReservation
src/Polymesh.ts:362
TickerReservation
src/Polymesh.ts:469
Account
src/Polymesh.ts:476
Account
src/Polymesh.ts:608
src/Polymesh.ts:609
src/Polymesh.ts:458
src/Polymesh.ts:330
src/Polymesh.ts:331
src/Polymesh.ts:485
src/Polymesh.ts:502
RegisterIdentityParams
TransactionQueue
Identity
src/Polymesh.ts:635
TransactionQueue
Identity
ReserveTickerParams
TransactionQueue
TickerReservation
src/Polymesh.ts:321
TransactionQueue
TickerReservation
TransferPolyXParams
TransactionQueue
src/Polymesh.ts:261
TransactionQueue
ConnectParamsBase
Polymesh
src/Polymesh.ts:101
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:111
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:125
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:134
Polymesh
claims
middleware
_polkadotApi
getAccount
getAccountBalance
getCurrentIdentity
getIdentity
getLatestBlock
getNetworkProperties
getSecurityToken
getSecurityTokens
getTickerReservation
getTickerReservations
getTransactionFees
getTreasuryAccount
getTreasuryBalance
isIdentityValid
isTickerAvailable
onConnectionError
onDisconnect
registerIdentity
reserveTicker
transferPolyX
connect
Account
Identity
RegisterIdentityParams
ReserveTickerParams
TransferPolyXParams
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
ConnectParamsBase
AccountBalance
SubCallback
UnsubCallback
UnsubCallback
AccountBalance
SubCallback
UnsubCallback
AccountBalance
SubCallback
UnsubCallback
SubCallback
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
AccountBalance
SubCallback
SubCallback
Authorization Requests
Accounts
Identities