@lumera/sdk-js
    Preparing search index...

    Class LumeraClient

    Main LumeraClient facade

    The primary entry point for the Lumera SDK, composing blockchain and storage operations into a unified interface. This client provides:

    • Blockchain: Full blockchain client (transactions and queries)
    • Cascade.uploader: File upload operations
    • Cascade.downloader: File download operations
    import { createLumeraClient } from "@lumera/sdk-js";
    import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";

    // Create a wallet
    const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, {
    prefix: "lumera"
    });
    const [account] = await wallet.getAccounts();

    // Create the client using testnet preset
    const client = await createLumeraClient({
    preset: "testnet",
    signer: wallet,
    address: account.address
    });

    // Query blockchain
    const params = await client.Blockchain.Action.getParams();

    // Upload a file to Cascade
    const result = await client.Cascade.uploader.uploadFile(file, {
    actionId: "action-123",
    rq_ids_ic: 1000,
    rq_ids_max: params.rq_ids_max
    });

    // Download a file from Cascade
    const stream = await client.Cascade.downloader.download("action-456");
    Index

    Constructors

    Properties

    Constructors

    • Create a new LumeraClient instance

      Parameters

      • blockchain: BlockchainClient

        Initialized blockchain client

      • snapiClient: SNApiClient

        Initialized SN-API client

      • chainPort: CascadeChainPort

        Port for Cascade to access blockchain capabilities

      • signerAddress: string

        Bech32 address of the signer

      • signer: UniversalSigner

        Universal signer for signing operations

      • chainId: string

        Chain ID for signing operations

      Returns LumeraClient

      This constructor is typically not called directly. Use the createLumeraClient factory function instead, which handles all initialization automatically.

    Properties

    Blockchain: BlockchainClient

    Blockchain client for transaction and query operations

    Cascade: { downloader: CascadeDownloader; uploader: CascadeUploader }

    Cascade storage clients

    Type Declaration