> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endstate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet.cancelVault

> Sends the owner's cancel of an open vault request from this wallet. The customer never pays for it.

```ts theme={null}
cancelVault(requestId: string): Promise<WalletSubmission>
```

Sends the owner's cancel of the vault request `vault()` opened, named by its
id. The wallet fetches the prepared cancel, sends it with the cost covered by
Endstate, and resolves once the network has included it. The request reads
`cancelled` once Endstate sees it. Only the wallet that approved the request
can send it.

Rejects with `submission.not_executable` when the request is already closed,
with `vault.request_not_found` for an unknown id, with `auth.forbidden` when
this wallet did not approve the request, with `wallet.sponsorship_unavailable`
when the send cannot be covered right now (nothing was sent), and with
`wallet.destroyed` if the wallet has been destroyed.

## Returns

```ts theme={null}
interface WalletSubmission {
  transactionHash: string; // the network transaction that carried it
  address: string;         // the wallet address that sent it
  resourceId: string;      // the vault request id
}
```

## Example

```ts theme={null}
const request = await wallet.vault({ session, vaultId });
await wallet.cancelVault(request.id);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.