Skip to content
API reference

Load

The function that loads the SDK for a cluster, before anything else runs.

Your app loads the SDK once per page. Load the SDK walks through the options and what it checks.

loadNimbusSdk

Call it once when your app starts, before you list wallets or open a session.

function loadNimbusSdk(
  context: { readonly cluster: NimbusCluster },
  options?: LoadNimbusSdkOptions,
): Promise<NimbusSdk>;

Types used: NimbusCluster, LoadNimbusSdkOptions, NimbusSdk

Example

import {  } from "@umbra/nimbus-solana-web";

// After `nimbus-solana-web copy-assets public/nimbus`, on a page served with
// Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp:
const  = await (
  { : "mainnet" },
  { : "/nimbus/" },
);

// The same preset, with the app's own RPC in place of the preset's:
const  = await (
  { : "mainnet" },
  { : "/nimbus/", : { : "https://rpc.example" } },
);

Parameters

Prop

Type

Returns

Promise<NimbusSdk>

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/load.ts.

Last updated

On this page