> For AI agents: the documentation index is at https://sdk.nimbusprivacy.xyz/llms.txt, and every page is available as Markdown at its URL with .md appended.

# Wallets (/reference/wallets)

These functions find Wallet Standard wallets and connect one. [Wallets](https://sdk.nimbusprivacy.xyz/helpers/wallets) walks
through a wallet picker and a signer of your own.

## listWallets

Use it to fill a wallet picker when your page loads.

```ts
function listWallets(
  sdk: NimbusSdk,
  _args?: Readonly<Record<string, never>>,
  options?: WalletDiscoveryOptions,
): readonly Wallet[];
```

Lists the installed wallets that can connect, sign messages and sign transactions on the SDK's
cluster, the ones [`openWalletConnection`](https://sdk.nimbusprivacy.xyz/reference/wallets#openwalletconnection) accepts.

**Parameters**

| Parameter  | Type                              | Description                                                                 |
| ---------- | --------------------------------- | --------------------------------------------------------------------------- |
| `sdk`      | `NimbusSdk`                       | The loaded SDK, whose deployment names the chain, such as `solana:mainnet`. |
| `_args?`   | `Readonly<Record<string, never>>` | Unused; kept so every function takes the same arguments.                    |
| `options?` | `WalletDiscoveryOptions`          | The registry to read; the page's Wallet Standard registry by default.       |

**Returns**

`readonly Wallet[]`

The wallets, in the order they registered; empty when none is installed.

**Example**

```ts
import { listWallets } from "@umbra/nimbus-solana-web";
import type { NimbusSdk } from "@umbra/nimbus-solana-web";

declare const sdk: NimbusSdk;
for (const wallet of listWallets(sdk)) {
  console.log(wallet.name);
}
```

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

## followWallets

Use it to keep the picker current while the page is open, as extensions load.

```ts
function followWallets(
  sdk: NimbusSdk,
  args: { readonly onChange: (wallets: readonly Wallet[]) => void },
  options?: WalletDiscoveryOptions,
): () => void;
```

Follows the installed wallets, calling `onChange` with [`listWallets`](https://sdk.nimbusprivacy.xyz/reference/wallets#listwallets)' answer whenever a
wallet registers or unregisters, as an extension may after the page has loaded.

**Parameters**

| Parameter  | Type                                                                                                                                                      | Description                                                             |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `sdk`      | `NimbusSdk`                                                                                                                                               | The loaded SDK, whose deployment names the chain.                       |
| `args`     | `{ /** Called with the wallets that can sign on the SDK's cluster, after each change only. */ readonly onChange: (wallets: readonly Wallet[]) => void; }` | `onChange`, called with the wallets that can sign on the SDK's cluster. |
| `options?` | `WalletDiscoveryOptions`                                                                                                                                  | The registry to follow; the page's Wallet Standard registry by default. |

**Returns**

`() => void`

A function that stops following; calling it again does nothing.

**Example**

```ts
import { followWallets } from "@umbra/nimbus-solana-web";
import type { NimbusSdk } from "@umbra/nimbus-solana-web";

declare const sdk: NimbusSdk;
const stop = followWallets(sdk, {
  onChange: (wallets) => {
    console.log(wallets.map((wallet) => wallet.name));
  },
});
stop();
```

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

## openWalletConnection

Use it when the user picks a wallet. It gives you the signer a session takes.

```ts
function openWalletConnection(
  sdk: NimbusSdk,
  args: { readonly wallet: Wallet },
): Promise<WalletConnectionResult>;
```

Asks a wallet to connect, and builds the signer for its first account on the SDK's cluster.

The wallet shows the user its connection prompt, unless the page is already connected. The
signer hands the wallet its own account object with every request, and signs for the chain the
flows name, which is the deployment's.

**Parameters**

| Parameter | Type                                                                                         | Description                                                                                                     |
| --------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `sdk`     | `NimbusSdk`                                                                                  | The loaded SDK, whose deployment names the chain the account must sign on.                                      |
| `args`    | `{ /** The wallet to connect, one {@link listWallets} listed. */ readonly wallet: Wallet; }` | The wallet to connect, one [`listWallets`](https://sdk.nimbusprivacy.xyz/reference/wallets#listwallets) listed. |

**Returns**

`Promise<WalletConnectionResult>`

`connected` with the signer `openNimbusSession` takes and the transaction version the
wallet signs, `1` when it supports it, else `0`; `no-account` when the wallet offered no
account on the SDK's cluster; `declined` when the user refused.

**Throws**

[`NimbusSdkError`](https://sdk.nimbusprivacy.xyz/reference/errors#nimbussdkerror) with reason `"wallet-unsupported"` when the wallet cannot connect,
sign messages and sign transactions on the SDK's cluster, or fails while connecting.

**Example**

```ts
import { listWallets, openNimbusSession, openWalletConnection } from "@umbra/nimbus-solana-web";
import type { NimbusSdk } from "@umbra/nimbus-solana-web";

declare const sdk: NimbusSdk;
const [wallet] = listWallets(sdk);
if (wallet !== undefined) {
  const result = await openWalletConnection(sdk, { wallet });
  if (result.kind === "connected") {
    await openNimbusSession(sdk, { connectedWallet: result.connected.signer });
  }
}
```

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


Last updated 21 October 2026
