Use factory methods (create
, new
) to create DedotClient
instances.
Protected
Optional
_chainProtected
Optional
_chainProtected
Optional
_genesisProtected
Optional
_localProtected
Optional
_metadataProtected
_optionsProtected
Optional
_registryProtected
Optional
_runtimeProtected
Optional
_runtimeProtected
Optional
_txEntry-point for executing JSON-RPCs to blockchain node.
const client = new JsonRpcClient('wss://rpc.polkadot.io');
await client.connect();
// Subscribe to new heads
client.rpc.chain_subscribeNewHeads((header) => {
console.log(header);
});
// Execute arbitrary rpc method: `module_rpc_name`
const result = await client.rpc.module_rpc_name();
Protected
afterGet a new API instance at a specific block hash For now, this only supports pinned block hashes from the chain head
Protected
beforeProtected
callProtected
cleanProtected
clearProtected
doProtected
doProtected
doneRest
...args: any[]Protected
ensureProtected
fetchOptional
hash: `0x${string}`Optional
runtime: SubstrateRuntimeVersionProtected
getOptional
runtime: SubstrateRuntimeVersionProtected
getOptional
runtime: SubstrateRuntimeVersionGet current version of the runtime
This is similar to .runtimeVersion
but also ensure
the corresponding metadata of this runtime version is downloaded & setup.
This is helpful when you want to check runtime version to prepare for runtime upgrade
Protected
initializeProtected
initializeProtected
normalizeOptional
handler: HandlerFnProtected
onProtected
onProtected
onProtected
setProtected
setupProtected
shouldProtected
startProtected
subscribeProtected
toStatic
createFactory method to create a new DedotClient instance
Static
newAlias for DedotClient.create
Name
DedotClient
Description
New promised-based API Client for Polkadot & Substrate based on JSON-RPC V2
Unstable, use with caution.