A library for interacting with cosmos based networks
NOTE: This is normally one-off step. In the case, that completely new version of Cosmos-SDK is required (see the
COSMOS_SDK_VERSION
variable in the Makefile), it might be better to force it to re-fetch manually again - please run following command in that case:
make fetch_proto_schema_source
NOTE: Please note that source protobuf schema files are intentionally NOT committed in this repo, they are fetched on demand and stored as local files.
Run the following command:
make generate_proto_types
NOTE: The Cosmos-SDK is intentionally not made part of this repository (e.g. via
git submodule ...
, orgit subtree ...
, or by-value( trivial copy). The reason being to minimise filesystem footprint of this repository. It is NOT necessary to store Cosmos-SDK protobuf schema files in this repository, only python types generated out of protobuf schema is actually necessary. The makefile target id implemented the way, that necessary bits & pieces of Cosmos-SDK repository is downloaded on demand (for python types generation), but they are NOT checked-in to this repository
bash scripts/setup_fetchd.sh
Script will ask for root permissions while setting up node.
fetchd start
Commands bellow should be executed from pipenv shell
pipenv install
pipenv shell
python src/examples/query_balance_rest_example.py
Using gRPC
python src/examples/tx_send_grpc_example.py
Using REST api
python src/examples/tx_send_rest_example.py
Using gRPC
python src/examples/contract_interaction_grpc_example.py
Using REST api
python src/examples/contract_interaction_rest_example.py
Using gRPC
python src/examples/tx_native_tokens_atomic_swap_grpc_example.py
Using REST api
python src/examples/tx_native_tokens_atomic_swap_rest_example.py
Using gRPC
python src/examples/atomic_swap_contract_grpc_example.py
Using REST api
python src/examples/atomic_swap_contract_rest_example.py