Go SDK
Overview of the official Lumera Go SDK for server-side and CLI applications.
Overview
The Go SDK is the official SDK for building server-side applications, CLI tools, and backend services that interact with Lumera Protocol. It provides direct gRPC access to the chain and native Supernode communication.
Installation
The SDK requires Go 1.25.5+. Add it as a dependency inside your Go module:
Architecture
The Go SDK unifies three Lumera interfaces into a single client:
| Layer | Access via | Purpose |
|---|---|---|
| Lumera API (gRPC) | client.Blockchain | Blockchain queries: actions, supernodes, fees, transactions |
| Cascade SDK | client.Cascade | File upload, download, and event subscriptions |
| Supernode (gRPC) | Integrated through Cascade | Direct Supernode communication on port 4444 |
Direct Supernode Communication
Unlike the JavaScript and Rust SDKs which route through SN-API (a REST gateway), the Go SDK communicates directly with Supernodes over gRPC:
- You create an on-chain action via
MsgRequestAction - The block height at which the action is included serves as a seed to deterministically select 10 processing Supernodes
- The Go SDK connects to each selected Supernode one by one (port 4444) and uploads to the first that responds
This means the Go SDK requires direct network access to Supernodes. If you cannot reach port 4444 from your machine (e.g., firewalls or NAT), run your code on the same network as the Supernode.
Upload a File
Download a File
Query Actions
Multi-Account Support
The Go SDK supports a factory pattern for managing multiple signers within the same process:
Both secp256k1 (Cosmos, coin type 118) and eth_secp256k1 (EVM, coin type 60) key types are supported.
Keyring Helpers
The SDK includes crypto utilities for key management:
Interchain Accounts (ICA)
The Go SDK includes full ICS-27 support for cross-chain Cascade operations:
ICA helper functions:
| Function | Purpose |
|---|---|
PackRequestForICA | Wraps a MsgRequestAction for ICA submission |
BuildICAPacketData | Constructs the IBC packet data for ICA messages |
BuildMsgSendTx | Builds the MsgSendTx for the controller chain |
ExtractRequestActionIDsFromAck | Extracts action IDs from IBC acknowledgements |