Skip to content

This project is used to provide Restful API for Crust chain

License

Notifications You must be signed in to change notification settings

crustio/crust-api

Repository files navigation

Crust API

Crust API is a bridge connector bewteen chain and other offchain services, you'd better not run it seperately.

Based on express and polkadot-js/api, connecting a running Crust Node and hosting a RESTful api service.

Join to play

Go to Crust Node, follow the README.

Building

Build from source

Make sure you have latest nodejs and yarn installed.

1. Install with yarn

yarn

2. Debug with nodemon

  • API_PORT: port number, default is: 56666
  • CRUST_WS_ADDRESS: crust's websocket address, default is: ws://localhost:9944
yarn debug {API_PORT} {CRUST_WS_ADDRESS}

3. Build and start with original node

yarn build && yarn start {API_PORT} {CRUST_WS_ADDRESS}

Build from docker

Refer this to see how to build and run crust api with docker.

Usage

Refer to this for more api details.

License

GPL v3