The Fabric Gateway SDK allows applications to interact with a Fabric blockchain network. It provides a simple API to submit transactions to a ledger or query the contents of a ledger with minimal code.
The Gateway SDK implements the Fabric programming model as described in the Developing Applications chapter of the Fabric documentation.
Samples showing how to create a client application that updates and queries the ledger are available for each of the supported SDK languages here: https://github.com/hyperledger/fabric-gateway/tree/main/samples
The Java Gateway SDK documentation is available here: https://hyperledger.github.io/fabric-gateway/main/api/java/
Add the following dependency to your project's pom.xml
file:
<repositories>
<repository>
<id>nightly-repo</id>
<url>https://hyperledger-fabric.jfrog.io/artifactory/fabric-maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.hyperledger.fabric</groupId>
<artifactId>fabric-gateway</artifactId>
<version>0.1.0-dev-20210326-14</version>
</dependency>
</dependencies>
This SDK requires Fabric 2.4 Tech Preview with a Gateway enabled Peer.