Cascade
Getting Started

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, Keplr or Leap for browser apps)
  • Testnet tokens (ulume) from the Lumera faucet

Install the SDK

The JavaScript/TypeScript SDK is the primary way to interact with Cascade from web and Node.js applications.

npm install @lumera-protocol/sdk-js @cosmjs/proto-signing @cosmjs/stargate

@cosmjs/proto-signing and @cosmjs/stargate are peer dependencies required for wallet and transaction handling.

Browser Bundler Configuration

If you are using Vite, you may need polyfills for Node.js globals:

npm install vite-plugin-node-polyfills vite-plugin-wasm vite-plugin-top-level-await
vite.config.ts
import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";
 
export default defineConfig({
  plugins: [
    wasm(),
    topLevelAwait(),
    nodePolyfills({
      include: ["buffer", "process"],
      globals: { Buffer: true, global: true, process: true },
    }),
  ],
  optimizeDeps: {
    exclude: ["undici", "@bokuweb/zstd-wasm"],
  },
  define: {
    "process.env": "{}",
  },
});

For webpack (Next.js), add fallbacks in next.config.js:

next.config.js
/** @type {import('next').NextConfig} */
module.exports = {
  webpack: (config) => {
    config.resolve.fallback = {
      ...config.resolve.fallback,
      fs: false,
      path: false,
      crypto: false,
    };
    return config;
  },
};

Verify Installation

To confirm everything is wired up correctly, follow the Quick Start guide. It creates a client, connects to testnet, and uploads a file in under 50 lines.

Other SDKs

Lumera also provides official SDKs for Go and Rust:

SDKInstallRepository
Gogo get github.com/LumeraProtocol/sdk-goLumeraProtocol/sdk-go
Rustcargo add lumera-sdk-rs --git https://github.com/LumeraProtocol/sdk-rs.gitLumeraProtocol/sdk-rs
TypeScriptnpm install @lumera-protocol/sdk-jsLumeraProtocol/sdk-js

Next Steps

Edit this page

On this page