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:270

Middleware client

Returns: ApolloClient‹NormalizedCacheObject›


_polkadotApi

get _polkadotApi(): ApiPromise

Defined in src/Polymesh.ts:254

Polkadot client

Returns: ApiPromise


_signingAddress

get _signingAddress(): string

Defined in src/Polymesh.ts:262

signing address (to manually submit transactions with the polkadot API)

Returns: string

Methods

disconnect

disconnect(): Promise‹void›

Defined in src/Polymesh.ts:229

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:184

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:193

Handle connection errors

Parameters:

callback: function

▸ (...args: unknown[]): unknown

Parameters:

NameType

...args

unknown[]

Returns: function

an unsubscribe callback

▸ (): void


onDisconnect

onDisconnect(callback: function): function

Defined in src/Polymesh.ts:210

Handle disconnection

Parameters:

callback: function

▸ (...args: unknown[]): unknown

Parameters:

NameType

...args

unknown[]

Returns: function

an unsubscribe callback

▸ (): void


setSigningAccount

setSigningAccount(signer: string | Account): Promise‹void›

Defined in src/Polymesh.ts:238

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:

NameType

signer

string | Account

Returns: Promise‹void›


setSigningManager

setSigningManager(signingManager: SigningManager): Promise‹void›

Defined in src/Polymesh.ts:245

Set the SDK's Signing Manager to the provided one

Parameters:

NameType

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:

NameType

params

Returns: Promise‹Polymesh

Last updated