How to decode qscc GetChainInfo using fabric-gateway? #610
-
It fails with error: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There is a brief usage example in the README for the @hyperledger/fabric-protos package. Since the protobuf bindings include full TypeScript type definitions, a good IDE should be proving some auto-completion to help you too. The method you want is const blockInfo = common.BlockchainInfo.deserializeBinary(result); |
Beta Was this translation helpful? Give feedback.
-
Thank you @bestbeforetoday , I switched to use |
Beta Was this translation helpful? Give feedback.
There is a brief usage example in the README for the @hyperledger/fabric-protos package. Since the protobuf bindings include full TypeScript type definitions, a good IDE should be proving some auto-completion to help you too. The method you want is
deserializeBinary()
: