> 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.

# Reserved funds (/reference/reserved-funds)

A payment that stops halfway can keep part of the balance reserved.
[Reserved funds](https://sdk.nimbusprivacy.xyz/helpers/reserved-funds) shows a list of those payments and a Release button.

## listReservedSpends

Use it to show what part of the balance is held, and by which payments.

```ts
function listReservedSpends(
  session: NimbusSession,
  _args?: Readonly<Record<string, never>>,
): Promise<readonly ReservedSpend[]>;
```

Lists the spends holding the session's notes, in id order: what `readBalances` counts as
`reserved`.

Reads only the session's note store; nothing is fetched. A spend that stopped without finishing,
because its tab closed or a step failed, holds its notes until it is released, here or by the
store once its holder's lock is gone. A deposit is listed, as `deposit`, only while it holds the
notes it merges.

**Parameters**

| Parameter | Type                              | Description                                              |
| --------- | --------------------------------- | -------------------------------------------------------- |
| `session` | `NimbusSession`                   | The opened session.                                      |
| `_args?`  | `Readonly<Record<string, never>>` | Unused; kept so every function takes the same arguments. |

**Returns**

`Promise<readonly ReservedSpend[]>`

The spends; none for a session whose store holds nothing yet.

**Throws**

[`NimbusSdkError`](https://sdk.nimbusprivacy.xyz/reference/errors#nimbussdkerror) with reason `"unreadable"` when the store was replaced while it was
read or cannot be read back; `"unsupported-browser"` when the browser refuses it.

**Example**

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

declare const session: NimbusSession;
const stuck = (await listReservedSpends(session, {})).filter((spend) => spend.state === "unsent");
```

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

## releaseReservedNotes

Use it behind a Release button, for payments that are not running.

```ts
function releaseReservedNotes(
  session: NimbusSession,
  _args?: Readonly<Record<string, never>>,
  options?: { readonly spendId?: string; readonly force?: boolean },
): Promise<ReleasedNotes>;
```

Releases the spends holding the session's notes, or one of them: no attempt of a released spend
begins or is sent again.

An `unsent` spend's notes are free at once. A spend that may have been sent keeps its notes until
that attempt lands, which completes the payment, or can no longer land, since spending them again
meanwhile could race it. A deposit whose transaction may still land is released the same way;
[`resolvePendingDeposit`](https://sdk.nimbusprivacy.xyz/reference/deposit#resolvependingdeposit) still settles it afterwards, and a `failed` or `expired` resolution
then answers its intent as `settled`, since the release already stopped it. A spend a tab of this origin is still running, which holds
its lock, is left alone and returned as `running` unless `force` is set: released, it would fail
at its next step. A browser that cannot list its locks reports no spend as running. Releasing
what is already released, or an id that names no reserved spend, changes nothing.

**Parameters**

| Parameter  | Type                                                                                                                                                                                                                                        | Description                                                                                                                                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `session`  | `NimbusSession`                                                                                                                                                                                                                             | The opened session.                                                                                                                                                                                                                                  |
| `_args?`   | `Readonly<Record<string, never>>`                                                                                                                                                                                                           | Unused; kept so every function takes the same arguments.                                                                                                                                                                                             |
| `options?` | ``{ /** One spend's id, from {@link listReservedSpends}; every reserved spend when omitted. */ readonly spendId?: string; /** Whether to release a spend a tab is still running too; `false` when omitted. */ readonly force?: boolean; }`` | `spendId`, one spend's id from [`listReservedSpends`](https://sdk.nimbusprivacy.xyz/reference/reserved-funds#listreservedspends), every reserved spend when omitted; and `force`, to release a spend a tab is still running too, false when omitted. |

**Returns**

`Promise<ReleasedNotes>`

The spends released at once, those settling, each as it stands after the release, and
those left running.

**Throws**

[`NimbusSdkError`](https://sdk.nimbusprivacy.xyz/reference/errors#nimbussdkerror) with reason `"service-unavailable"` when the RPC cannot be reached
for the confirmed slot; `"unreadable"` when the store was replaced while it was written, cannot
be read back, or kept losing to other writers; `"unsupported-browser"` when the browser refuses
it.

**Example**

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

declare const session: NimbusSession;
const { released, settling, running } = await releaseReservedNotes(session, {});
```

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


Last updated 21 October 2026
