python SDK for AERGO
Project description
herapy
HeraPy is a Python package for AERGO that provides the features below.
Features
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
Install the latest version in the Python Package Index
pip install aergo-herapy
or, install locally
git clone git@github.com:aergoio/herapy.git
cd herapy
make install
Run examples
After installing aergo-herapy, you can run examples
make ex
The examples in the ‘examples’ directory connect the public Aergo testnet.
Build
Downloading HeraPy
Download HeraPy from this repository
git clone git@github.com:aergoio/herapy.git
Installing Dependencies
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.
pipenv shell
If you cleaned up and setup again,
pipenv install
If you want to test or contribute, then do not forget ‘–dev’ option
pipenv install --dev
make test
Updating Protocol
If need to upgrade a protocol,
make protoc
After this command, all protocol related source files will be generated if it’s different.
Updating Aergo Configurations
If need to upgrade Aergo Configurations,
make aergo-types
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.
Documentation
License
HeraPy is MIT license as found in the LICENSE file.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
2.0.1 (2020-02-05)
Add new Aergo Keystore support.
Add ‘add_raft_member’, ‘del_raft_member’
2.0.0 (2019-12-03)
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
Bug fix
Exception for encoding ‘TxResult’ to the json type, because of ‘tx_id’
1.3.3 (2019-11-05)
support TLS connection
Bug fix
coinbase address encoding issue from https://github.com/aergoio/herapy/issues/70
1.2.7 (2019-10-21)
support Enterprise features (raft)
issue from https://github.com/aergoio/herapy/issues/75
support ABI
issue from https://github.com/aergoio/herapy/issues/74
1.2.6 (2019-09-04)
Bug fix
issue from https://github.com/aergoio/herapy/issues/68
1.2.5 (2019-08-26)
support an empty string and governance string address for Address
support get_name_info
Bug fix
miss value from get_conf_change_progress
1.2.3 (2019-08-22)
support redploy tx type
support ‘GetConfChangeProgress’ protocol to find a state of ‘changeCluster’ system contract
support ‘name’ (string) address
support enterprise consensus info
Bug fix
miss match a tx type in tx
0.12.2 (2019-03-21)
encrypt/decrypt logic moves to ‘util’ for a general usage
Bug fix
when tx result handling, get error message from a changed varialbe
0.12.0 (2019-03-08)
Apply v0.12.0 protocol
Bug fix
get a genesis block with a block height 0
0.11.0 (2019-02-20)
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’
0.9.0 (2018-12-31)
Fit for the public Aergo testnet.
First public release on PyPI.
0.1.0 (2018-11-07)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file aergo-herapy-2.0.2.tar.gz
.
File metadata
- Download URL: aergo-herapy-2.0.2.tar.gz
- Upload date:
- Size: 106.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 341379a62585c1aa3909311410adedcae157824bb896c7c31a47d178c11280a2 |
|
MD5 | dbaf6ea9bc86e01bd9b99651c1c541ab |
|
BLAKE2b-256 | 60b36e9533872488d98ad3c9aa74fb6d2692a08294fd3620783820b0a8dd0e2e |