Module

x/polkadot/rpc-provider/types.ts>ProviderInterface

Package publishing for deno.land/x/polkadot
Go to Latest
interface ProviderInterface
import { type ProviderInterface } from "https://dotland.deno.dev/x/polkadot@0.2.38/rpc-provider/types.ts";

Properties

readonly
hasSubscriptions: boolean

true if the provider supports subscriptions (not available for HTTP)

readonly
isClonable: boolean

true if the clone() functionality is available on the provider

readonly
isConnected: boolean

true if the provider is currently connected (ws/sc has connection logic)

readonly
optional
stats: ProviderStats

(optional) stats for the provider with connections/bytes

Methods

connect(): Promise<void>
disconnect(): Promise<void>
send<T = any>(
method: string,
params: unknown[],
isCacheable?: boolean,
): Promise<T>
subscribe(
type: string,
method: string,
params: unknown[],
): Promise<number | string>
unsubscribe(
type: string,
method: string,
id: number | string,
): Promise<boolean>