api_client_Polymesh.Polymesh
Last updated
Was this helpful?
Last updated
Was this helpful?
/ / / Polymesh
.Polymesh
Main entry point of the Polymesh SDK
A set of methods for managing a Polymesh Identity's Accounts and their permissions
Defined in
A set of methods for interacting with Assets
Defined in
A set of methods to deal with Claims
Defined in
A set of methods for interacting with Polymesh Identities.
Defined in
A set of methods to interact with the Polymesh network. This includes transferring POLYX, reading network properties and querying for historical events
Defined in
A set of methods for exchanging Assets
Defined in
• get
_middlewareApi(): default
<NormalizedCacheObject
>
Middleware client
Returns
default
<NormalizedCacheObject
>
Defined in
• get
_polkadotApi(): ApiPromise
Polkadot client
Returns
ApiPromise
Defined in
• get
_signingAddress(): string
signing address (to manually submit transactions with the polkadot API)
Returns
string
Defined in
▸ disconnect(): Promise
<void
>
Disconnect the client and close all open connections and subscriptions
Returns
Promise
<void
>
Defined in
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
Defined in
▸ 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(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(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
Returns
Promise
<void
>
Defined in
▸ setSigningManager(signingManager
): Promise
<void
>
Set the SDK's Signing Manager to the provided one
Parameters
signingManager
SigningManager
Returns
Promise
<void
>
Defined in
Create an SDK instance and connect to a Polymesh node
Parameters
params
ConnectParams
Returns
Defined in
• accountManagement:
• assets:
• claims:
• identities:
• network:
• settlements:
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
▸ getSigningIdentity(): Promise
<null
| >
Promise
<null
| >
string
|
▸ Static
connect(params
): Promise
<>
Promise
<>