Polymesh
Main entry point of the Polymesh SDK

Hierarchy

  • Polymesh

Index

Properties

Accessors

Methods

Properties

accountManagement

accountManagement: AccountManagement
Defined in src/Polymesh.ts:53
A set of methods for managing a Polymesh Identity's Accounts and their permissions

assets

assets: Assets
Defined in src/Polymesh.ts:61
A set of methods for interacting with Assets

claims

claims: Claims
Defined in src/Polymesh.ts:41
A set of methods to deal with Claims

identities

identities: Identities
Defined in src/Polymesh.ts:57
A set of methods for interacting with Polymesh Identities.

network

network: Network
Defined in src/Polymesh.ts:45
A set of methods to interact with the Polymesh network. This includes transferring POLYX, reading network properties and querying for historical events

settlements

settlements: Settlements
Defined in src/Polymesh.ts:49
A set of methods for exchanging Assets

Accessors

_middlewareApi

get _middlewareApi(): ApolloClient‹NormalizedCacheObject›
Defined in src/Polymesh.ts:267
Middleware client
Returns: ApolloClient‹NormalizedCacheObject›

_polkadotApi

get _polkadotApi(): ApiPromise
Defined in src/Polymesh.ts:251
Polkadot client
Returns: ApiPromise

_signingAddress

get _signingAddress(): string
Defined in src/Polymesh.ts:259
signing address (to manually submit transactions with the polkadot API)
Returns: string

Methods

disconnect

disconnect(): Promise‹void›
Defined in src/Polymesh.ts:226
Disconnect the client and close all open connections and subscriptions
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 connect
Returns: Promise‹void›

getSigningIdentity

getSigningIdentity(): Promise‹Identity | null›
Defined in src/Polymesh.ts:181
Retrieve the Identity associated to the signing Account (null if there is none)
throws if there is no signing Account associated to the SDK
Returns: Promise‹Identity | null›

onConnectionError

onConnectionError(callback: function): function
Defined in src/Polymesh.ts:190
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
Defined in src/Polymesh.ts:207
Handle disconnection
Parameters:
callback: function
▸ (...args: unknown[]): unknown
Parameters:
Name
Type
...args
unknown[]
Returns: function
an unsubscribe callback
▸ (): void

setSigningAccount

setSigningAccount(signer: string | Account): Promise‹void›
Defined in src/Polymesh.ts:235
Set the SDK's signing Account to the provided one
throws if the passed Account is not present in the Signing Manager (or there is no Signing Manager)
Parameters:
Name
Type
signer
string | Account
Returns: Promise‹void›

setSigningManager

setSigningManager(signingManager: SigningManager): Promise‹void›
Defined in src/Polymesh.ts:242
Set the SDK's Signing Manager to the provided one
Parameters:
Name
Type
signingManager
SigningManager
Returns: Promise‹void›

Static connect

connect(params: ConnectParams): Promise‹Polymesh
Defined in src/Polymesh.ts:86
Create an SDK instance and connect to a Polymesh node
Parameters:
Name
Type
params
Returns: Promise‹Polymesh