@polkadot/json-serve
TypeScript icon, indicating that this package has built-in type declarations

0.56.9 • Public • Published

@polkadot/json-serve

A simple tool that serves a limited subset of on-chain information as JSON output.

Usage

yarn run:json-serve --ws ws://localhost:9944 --port 8181

Then just doing a get on http://localhost:8181 should return something like

Error: Invalid query '?q=', expected '?q=<type>', one of 'bondedpercentage', 'totalbonded', 'totalcoins'

When passing a correctly formatted query, e.g. http://localhost:8181?q=totalcoins should return for the chain, e.g -

8168333.357737305935

If you are installing it globally -

$ yarn global add @polkadot/json-serve
$ polkadot-js-json-serve ...

/@polkadot/json-serve/

    Package Sidebar

    Install

    npm i @polkadot/json-serve

    Weekly Downloads

    904

    Version

    0.56.9

    License

    Apache-2.0

    Unpacked Size

    22.1 kB

    Total Files

    18

    Last publish

    Collaborators

    • polkadotjs
    • jacogr