Files
bch-api/start-dev-example.sh
T

50 lines
1.5 KiB
Bash
Raw Normal View History

2020-07-27 21:25:31 -07:00
#!/bin/bash
2021-01-11 15:33:45 -08:00
# Which network are you using?
2020-07-27 21:25:31 -07:00
export NETWORK=mainnet
2021-01-11 15:33:45 -08:00
#export NETWORK=testnet
# Full node
export RPC_IP=<ip>:8332
export RPC_BASEURL=http://$RPC_IP/
export RPC_USERNAME=bitcoin
export RPC_PASSWORD=password
2020-07-27 21:25:31 -07:00
# SLPDB
export SLPDB_URL=http://<SLPDB IP>:12300/
export SLPDB_PASS=somelongpassword
# Use the same address as SLPDB_URL if you don't have a separate whitelist server.
export SLPDB_WHITELIST_URL=http://<SLPDB IP>:12300/
# slp-api alternative SLP validator using slp-validate:
# https://github.com/Permissionless-Software-Foundation/slp-api
export SLP_API_URL=http://10.0.0.5:5001/
2020-07-27 21:25:31 -07:00
# Mainnet Fulcrum / ElectrumX
export FULCRUM_URL=192.168.0.6
export FULCRUM_PORT=50002
2021-01-11 15:33:45 -08:00
# JWT Token Secret
# This is used to verify JWT tokens generated with jwt-bch-api:
# https://github.com/Permissionless-Software-Foundation/jwt-bch-api
2020-07-27 21:25:31 -07:00
export TOKENSECRET=somelongpassword
2020-11-08 17:04:17 -08:00
# So that bch-api can call bch-js locally.
export LOCAL_RESTURL=http://127.0.0.1:3000/v3/
2020-11-11 07:48:40 -08:00
# Basic Authentication password
export PRO_PASS=somerandomepassword:someotherrandompassword:aThirdPassword
2020-11-08 17:04:17 -08:00
2021-01-11 15:33:45 -08:00
# Whitelisted domains. Automatically give pro-tier rate limit access to apps
# that originate froma domain on the whitelist.
export WHITELIST_DOMAINS=fullstack.cash,psfoundation.cash,torlist.cash
# Rate Limits. Numbers are divided into 1000. e.g. 1000 / 50 = 20 RPM for ANON.
# Requests use the ANON rate limit if they fail to pass in a JWT token.
# ANON = 20 requests per minute (RPM)
export ANON_RATE_LIMIT=50
# 10 = 100 RPM
export WHITELIST_RATE_LIMIT=10
2020-07-27 21:25:31 -07:00
npm start