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

# verifyHca

Verify account identity, profile, ownership and deployment wiring.

## Import

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

## Usage

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

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

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

## Parameters

```ts
import type { VerifyHcaParameters } from "@ensforge/sdk/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 { VerifiedHcaAccount } from "@ensforge/sdk/hca";
```

| Property                | Type                   | Description                                               |
| ----------------------- | ---------------------- | --------------------------------------------------------- |
| `deployed`              | `boolean \| undefined` | Whether the account is deployed.                          |
| `kind`                  | `"ens-hca"`            | Account or submission discriminator.                      |
| `address`               | `` `0x${string}` ``    | HCA address.                                              |
| `owner`                 | `` `0x${string}` ``    | Account owner.                                            |
| `chainId`               | `number`               | Chain containing the account.                             |
| `profileId`             | `string`               | Deployment profile used to verify the account.            |
| `initialImplementation` | `` `0x${string}` ``    | Implementation used for deterministic address derivation. |
| `currentImplementation` | `` `0x${string}` ``    | Implementation currently used by the account.             |
| `salt`                  | `bigint`               | Deterministic account salt.                               |
| `sessionNonce`          | `bigint`               | Nonce used to invalidate previously authorized sessions.  |
| `verifiedAtBlock`       | `bigint`               | Block at which account verification completed.            |

## 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.verifyHca.effect({
  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 = sdk.hca.verifyHca.request({
  hca: "0x1234567890123456789012345678901234567890",
});
```

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

* [`verifyHca`](/core/api/actions/hca/verify-hca)
* [Guide](/core/guides/hca)
