Web-friendly, CORS-enabled RPC Proxy to the Digital Cash network.
(RPC Explorer included)
mainnet: https://rpc.digitalcash.devtestnet: https://trpc.digitalcash.dev
-
Clone and enter the repo
git clone https://github.com/digitalcashdev/rpcproxy.git pushd ./rpcproxy/ -
Install Go v1.22+
curl https://webi.sh/go | sh source ~/.config/envman/PATH.env
-
Season the Explorer to taste
ls ./static/ vi ./static/index.html
-
Build and Run the Proxy \
# Option 1: to run locally go build -o ./dash-rpcproxy ./cmd/dash-rpcproxy/ # Option 2: to run on a server or in a container CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ go build -o ./dash-rpcproxy-linux-x86_64 ./cmd/dash-rpcproxy/
./dash-rpcproxy --help ./dash-rpcproxy --port 8080 --web-root ./my-custom-explorer/ \ --rpc-hostname 'localhost' --rpc-port 19998 \ --rpc-username 'user' --rpc-password 'secret'
-
Install
serviceman,pathman, andsetcap-netbindcurl https://webi.sh/ | sh source ~/.config/envman/PATH.env webi serviceman setcap-netbind
-
Place
dash-rpcproxyin yourPATHmkdir -p ~/bin/ pathman add ~/bin/ source ~/.config/envman/PATH.env mv ./dash-rpcproxy ~/bin/
-
Allow binding to privileged ports
(optional: non-root install on Linux)setcap-netbind 'dash-rpcproxy' -
Register the service
sudo env PATH="$PATH" \ serviceman add --name "dash-rpcproxy" --system --path="$PATH" -- \ dash-rpcproxy --port 8080 \ --rpc-hostname 'localhost' --rpc-port 19998 \ --rpc-username 'user' --rpc-password 'secret'
(note: this also works with ENVs, see ./example.env)
