Polymesh SDK API Reference
v3.0.0
v3.0.0
  • Introduction
  • Globals
  • Classes
    • Account
    • AuthorizationRequest
    • Authorizations
    • Claims
    • Compliance
    • Context
    • CurrentAccount
    • CurrentIdentity
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Documents
    • Entity
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • Middleware
    • NumberedPortfolio
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • SecurityToken
    • Settlements
    • TickerReservation
    • TokenHolders
    • TransactionQueue
    • TrustedClaimIssuers
    • Venue
  • Enums
    • AffirmationStatus
    • AuthorizationType
    • ClaimType
    • ConditionTarget
    • ConditionType
    • CountryCode
    • ErrorCode
    • InstructionStatus
    • InstructionType
    • KnownTokenType
    • ProposalStage
    • RoleType
    • ScopeType
    • TickerReservationStatus
    • TokenIdentifierType
    • TransactionArgumentType
    • TransactionQueueStatus
    • TransactionStatus
    • TransferStatus
    • VenueType
  • Interfaces
    • AccountBalance
    • AccountData
    • AddBatchTransactionOpts
    • AddClaimsParams
    • AddInstructionParams
    • AddTransactionOpts
    • AddTransactionOptsBase
    • ArrayTransactionArgument
    • CddProviderRole
    • ClaimData
    • ClaimScope
    • ClaimTarget
    • ComplexTransactionArgument
    • ConditionCompliance
    • ConnectParamsBase
    • ConstructorParams
    • ConsumeParams
    • CreateSecurityTokenParams
    • CreateVenueParams
    • DeletePortfolioParams
    • EditClaimsParams
    • EventIdentifier
    • ExtrinsicData
    • Fees
    • IdentityBalance
    • IdentityWithClaims
    • InstructionAffirmation
    • InviteAccountParams
    • IssueTokensParams
    • KeyringPair
    • Leg
    • MiddlewareConfig
    • ModifyInstructionAffirmationParams
    • ModifyPrimaryIssuanceAgentParams
    • ModifySignerPermissionsParams
    • ModifyTokenTrustedClaimIssuersAddSetParams
    • ModifyTokenTrustedClaimIssuersRemoveParams
    • MoveFundsParams
    • NetworkProperties
    • PaginationOptions
    • Permissions
    • PermissionsLike
    • 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
    • TrustedClaimIssuer
    • 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:83
Middleware
src/Polymesh.ts:84
src/Polymesh.ts:655
CurrentAccount
src/Polymesh.ts:445
CurrentAccount
Account
src/Polymesh.ts:446
Account
AccountBalance
src/Polymesh.ts:276
AccountBalance
src/Polymesh.ts:277
src/Polymesh.ts:278
CurrentIdentity
src/Polymesh.ts:438
CurrentIdentity
Identity
src/Polymesh.ts:431
Identity
src/Polymesh.ts:646
NetworkProperties
src/Polymesh.ts:588
NetworkProperties
SecurityToken
src/Polymesh.ts:562
SecurityToken
SecurityToken
src/Polymesh.ts:525
SecurityToken
TickerReservation
src/Polymesh.ts:405
TickerReservation
TickerReservation
src/Polymesh.ts:366
TickerReservation
src/Polymesh.ts:473
Account
src/Polymesh.ts:480
Account
src/Polymesh.ts:612
src/Polymesh.ts:613
src/Polymesh.ts:462
src/Polymesh.ts:334
src/Polymesh.ts:335
src/Polymesh.ts:489
src/Polymesh.ts:506
RegisterIdentityParams
TransactionQueue
Identity
src/Polymesh.ts:639
Authorization Requests
Accounts
Identities
TransactionQueue
Identity
ReserveTickerParams
TransactionQueue
TickerReservation
src/Polymesh.ts:325
TransactionQueue
TickerReservation
TransferPolyXParams
TransactionQueue
src/Polymesh.ts:265
TransactionQueue
ConnectParamsBase
Polymesh
src/Polymesh.ts:106
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:116
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:130
Polymesh
ConnectParamsBase
Polymesh
src/Polymesh.ts:139
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
AccountBalance
AccountBalance
AccountBalance
SubCallback
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
UnsubCallback
SubCallback
SubCallback