https://github.com/docknetwork/node-types
Types to be used with Substrate node
https://github.com/docknetwork/node-types
Last synced: about 1 year ago
JSON representation
Types to be used with Substrate node
- Host: GitHub
- URL: https://github.com/docknetwork/node-types
- Owner: docknetwork
- License: mit
- Created: 2021-06-07T13:59:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-23T14:43:21.000Z (over 2 years ago)
- Last Synced: 2025-04-13T06:51:53.519Z (about 1 year ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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= SAS_SUBSTRATE_WS_URL= 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.