Skip to content

cryptolab-network/polkadot-api-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polkadot-api-cli

This project provides a developer tool for exploring the Polkadot JS API in a much more effortless way.

demo-final4

Only support api.query.<module>.<method> right now.

Getting Started

Install and Run

$ git clone https://github.com/cryptolab-network/polkadot-api-cli.git
$ cd polkadot-api-cli
$ npm install
$ npm run build && npm run start

api-cli (wss://kusama-rpc.polkadot.io/) >

Explore Polkadot Apis

## Usage: api <...params>

## ex: api.query.staking.activeEra
api-cli (wss://kusama-rpc.polkadot.io/) > api.query.staking.activeEra
{ index: 2316, start: 1622438874002 }

## ex: api.query.staking.erasTotalStake 2316
api-cli (wss://kusama-rpc.polkadot.io/) > api.query.staking.erasTotalStake 2316
'0x00000000000000004d4ad5e593a16553'

How to migrate to another network?

## Usage: -w, --ws <endpoint>, choose a wss endpoint to execute this program, ex., wss://kusama-rpc.polkadot.io/
$ node ./dist/index.js -w wss://rpc.polkadot.io/

api-cli (wss://rpc.polkadot.io/) >

License

Distributed under the MIT License. See LICENSE for more information.

About

A developer tool for exploring the Polkadot JS API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published