> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://ensforge.com/api/mcp` to find what you need.

# revokeHcaSessions

Revoke existing sessions using the account nonce.

## Import

```ts
import { Ensforge } from "@ensforge/sdk";
```

## Usage

:::code-group
```ts [index.ts]
import { sdk } from "./client";

const result = await sdk.hca.revokeHcaSessions({
  hca: "0x1234567890123456789012345678901234567890",
});
```

```ts [client.ts]
// [!include ~/snippets/hca/client.ts]
```
:::

## Parameters

```ts
import type { RevokeHcaSessionsParameters } from "@ensforge/sdk/hca";
```

### hca

`` `0x${string}` ``

HCA address to inspect or operate on.

### salt

`bigint | undefined`

Account derivation salt. Defaults to the deployment profile canonical salt.

### confirmation

`ConfirmationPolicy | undefined`

Receipt confirmation policy.

### walletClient

`WalletClient | undefined`

Viem wallet override. Defaults to the configured wallet resolver.

### account

`` `0x${string}` | Account | undefined ``

Wallet account override for the operation.

## Return Type

```ts
type RevokeHcaSessionsResult = Awaited<ReturnType<typeof sdk.hca.revokeHcaSessions>>;
```

| Property       | Type                         | Description                                              |
| -------------- | ---------------------------- | -------------------------------------------------------- |
| `hash`         | `` `0x${string}` ``          | Submitted transaction hash.                              |
| `receipt`      | `TransactionReceipt \| null` | Confirmed transaction receipt, when requested.           |
| `sessionNonce` | `bigint \| null`             | Nonce used to invalidate previously authorized sessions. |

Returns `RevokeHcaSessionsResult`.

## Effect

Use `.effect` when composing the method in an Effect program. The success and error channels remain
fully typed.

```ts
import { Effect } from "effect";

const program = sdk.hca.revokeHcaSessions.effect({
  hca: "0x1234567890123456789012345678901234567890",
});

type Success = Effect.Success<typeof program>;
type Failure = Effect.Error<typeof program>;

const result = await Effect.runPromise(program);
```

## Error

The method rejects with the corresponding Core action errors. Use `.effect` to keep those failures
in the typed Effect error channel.

See [Error Handling](/sdk/guides/error-handling).

## Action

* [`revokeHcaSessions`](/core/api/actions/hca/revoke-hca-sessions)
* [Guide](/core/guides/hca)
