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

    Function createLumeraClient

    • Create a new LumeraClient with automatic configuration

      This factory function simplifies client creation by:

      • Applying chain presets (testnet/mainnet)
      • Initializing all sub-clients
      • Configuring HTTP settings
      • Connecting to blockchain and storage endpoints

      Parameters

      Returns Promise<LumeraClient>

      Promise resolving to a fully initialized LumeraClient

      If configuration is invalid or connection fails

      Using a chain preset:

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

      Using custom endpoints:

      const client = await createLumeraClient({
      rpcUrl: "https://custom-rpc.example.com",
      lcdUrl: "https://custom-lcd.example.com",
      chainId: "lumera-custom-1",
      snapiUrl: "https://custom-snapi.example.com",
      signer: wallet,
      address: account.address,
      gasPrice: "0.05ulume"
      });

      With custom HTTP settings:

      const client = await createLumeraClient({
      preset: "mainnet",
      signer: wallet,
      address: account.address,
      http: {
      timeout: 60000,
      maxRetries: 5
      }
      });