Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/api/base/Init.ts>Init

Package publishing for deno.land/x/polkadot
Go to Latest
class Init
extends Decorate<ApiType>
Abstract
import { Init } from "https://deno.land/x/polkadot@0.2.14/api/base/Init.ts";

Constructors

new
Init(
options: ApiOptions,
type: ApiTypes,
decorateMethod: DecorateMethod<ApiType>,
)

Type Parameters

ApiType extends ApiTypes

Methods

private
_createBlockRegistry(
blockHash: Uint8Array,
header: HeaderPartial,
): Promise<VersionedRegistry<ApiType>>
private
_getBlockRegistryViaHash(blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>>
private
_getBlockRegistryViaVersion(blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null
private
_initFromMeta(metadata: Metadata): boolean
private
_initRegistry(
registry: Registry,
chain: Text,
version: { specName: Text; specVersion: BN; },
metadata: Metadata,
chainProps?: ChainProperties,
): void
private
_metaFromChain(optMetadata?: Record<string, HexString>): Promise<[Hash, Metadata]>
private
_metaFromSource(source: ApiBase<any>): Promise<[Hash, Metadata]>
private
_subscribeHealth(): void
private
_subscribeUpdates(): void
private
_unsubscribeHealth(): void
private
_unsubscribeUpdates(): void
protected
_loadMeta(): Promise<boolean>
protected
_unsubscribe(): void
at(blockHash: Uint8Array | string, knownVersion?: RuntimeVersion): Promise<ApiDecoration<ApiType>>
getBlockRegistry(blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>>