Polymesh
Main entry point of the Polymesh SDK
Hierarchy
Polymesh
Index
Properties
Accessors
Methods
Properties
accountManagement
• accountManagement: AccountManagement
Defined in src/Polymesh.ts:91
A set of methods for managing a Polymesh Identity's Accounts and their permissions
assets
• assets: Assets
Defined in src/Polymesh.ts:99
A set of methods for interacting with Assets
claims
• claims: Claims
Defined in src/Polymesh.ts:79
A set of methods to deal with Claims
identities
• identities: Identities
Defined in src/Polymesh.ts:95
A set of methods for interacting with Polymesh Identities.
network
• network: Network
Defined in src/Polymesh.ts:83
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:87
A set of methods for exchanging Assets
Accessors
_middlewareApi
• get _middlewareApi(): ApolloClient‹NormalizedCacheObject›
Defined in src/Polymesh.ts:274
Middleware client
Returns: ApolloClient‹NormalizedCacheObject›
_polkadotApi
• get _polkadotApi(): ApiPromise
Defined in src/Polymesh.ts:258
Polkadot client
Returns: ApiPromise
_signingAddress
• get _signingAddress(): string
Defined in src/Polymesh.ts:266
signing address (to manually submit transactions with the polkadot API)
Returns: string
Methods
disconnect
▸ disconnect(): Promise‹void›
Defined in src/Polymesh.ts:233
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:188
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:197
Handle connection errors
Parameters:
▪ callback: function
▸ (...args
: unknown[]): unknown
Parameters:
Returns: function
an unsubscribe callback
▸ (): void
onDisconnect
▸ onDisconnect(callback
: function): function
Defined in src/Polymesh.ts:214
Handle disconnection
Parameters:
▪ callback: function
▸ (...args
: unknown[]): unknown
Parameters:
Returns: function
an unsubscribe callback
▸ (): void
setSigningAccount
▸ setSigningAccount(signer
: string | Account): Promise‹void›
Defined in src/Polymesh.ts:242
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:
Returns: Promise‹void›
setSigningManager
▸ setSigningManager(signingManager
: SigningManager): Promise‹void›
Defined in src/Polymesh.ts:249
Set the SDK's Signing Manager to the provided one
Parameters:
Returns: Promise‹void›
Static
connect
Static
connect▸ connect(params
: ConnectParams): Promise‹Polymesh›
Defined in src/Polymesh.ts:124
Create an SDK instance and connect to a Polymesh node
Parameters:
Returns: Promise‹Polymesh›
Last updated