Installation
Install the Lumera SDK and its dependencies.
Prerequisites
- Node.js >= 18.0.0
- npm, pnpm, or yarn
- A Lumera wallet (mnemonic for programmatic signing or Keplr for browser apps)
- Testnet tokens (
ulume) from the Lumera Discord faucet
Install the SDK
The JavaScript/TypeScript SDK is the primary way to interact with Cascade from web and Node.js applications.
@cosmjs/proto-signing and @cosmjs/stargate are peer dependencies required for wallet and transaction handling.
Platform-Specific Dependencies
The SDK uses conditional exports to load platform-appropriate implementations for cryptographic operations. No additional configuration is needed in most cases, but here is what runs under the hood:
| Operation | Browser | Node.js |
|---|---|---|
| BLAKE3 hashing | blake3/browser-async (WASM) | blake3 (native binding) |
| Zstd compression | @bokuweb/zstd-wasm | @mongodb-js/zstd |
| RaptorQ encoding | WASM (ESM import) | WASM (via createRequire) |
| HTTP client | window.fetch | undici (keep-alive pool) |
| SSE streaming | EventSource | Fetch-based stream parser |
Browser Bundler Configuration
If you are using Vite, you may need polyfills for Node.js globals:
For webpack (Next.js), add fallbacks in next.config.js:
Verify Installation
Node.js environment limitations: The SDK currently has known issues in Node.js environments related to WASM module loading for RaptorQ encoding. Browser environments work reliably. See the Node.js guide for current status and workarounds.
Other SDKs
Lumera also provides official SDKs for Go and Rust:
| SDK | Install | Repository |
|---|---|---|
| Go | go get github.com/LumeraProtocol/sdk-go | LumeraProtocol/sdk-go |
| Rust | lumera-sdk-rs = "0.1" | LumeraProtocol/sdk-rs |
| TypeScript | npm install @lumera-protocol/sdk-js | LumeraProtocol/sdk-js |
This documentation focuses on the TypeScript SDK. For Go and Rust, refer to the respective repository READMEs.