import { RpcCore } from "https://deno.land/x/polkadot@0.2.12/rpc-core/bundle.ts";
Examples
import Rpc from 'https://deno.land/x/polkadot@0.2.12/rpc-core/mod.ts';
import { WsProvider } from 'https://deno.land/x/polkadot@0.2.12/rpc-provider/ws/index.ts';
const provider = new WsProvider('ws://127.0.0.1:9944');
const rpc = new Rpc(provider);
Constructors
new
RpcCore(instanceId: string,
registry: Registry,
provider: ProviderInterface,
userRpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>,
Properties
readonly
mapping: Map<string, DefinitionRpcExt>readonly
provider: ProviderInterfaceMethods
private
_createMethodSend(): RpcInterfaceMethodprivate
_createMethodSubscribe(): RpcInterfaceMethodprivate
_createSubscriber(unnamed 0: { subType: string; subName: string; paramsJson: AnyJson[]; update: ProviderInterfaceCallback; }, errorHandler: (error: Error) => void): Promise<number | string>private
_formatInputs(registry: Registry,
blockHash: ,
| Uint8Array
| string
| null
| undefined
def: DefinitionRpc,
inputs: unknown[],
private
_formatOutput(registry: Registry,
blockHash: ,
| Uint8Array
| string
| null
| undefined
method: string,
rpc: DefinitionRpc,
params: Codec[],
result?: unknown,
private
_formatResult<T>(isScale: boolean,
registry: Registry,
blockHash: ,
| string
| Uint8Array
| null
| undefined
method: string,
def: DefinitionRpc,
params: Codec[],
result: unknown,
private
_formatStorageData(registry: Registry,
blockHash: ,
| Uint8Array
| string
| null
| undefined
key: StorageKey,
value: string | null,
private
_formatStorageSet(): Codec[]private
_formatStorageSetEntry(registry: Registry,
blockHash: string,
key: StorageKey,
changes: [string, string | null][],
withCache: boolean,
entryIndex: number,
private
_memomize(creator: <T>(isScale: boolean) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): MemoizedRpcInterfaceMethodprivate
_newType(registry: Registry,
blockHash: ,
| Uint8Array
| string
| null
| undefined
key: StorageKey,
input: string | Uint8Array | null,
isEmpty: boolean,
entryIndex?,
addUserInterfaces(userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void
connect(): Promise<void>
disconnect(): Promise<void>
setRegistrySwap(registrySwap: (blockHash: Uint8Array) => Promise<{ registry: Registry; }>): void
setResolveBlockHash(resolveBlockHash: (blockNumber: AnyNumber) => Promise<Uint8Array>): void