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

# getHcaCapabilities

Inspect supported account and execution capabilities.

## Import

```ts
import { getHcaCapabilities } from "@ensforge/core/hca";
```

## Usage

:::code-group
```ts [index.ts]
import { getHcaCapabilities } from "@ensforge/core/hca";
import { config } from "./config";

const result = await getHcaCapabilities(config, {
  hca: "0x1234567890123456789012345678901234567890",
});
```

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

## Parameters

```ts
import type { HcaReadParameters } from "@ensforge/core/hca";
```

### hca

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

HCA address to inspect or operate on.

### expectedOwner

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

Expected account owner. A mismatch fails verification.

### salt

`bigint | undefined`

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

### initialImplementation

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

Implementation used when deriving the account address, including an account that was later upgraded.

### allowUndeployed

`boolean | undefined`

Allow a counterfactual account after verifying its derivation.

### blockNumber

`bigint | undefined`

Block number to read. Cannot be combined with blockTag.

### blockTag

`BlockTag | undefined`

Named block state to read. Cannot be combined with blockNumber.

## Return Type

```ts
import type { HcaCapabilities } from "@ensforge/core/hca";
```

| Property             | Type                 | Description                                  |
| -------------------- | -------------------- | -------------------------------------------- |
| `account`            | `VerifiedHcaAccount` | Verified account and deployment details.     |
| `ownerExecution`     | `true`               | Whether direct owner execution is supported. |
| `sessionExecution`   | `true`               | Whether session execution is supported.      |
| `moduleInstallation` | `false`              | Whether module installation is supported.    |
| `delegatecall`       | `false`              | Whether delegatecall execution is supported. |
| `reasons`            | `readonly string[]`  | Reasons for unavailable capabilities.        |

## Effect

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

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

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

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

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

## Request

Use `.request` to describe the read without executing it, then include it in a typed
[read batch](/core/guides/batching).

```ts
const request = getHcaCapabilities.request({
  hca: "0x1234567890123456789012345678901234567890",
});
```

## Error

The Promise API rejects with the same typed failures exposed by the Effect error channel. Errors
have a stable `_tag`, `code`, and `message`; boundary errors retain their original `cause`.

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

## Related

* [`getHcaCapabilities`](/sdk/api/hca/get-hca-capabilities)
* [Guide](/core/guides/hca)
