api_client_Polymesh.Polymesh

@polymeshassociation/polymesh-sdk / Modules / api/client/Polymesh / Polymesh

Class: Polymesh

api/client/Polymesh.Polymesh

Main entry point of the Polymesh SDK

Table of contents

Properties

Accessors

Methods

Properties

accountManagement

accountManagement: AccountManagement

A set of methods for managing a Polymesh Identity's Accounts and their permissions

Defined in

api/client/Polymesh.ts:53


assets

assets: Assets

A set of methods for interacting with Assets

Defined in

api/client/Polymesh.ts:61


claims

claims: Claims

A set of methods to deal with Claims

Defined in

api/client/Polymesh.ts:41


identities

identities: Identities

A set of methods for interacting with Polymesh Identities.

Defined in

api/client/Polymesh.ts:57


network

network: Network

A set of methods to interact with the Polymesh network. This includes transferring POLYX, reading network properties and querying for historical events

Defined in

api/client/Polymesh.ts:45


settlements

settlements: Settlements

A set of methods for exchanging Assets

Defined in

api/client/Polymesh.ts:49

Accessors

_middlewareApi

get _middlewareApi(): default<NormalizedCacheObject>

Middleware client

Returns

default<NormalizedCacheObject>

Defined in

api/client/Polymesh.ts:258


_polkadotApi

get _polkadotApi(): ApiPromise

Polkadot client

Returns

ApiPromise

Defined in

api/client/Polymesh.ts:242


_signingAddress

get _signingAddress(): string

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

Returns

string

Defined in

api/client/Polymesh.ts:250

Methods

disconnect

disconnect(): Promise<void>

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>

Defined in

api/client/Polymesh.ts:217


getSigningIdentity

getSigningIdentity(): Promise<null | Identity>

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<null | Identity>

Defined in

api/client/Polymesh.ts:172


onConnectionError

onConnectionError(callback): () => void

Handle connection errors

Parameters

NameType

callback

(...args: unknown[]) => unknown

Returns

fn

an unsubscribe callback

▸ (): void

Handle connection errors

Returns

void

an unsubscribe callback

Defined in

api/client/Polymesh.ts:181


onDisconnect

onDisconnect(callback): () => void

Handle disconnection

Parameters

NameType

callback

(...args: unknown[]) => unknown

Returns

fn

an unsubscribe callback

▸ (): void

Handle disconnection

Returns

void

an unsubscribe callback

Defined in

api/client/Polymesh.ts:198


setSigningAccount

setSigningAccount(signer): Promise<void>

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>

Defined in

api/client/Polymesh.ts:226


setSigningManager

setSigningManager(signingManager): Promise<void>

Set the SDK's Signing Manager to the provided one

Parameters

NameType

signingManager

SigningManager

Returns

Promise<void>

Defined in

api/client/Polymesh.ts:233


connect

Static connect(params): Promise<Polymesh>

Create an SDK instance and connect to a Polymesh node

Parameters

NameType

params

ConnectParams

Returns

Promise<Polymesh>

Defined in

api/client/Polymesh.ts:86

Last updated