The Fabric Gateway client API allows applications to interact with a Hyperledger Fabric blockchain network. It implements the Fabric programming model, providing a simple API to submit transactions to a ledger or query the contents of a ledger with minimal code.
Samples showing how to create client applications that connect to and interact with a Hyperledger Fabric network, are available in the fabric-samples repository:
- fabric-samples/asset-transfer-basic for examples of transaction submit and evaluate.
- fabric-samples/asset-transfer-events for examples of chaincode eventing.
- fabric-samples/off_chain_data for examples of block eventing.
The Gateway client API documentation for Node is available here:
Add a dependency to your project's package.json
file with the command:
npm install @hyperledger/fabric-gateway
This API requires Fabric 2.4 with a Gateway enabled Peer. Additional compatibility information is available in the documentation: