首页 > 解决方案 > python中的Hyperledger Sawtooth供应链交易示例

问题描述

我在 ubuntu 16.04 上成功构建并运行了供应链事务处理器。现在我想使用 python sdk 创建一个客户端事务。我提到了
https://sawtooth.hyperledger.org/docs/core/nightly/1-2/_autogen/sdk_submit_tutorial_python.htmlhttps://sawtooth.hyperledger.org/docs/supply-chain/nightly/master/family_specification .html#transactions 作为参考。

但到目前为止,验证者总是拒绝我的交易并将其称为无效。我的 TP 运行正常并正在接收事务,但无法反序列化有效负载。

有没有人在 python 中有一个用于创建交易的示例脚本?例如创建一个新的代理或鱼?

标签: ubuntu-16.04python-3.6hyperledgerhyperledger-sawtooth

解决方案


现在它起作用了。我能够从https://github.com/hyperledger/sawtooth-supply-chain/tree/master/protos为 python 生成 .proto 文件。安装supply-rest-api验证器后接受我的有效负载。


推荐阅读