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
assets
• assets: Assets
A set of methods for interacting with Assets
Defined in
claims
• claims: Claims
A set of methods to deal with Claims
Defined in
identities
• identities: Identities
A set of methods for interacting with Polymesh Identities.
Defined in
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
settlements
• settlements: Settlements
A set of methods for exchanging Assets
Defined in
Accessors
_middlewareApi
• get
_middlewareApi(): default
<NormalizedCacheObject
>
Middleware client
Returns
default
<NormalizedCacheObject
>
Defined in
_polkadotApi
• get
_polkadotApi(): ApiPromise
Polkadot client
Returns
ApiPromise
Defined in
_signingAddress
• get
_signingAddress(): string
signing address (to manually submit transactions with the polkadot API)
Returns
string
Defined in
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
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
onConnectionError
▸ onConnectionError(callback
): () => void
Handle connection errors
Parameters
callback
(...args
: unknown
[]) => unknown
Returns
fn
an unsubscribe callback
▸ (): void
Handle connection errors
Returns
void
an unsubscribe callback
Defined in
onDisconnect
▸ onDisconnect(callback
): () => void
Handle disconnection
Parameters
callback
(...args
: unknown
[]) => unknown
Returns
fn
an unsubscribe callback
▸ (): void
Handle disconnection
Returns
void
an unsubscribe callback
Defined in
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
signer
string
| Account
Returns
Promise
<void
>
Defined in
setSigningManager
▸ setSigningManager(signingManager
): Promise
<void
>
Set the SDK's Signing Manager to the provided one
Parameters
signingManager
SigningManager
Returns
Promise
<void
>
Defined in
connect
▸ Static
connect(params
): Promise
<Polymesh
>
Create an SDK instance and connect to a Polymesh node
Parameters
params
ConnectParams
Returns
Promise
<Polymesh
>
Defined in
Last updated