python SDK for AERGO
HeraPy is a Python package for AERGO that provides the features below.
Communication with AERGO node
Getting AERGO blockchain information
Creating/Exporting/Importing an account
Making and sending a transaction
Deploying/Calling/Querying a smart contract
Querying and prooving contract/account states
Install the latest version in the Python Package Index
pip install aergo-herapy
or, install locally
git clone firstname.lastname@example.org:aergoio/herapy.git cd herapy make install
After installing aergo-herapy, you can run examples
The examples in the ‘examples’ directory connect the public Aergo testnet.
Download HeraPy from this repository
git clone email@example.com:aergoio/herapy.git
pip install -r requirements.txt
But, we recommend to use a virtual environment below.
Virtual Environment (Pipenv)
Using Pipenv, all dependencies will be installed automatically.
If you cleaned up and setup again,
If you want to test or contribute, then do not forget ‘–dev’ option
pipenv install --dev make test
If need to upgrade a protocol,
After this command, all protocol related source files will be generated if it’s different.
Updating Aergo Configurations
If need to upgrade Aergo Configurations,
After this command, ‘aergo/herapy/obj/aergo_conf.py’ will be generated if it’s different.
If occur the error message below
ERROR: Cannot find 'AERGO_TYPES_SRC'
, find the source code ‘aergo/config/types.go’ and make this file path as an environment variable of ‘AERGO_TYPES_SRC’
export AERGO_TYPES_SRC=`find ~ -path '*/aergo/config/types.go' 2>/dev/null` make aergo-types
Releases and Contributing
HeraPy follows a major release cycle of AERGO. A minor release such as fixing bugs and errors are occasionally patched. Please let us know if you encounter a bug by filling an issue.
If you are planning to contribute a new feature, class, or function, please open an issue and discuss with us.
We appreciate all contributions.
HeraPy is MIT license as found in the LICENSE file.
Add new Aergo Keystore support.
Add ‘add_raft_member’, ‘del_raft_member’
Add ‘transfer’ API for simple token transfering
Add ‘gas limit’, ‘fee delegation’ and ‘gas used’ for ‘TxResult’ object
‘Account’ object encoding to/decoding from json data
Exception for encoding ‘TxResult’ to the json type, because of ‘tx_id’
support TLS connection
coinbase address encoding issue from https://github.com/aergoio/herapy/issues/70
issue from https://github.com/aergoio/herapy/issues/68
support an empty string and governance string address for Address
miss value from get_conf_change_progress
support redploy tx type
support ‘GetConfChangeProgress’ protocol to find a state of ‘changeCluster’ system contract
support ‘name’ (string) address
support enterprise consensus info
miss match a tx type in tx
encrypt/decrypt logic moves to ‘util’ for a general usage
when tx result handling, get error message from a changed varialbe
Apply v0.12.0 protocol
get a genesis block with a block height 0
Change the result type from the ‘get_tx_result’ function (‘SmartContractStatus’ –> ‘TxResultStatus’)
Separate two function ‘send_tx’ and ‘batch_tx’ from the single ‘send_tx’ function for a single and multiple txs
Open the ‘generate_tx’ function for helping a new transaction manually
Support multiple proof queries with the array of Storage Keys
Simplify verifying proof as the ‘verify_proof’ function from ‘verify_inclusion’ and ‘verify_exclusion’
Fit for the public Aergo testnet.
First public release on PyPI.
First release on PyPI.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.