Skip to content

How to decode qscc GetChainInfo using fabric-gateway? #610

Answered by bestbeforetoday
bh4rtp2023 asked this question in Q&A
Discussion options

You must be logged in to vote

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():

const blockInfo = common.BlockchainInfo.deserializeBinary(result);

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bh4rtp2023
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants