Skip to main content
Version: v29.0.x

Interface: PolkadotConfig

Defined in: src/api/client/types.ts:142

Properties

metadata?

optional metadata: Record<string, `0x${string}`>

Defined in: src/api/client/types.ts:161

provide a locally saved metadata file for a modestly fast startup time (e.g. 1 second when provided, 1.5 seconds without).

Note

if not provided the SDK will read the needed data from chain during startup

Note

format is key as genesis hash and spec version and the value hex encoded chain metadata

Example

const meta = _polkadotApi.runtimeMetadata.toHex();
const genesisHash = _polkadotApi.genesisHash;
const specVersion = _polkadotApi.runtimeVersion.specVersion;

const metadata = {
[`${genesisHash}-${specVersion}`]: meta,
};

noInitWarn?

optional noInitWarn: boolean

Defined in: src/api/client/types.ts:166

set to true to disable polkadot start up warnings


typesBundle?

optional typesBundle: OverrideBundleType

Defined in: src/api/client/types.ts:173

allows for types to be provided for multiple chain specs at once

Note

shouldn't be needed for most use cases