安装了链码后,对等链代码列表返回所有已安装的带有id号的链码:
peer chaincode list --installed -C mychannel
Get installed chaincodes on peer:
Name: dev-mychaincode-cc, Version: alpha1, Path: /opt/home/mychaincode-cc, Id: 414955ccc11a2644a7f7caxxxb29ee06是否存在由Hyperledger为node.js获得的id (414955ccc11a2644a7f7caxxb29ee06)?
发布于 2022-08-09 14:41:46
您应该能够在GetInstalledChaincodes lscc系统链码上调用事务函数,并解析返回值,这是一个ChaincodeQueryResponse协议缓冲区(protobuf)消息。
Fabric的protobuf定义位于原丝存储库中。还有已发布的Go、Node (TypeScript/JavaScript)和Java语言绑定,这些绑定可以直接用于帮助解包protobuf消息:
https://hyperledger.github.io/fabric-protos/
作为参考,lscc链码的GetAllChaincodes事务函数实现如下:
https://stackoverflow.com/questions/73274702
复制相似问题