In order to execute script demonstrating execution of python client library you need to have python 2.7 installed. After that please follow next steps:
- To compile grpc proto files it is needed to have grpc-io installed:
pip2 install grpcio-tools
- Run prepare.sh script to build iroha python library and compile proto files:
./prepare.sh
- Make sure you have running iroha on your machine. You can follow this guide to launch iroha daemon. Please run iroha from iroha/example folder, since python script uses keys from there.
Script tx-example.py
does the following:
- Assemble transaction from several commands using tx builder
- Sign it using keys from iroha/example folder
- Send it to iroha
- Wait 5 secs and check transaction's status using its hash
- Assemble query using query builder
- Send query to iroha
- Read query response
Launch it:
python2 tx-example