# @docknetwork/node-types

> Types for Dock's Substrate node

Latest version **0.17.0** (published 2024-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @docknetwork/node-types
pnpm add @docknetwork/node-types
yarn add @docknetwork/node-types
bun add @docknetwork/node-types
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.17.0 |
| Published | 2024-01-23 |
| First published | 2021-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14.0.0 |
| Dependencies | 0 |
| Unpacked size | 112.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | mikeatdock, mayconmello, samdock, lovesh_h |

## Links

- npm: https://www.npmjs.com/package/@docknetwork/node-types
- Repository: https://github.com/docknetwork/node-types
- npm.io page: https://npm.io/package/@docknetwork/node-types

## Recent versions

- 0.17.0 (latest) — 2024-01-23
- 0.16.0 — 2023-05-19
- 0.15.0 — 2022-12-16
- 0.14.0 — 2022-12-16
- 0.13.0 — 2022-09-29
- 0.12.0 — 2022-09-29
- 0.11.0 — 2022-09-23
- 0.10.0 — 2022-08-01
- 0.9.0 — 2022-08-01
- 0.8.0 — 2022-07-22
- 0.7.0 — 2022-07-18
- 0.6.0 — 2021-11-09
- 0.5.1 — 2021-10-21
- 0.5.0 — 2021-10-21
- 0.5.0-beta — 2021-10-21
- … 2 more at https://npm.io/package/@docknetwork/node-types/versions

## README

# node-types
Types to be used with Substrate node

The types to provide polkadot-js, sidecar, etc when working with testnet or mainnet. 
The file v22.js contains types to be used till spec version 22. The file v23.js contains types to be used starting from spec version 23. 
Coincidentally, the types are same for testnet and mainnet.

Starting from spec version 27 (v27.js), PoS chain starts. Note that `spec_name` is different.

When using polkadot-js, the object exported from bundle.js should be passed to `typesBundle` argument of `ApiPromise.create`.

Add to your project as `yarn add @docknetwork/node-types` or `npm install @docknetwork/node-types`.

## Sidecar

When using [sidecar](https://github.com/paritytech/substrate-api-sidecar), build the package first with `yarn build`. This will create a `dist` folder in the same directory. Then run the following command to connect to mainnet

```
SAS_SUBSTRATE_TYPES_BUNDLE=<path to dist/index.cjs.js> SAS_SUBSTRATE_WS_URL=<websocket endpoint of the node> yarn dev
```

For mainnet, the endpoint is `wss://mainnet-node.dock.io/`. Also note that we have tested sidecar versions from 8.0.3 to 9.1.0 only.

---
_Source: https://npm.io/package/@docknetwork/node-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
