Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls. This client is modelled after polkadot-js/api.
To provide ECDSA signature decoding whilst retaining github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283
indirect dependency, use tag 4.0.2.
Add to your project's go.mod
:
replace github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.0 => github.com/qredo/go-substrate-rpc-client/v4 v4.0.1
Run go mod tidy
in your project's root.
This package is feature complete, but it is relatively new and might still contain bugs. We advice to use it with caution in production. It comes without any warranties, please refer to LICENCE for details.
Please refer to https://godoc.org/github.com/centrifuge/go-substrate-rpc-client
- Install dependencies by running
make
followed bymake install
- Run tests
make test
- Lint
make lint
(you can usemake lint-fix
to automatically fix issues)
- Run the docker container
make test-dockerized
- Start the Substrate Default Docker image:
make run-substrate-docker
- In another terminal, run the tests against that image:
make test
- Visit https://polkadot.js.org/apps for inspection
- Set the endpoint:
export RPC_URL="http://example.com:9933"
- Run the tests
make test