NOTE: When updating to a different version of the Cosmos SDK (see the version currently used under
COSMOS_SDK_VERSION
in Makefile), you will need to perform this step once to fetch the relevant protobuf schema files:
make fetch_proto_schema_source
NOTE: For this library to be functional, only the python types generated from protobuf schemas are required, not the schema files themselves. The schema files are fetched on-demand only to enable the generation of python types. Therefore, the schema files are intentionally stored as local files and are NOT checked in to this repository to minimise its filesystem footprint.
make generate_proto_types
You require Go version 15.0 or higher for your platform (see here)
-
Setup FetchD
bash scripts/setup_fetchd.sh
The script will ask for root permissions while setting up a node.
-
Start the node
fetchd start
-
Install the package from source:
pipenv install
-
or in development mode:
pipenv install --dev
-
Launch a virtual environment
pipenv shell
-
Query balance example using REST api
python src/examples/query_balance_rest_example.py
-
Send funds transaction example
- Using gRPC
python src/examples/tx_send_grpc_example.py
- Using REST api
python src/examples/tx_send_rest_example.py
- Using gRPC
-
Contract deployment and interaction example
- Using gRPC
python src/examples/contract_interaction_grpc_example.py
- Using REST api
python src/examples/contract_interaction_rest_example.py
- Using gRPC
-
Native tokens atomic swap example
- 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
-
Atomic swap using ERC1155 contract example
- Using gRPC
python src/examples/atomic_swap_contract_grpc_example.py
- Using REST api
python src/examples/atomic_swap_contract_rest_example.py
- Using gRPC