A python library for interacting with Chain4energy blockchain
based on the CosmPy library
pip3 install kyvepy
Below is a simple example for querying an account's balances:
from kyvepy.aerial.client import LedgerClient, NetworkConfig
# connect to Fetch.ai network using default parameters
ledger_client = LedgerClient(NetworkConfig.chain4energy_mainnet())
alice: str = 'kyve1t62t32vvkr78zdws3jvu9rxjkz3fy0ex4v7e7l'
balances = ledger_client.query_bank_all_balances(alice)
# show all coin balances
for coin in balances:
print(f'{coin.amount}{coin.denom}')
The Cosmpy documentation can be found here.
Under the examples
directory, you can find examples of basic ledger interactions using kyvepy
, such as transferring tokens, staking.
All contributions are very welcome! Remember, contribution is not only PRs and code, but any help with docs or helping other developers solve their issues are very appreciated!
Read below to learn how you can take part in the CosmPy or derivative projects like kyvepy.
Please be sure to read and follow our Code of Conduct. By participating, you are expected to uphold this code.
Read our contribution guidelines to learn about our issue and PR submission processes, coding rules, and more.
Read our development guidelines to learn about the development processes and workflows when contributing to different parts of the CosmPy project.
We use GitHub Issues for tracking requests and bugs.
The kyvePy and CosmPy projects are licensed under Apache License 2.0.