Skip to main content
The Rust SDK is the official SDK for server-side applications, CLI tools, and system-level integrations with Lumera Protocol. It talks to the chain over gRPC and routes file transfers through SN-API, the REST gateway in front of SuperNodes. Because file transfers travel over HTTPS to SN-API, the SDK works from any machine with ordinary outbound internet access. The Go SDK instead streams files to SuperNodes directly over gRPC on port 4444, which requires direct network reachability to that port.

Install

The SDK needs stable Rust with edition 2021 or later.

Architecture

The SDK is organized into three core modules.

Create a client

Configure the SDK with explicit values or with environment variables.
Or load the configuration from the environment.

Environment variables

The built-in defaults assume a local devnet. For testnet, override them in a .env file or your shell.

Derive signing keys

Upload and download both need a SigningIdentity derived from your mnemonic. It carries the chain signing key for transactions and the arbitrary signing key for ADR-036 authentication with SN-API.
Load the mnemonic from an environment variable or a secrets manager. Never hardcode it or commit it to version control.

Upload a file

Uploads happen in two steps. Register the action on chain, then stream the file to SN-API.
register_ticket escrows the storage fee and returns the action_id, the permanent on-chain reference to your file. SuperNodes then encode the data and distribute it across the network. How Cascade works explains what happens behind each step.

Download a file

Key dependencies

Next steps

How Cascade works

The storage flow behind register, upload, and download.

SN-API reference

The REST endpoints the SDK calls under the hood.

Go SDK

The gRPC alternative for backends with direct SuperNode access.