Search code examples
ubuntu-16.04python-3.6hyperledgerhyperledger-sawtooth

Hyperledger Sawtooth Supply Chain transaction example in python


I successfully built and ran the transaction processor for supply chain on ubuntu 16.04. Now I would like to create a client transaction using the python sdk. I referred to
https://sawtooth.hyperledger.org/docs/core/nightly/1-2/_autogen/sdk_submit_tutorial_python.html and https://sawtooth.hyperledger.org/docs/supply-chain/nightly/master/family_specification.html#transactions as reference.

But so far the validator always rejects my transaction and calls it invalid. My TP is running correctly and is receiving the transaction but is unable to deserialize the payload.

Does anyone have an example script in python for creating a transaction? For example creating a new agent or fish?


Solution

  • Now it works. I was able to generate the .proto files from https://github.com/hyperledger/sawtooth-supply-chain/tree/master/protos for python. After installing the supply-rest-api the validator accepts my payload.