Search code examples
node.jshyperledger-fabricblockchainhyperledgerhyperledger-fabric-sdk-js

In Hyperledger Fabric, is there a way to decode ledger data to human readable form?


I tried to use "peer" binary to fetch blocks from ledger.

peer channel fetch 2 --channelID mychannel

However these blocks are not in human readable form. Is there a way to decode the blocks to human readable form to view the transaction data?


Solution

  • Yes, by using configtxlator binary that's included. For example:

    configtxlator proto_decode --input the_one_you_fetched.pb --type common.Block--output human_readable.json