I am working on some projects with Hyperledger Fabric, currently using the IBM VS Code Extension. The chaincode is written in Go, as is the client application which provides a RESTful API, using the Go Fabric SDK. However, I am having trouble connecting the client application to the chaincode. Most of the tutorials and examples I have seen use Node.js as the client and it seems the Node SDK needs less configuration.
As far as I understand it, the steps should be similar to the following but more detailed information seems to be a little bit lacking when it comes to the Golang Fabric SDK.
The client application needs the following information to be able to communicate with the blockchain network:
- The enroll ID and secret of the application identity (used to generate a cert and private key), or the certificate and private key directly
- The connection profile
- The smart contract name
- The name of the channel the smart contract was instantiated on
- Use the certificate and private key of the application identity, along with CA endpoint information inside your connection profile
In the VSCode plugin
- Register an 'application' identity in the 'Fabric Wallets' section
- Export the connection profile from the 'Fabric Gateway' section
- Export the application identity's wallet
- Update code to point to the exported connection profile
- Update code to point to the exported wallet
As far as I can tell, the connection profile and other steps needed to connect the SDK to the VS Code Network should be pretty 'standard' so I wonder if someone knows of a working example?
Thanks for the collective help!