import { HttpProvider } from "https://deno.land/x/polkadot@0.2.35/rpc-provider/mod.ts";
@polkadot/rpc-provider
Examples
import Api from 'https://deno.land/x/polkadot@0.2.35/api/promise/index.ts';
import { HttpProvider } from 'https://deno.land/x/polkadot@0.2.35/rpc-provider/mod.ts';
const provider = new HttpProvider('http://127.0.0.1:9933');
const api = new Api(provider);
Methods
connect(): Promise<void>
disconnect(): Promise<void>
on(_type: ProviderInterfaceEmitted, _sub: ProviderInterfaceEmitCb): () => void
send<T>(): Promise<T>
method: string,
params: unknown[],
isCacheable?: boolean,
subscribe(): Promise<number>
_types: string,
_method: string,
_params: unknown[],
_cb: ProviderInterfaceCallback,
unsubscribe(): Promise<boolean>
_type: string,
_method: string,
_id: number,