import { WsProvider } from "https://deno.land/x/polkadot@0.2.35/rpc-provider/mod.ts";
@polkadot/rpc-provider/ws
Examples
import Api from 'https://deno.land/x/polkadot@0.2.35/api/promise/index.ts';
import { WsProvider } from 'https://deno.land/x/polkadot@0.2.35/rpc-provider/ws/index.ts';
const provider = new WsProvider('ws://127.0.0.1:9944');
const api = new Api(provider);
Properties
readonly
isReady: Promise<WsProvider>Methods
protected
selectEndpointIndex(endpoints: string[]): numberclone(): WsProvider
connect(): Promise<void>
connectWithRetry(): Promise<void>
disconnect(): Promise<void>
on(type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void
send<T = any>(): Promise<T>
method: string,
params: unknown[],
isCacheable?: boolean,
subscription?: SubscriptionHandler,
subscribe(): Promise<number | string>
type: string,
method: string,
params: unknown[],
callback: ProviderInterfaceCallback,
unsubscribe(): Promise<boolean>
type: string,
method: string,
id: number | string,