class WsProvider
implements ProviderInterface
import { WsProvider } from "https://deno.land/x/polkadot@0.2.11/rpc-provider/ws/index.ts";
@polkadot/rpc-provider/ws
Examples
import Api from 'https://deno.land/x/polkadot@0.2.11/api/promise/index.ts';
import { WsProvider } from 'https://deno.land/x/polkadot@0.2.11/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>readonly
stats: ProviderStatsMethods
clone(): 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>
unsubscribe(): Promise<boolean>
type: string,
method: string,
id: number | string,