Registry / cloud / hyperledger-fabric-sdk-go

hyperledger-fabric-sdk-go

JSON →
library1.0.0gogounverified

Enables Go developers to build applications that interact with Hyperledger Fabric blockchain networks.

go get github.com/hyperledger/fabric-sdk-go
INSTALL
IMPORT
SIG · HYPERLEDGER-FABRIC
H
hyperledger-fabric-sdk-go
cloudgov1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fabricsdk
github.com/hyperledger/fabric-sdk-go

Initializes the Fabric SDK and performs a chaincode query.

package main import ( "fmt" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/core/config" "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk" ) func main() { sdk, err := fabsdk.New(config.FromFile("config.yaml")) if err != nil { panic(err) } defer sdk.Close() clientCtx := sdk.ChannelContext("mychannel", fabsdk.WithUser("Admin")) client, err := channel.New(clientCtx) if err != nil { panic(err) } resp, err := client.Query(channel.Request{ChaincodeID: "mycc", Fcn: "query", Args: [][]byte{[]byte("key")}}) if err != nil { panic(err) } fmt.Println(string(resp.Payload)) }
Debug
Known issues
breakingThe SDK has multiple major versions with breaking changes; v1.0.0 is stable but may not be compatible with newer Fabric networks.
fix
Check the Fabric network version and use the corresponding SDK version (e.g., v2 for Fabric 2.x).
affects: >=1.0.0
Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
hyperledger-fabric-sdk-go — go get hyperledger-fabric-sdk-go · libregistry