Polymesh
Last updated
Was this helpful?
Last updated
Was this helpful?
Main entry point of the Polymesh SDK
Polymesh
A set of methods for managing a Polymesh Identity's Accounts and their permissions
A set of methods for interacting with Assets
A set of methods to deal with Claims
A set of methods for interacting with Polymesh Identities.
A set of methods to interact with the Polymesh network. This includes transferring POLYX, reading network properties and querying for historical events
• settlements: Settlements
A set of methods for exchanging Assets
• get _middlewareApi(): ApolloClient‹NormalizedCacheObject›
Middleware client
Returns: ApolloClient‹NormalizedCacheObject›
• get _polkadotApi(): ApiPromise
Polkadot client
Returns: ApiPromise
• get _signingAddress(): string
signing address (to manually submit transactions with the polkadot API)
Returns: string
▸ disconnect(): Promise‹void›
Disconnect the client and close all open connections and subscriptions
Returns: Promise‹void›
Retrieve the Identity associated to the signing Account (null if there is none)
throws
if there is no signing Account associated to the SDK
▸ onConnectionError(callback
: function): function
Handle connection errors
Parameters:
▪ callback: function
▸ (...args
: unknown[]): unknown
Parameters:
...args
unknown[]
Returns: function
an unsubscribe callback
▸ (): void
▸ onDisconnect(callback
: function): function
Handle disconnection
Parameters:
▪ callback: function
▸ (...args
: unknown[]): unknown
Parameters:
...args
unknown[]
Returns: function
an unsubscribe callback
▸ (): 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›
▸ setSigningManager(signingManager
: SigningManager): Promise‹void›
Set the SDK's Signing Manager to the provided one
Parameters:
signingManager
SigningManager
Returns: Promise‹void›
Static
connectCreate an SDK instance and connect to a Polymesh node
Parameters:
params
• accountManagement:
Defined in
• assets:
Defined in
• claims:
Defined in
• identities:
Defined in
• network:
Defined in
Defined in
Defined in
Defined in
Defined in
Defined in
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›
Defined in
Returns: Promise‹ | null›
Defined in
Defined in
▸ setSigningAccount(signer
: string | ): Promise‹void›
Defined in
string |
Defined in
▸ connect(params
: ): Promise‹›
Defined in
Returns: Promise‹›