Module

x/polkadot/api/mod.ts>ScProvider

Package publishing for deno.land/x/polkadot
Go to Latest
class ScProvider
implements ProviderInterface
import { ScProvider } from "https://dotland.deno.dev/x/polkadot@0.2.38/api/mod.ts";

Constructors

new
ScProvider(
Sc: SubstrateConnect,
spec: string | ScType.WellKnownChain,
sharedSandbox?: ScProvider,
)

Properties

readonly
hasSubscriptions: boolean
readonly
isClonable: boolean
readonly
isConnected: boolean

Methods

clone(): ProviderInterface
connect(config?: ScType.Config, checkerFactory?): Promise<void>
disconnect(): Promise<void>
on(type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void
send<T = any>(method: string, params: unknown[]): Promise<T>
subscribe(
type: string,
method: string,
params: any[],
callback: ProviderInterfaceCallback,
): Promise<number | string>
unsubscribe(
type: string,
method: string,
id: number | string,
): Promise<boolean>