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

# deployHca

Deploy or verify the existing deterministic account.

## Import

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

## Usage

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

const result = await deployHca(config, {
  owner: "0x2345678901234567890123456789012345678901",
});
```

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

## Parameters

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

### owner

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

Owner address used for account derivation or authorization.

### salt

`bigint | undefined`

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

### implementation

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

Implementation address to inspect, approve or use for derivation.

### 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 DeployHcaResult = Awaited<ReturnType<typeof deployHca>>;
```

| Property  | Type                                              | Description                                    |
| --------- | ------------------------------------------------- | ---------------------------------------------- |
| `status`  | `"deployed" \| "already-deployed" \| "submitted"` | Current deployment or execution state.         |
| `address` | `` `0x${string}` ``                               | HCA address.                                   |
| `hash`    | `` `0x${string}` \| null ``                       | Submitted transaction hash.                    |
| `receipt` | `TransactionReceipt \| null`                      | Confirmed transaction receipt, when requested. |

Returns `DeployHcaResult`.

## 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 = deployHca.effect(config, {
  owner: "0x2345678901234567890123456789012345678901",
});

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

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

## Call

```ts
const intent = deployHca.call({
  owner: "0x2345678901234567890123456789012345678901",
});
```

Preparing an intent does not submit a transaction.

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

* [`deployHca`](/sdk/api/hca/deploy-hca)
* [Guide](/core/guides/hca)
