Substrate API Sidecar

Biforst Properties

ExistentialDeposit = 0.01BNC
SS58Prefix = 6
BlockLength = 3.75MB
Precision = 12
Token Name = BNC

Bifrost Node Setup

Compile bifrost from source code, either run bifrost by docker container. From source code.

git clone
cd bifrost
git checkout develop
cargo build --release

Checkout this link to compile bifrost node.

Run it on the local by the following command:

./target/release/bifrost \
--dev \
--base-path bifrost-poa \
--name "Bifrost POA" \
--rpc-cors all --ws-port 9944 \
--unsafe-ws-external \
--unsafe-rpc-external \

Substrate-api-sidecar Setup


Ensure Node version 12 or higher installed, and yarn installed.


Step 1. Sync sidecar source code and compile it.

git clone
cd substrate-api-sidecar
yarn build

Step 2. Configure sidecar.

Find .env.local, check these fields SAS_EXPRESS_BIND_HOST, SAS_EXPRESS_PORT, SAS_SUBSTRATE_WS_URL, just replace them with your own setup. But if bifrost and sidecar runs on the local, you don't need to change anything, just go to step 3.

# If this port is occupied, change it to another one.

Step 3. Start sidecar.

NODE_ENV=local yarn start

It should start without error.

Step 4. Test bifrost endpoints APIs.

You can find lots of APIs at Substrate API Sidecarโ€‹

Tips: If you want to show pretty json format, ensure jq installed on your computer.

List some examples here:

Check someone's balance. Take Alice as example

curl -s | jq

Output shoule be like this:

"at": {
"hash": "0xbcbc376e74fd71eac9555618856e743aa98053dc1c2fea73f928f16e54789c93",
"height": "1077"
"nonce": "1",
"tokenSymbol": "BNC",
"free": "909927992202094564",
"reserved": "0",
"miscFrozen": "0",
"feeFrozen": "0",
"locks": []

Get vesting information for an account.

curl -s | jq

Output shoule be like this:

"at": {
"hash": "0x030b1f0746937231a7a8a5b41a9afde092a9c4962cd7ff87cdad52711c691467",
"height": "1109"
"vesting": {}

Get a block by its height or hash.

# By height
curl -s | jq
# By block hash
curl -s | jq

Get version information of the bifrost runtime.

curl -s | jq

Output shoule be like this:

"at": {
"height": "1148",
"hash": "0x0aafa445b2a2970627bbf53211020d79d06b5f3d0746e813398035fff07bf590"
"authoringVersion": "10",
"transactionVersion": "1",
"implVersion": "0",
"specName": "bifrost",
"specVersion": "1",
"chainType": {
"development": null
"properties": {
"ss58Format": "6",
"tokenDecimals": [
"tokenSymbol": [