@kiltprotocol/type-definitions
TypeScript icon, indicating that this package has built-in type declarations

1.11401.1 • Public • Published

Runtime Type Definitions for the KILT Network

This package provides runtime type definitions for data structures and transaction types used on the KILT blockchain. It is required when using @polkadot/api to interact with the KILT blockchain.

Installation

To install, run:

yarn add @kiltprotocol/augment-api

Usage

Import typesBundle from the package and pass it to the API initialization options, as exemplified in the following snippet:

import { ApiPromise, WsProvider } from '@polkadot/api'

import { typesBundle } from '@kiltprotocol/type-definitions'

const provider = new WsProvider('wss://spiritnet.kilt.io')
const api = await ApiPromise.create({
  provider,
  typesBundle,
})

Mainnet and Testnet Types

This package contains type definitions for all runtime versions of various production and test networks. @polkadot/api will automatically select the right type definitions for the current network and runtime version. Make sure you are on the latest version of these type definitions when a runtime upgrade is incoming to ensure your application remains compatible with the upgrade.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @kiltprotocol/type-definitions

      Weekly Downloads

      14,727

      Version

      1.11401.1

      License

      BSD-4-Clause

      Unpacked Size

      66.3 kB

      Total Files

      53

      Last publish

      Collaborators

      • rflechtner
      • kiltbot