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

# Registration

HCA registration coordinates commitment, the waiting period and registration. You receive a saved
operation with an ID and progress status, not a guarantee that the name is registered immediately.

## Choose authorization

Use owner authorization with a deployed HCA or a [Pimlico adapter](/hca/pimlico/usage#register-a-name).
For [Rhinestone](/hca/rhinestone/usage#register-a-name), enable a session for the chosen registration
resolver and supply its permission ID and confirmed enable transaction hash.

The owner/SDK setup is shared with [Accounts and permissions](/hca/guides/accounts). Configure
[durable storage](/hca/guides/storage) if the workflow must survive a restart.

## Set the registration terms

Use an available V2 name and a resolver compatible with the deployed generation. The example caps
the name price at ten USDC, in six-decimal base units. Review the actual price before proceeding.

:::code-group
```ts [registration.ts]
// [!include ~/snippets/hca/guides/registration.ts]
```
:::

An empty `fees` array is appropriate for the sponsored examples. Self-funded execution needs explicit
fee bounds for its chain and asset; see [startHcaRegistration](/sdk/api/hca/start-hca-registration).
Payment-token funding and execution gas are separate budgets.

## Start with the owner wallet

:::code-group
```ts [register.ts]
import { hca, salt } from "./account";
import { sdk } from "./client";
import { registration } from "./registration";

const operation = await sdk.hca.startHcaRegistration({
  ...registration,
  hca,
  salt,
  authorization: { kind: "owner" },
  limits: {
    ...registration.limits,
    fees: [
      { kind: "execution", chainId: 11155111, token: "native", maximum: 10_000_000_000_000_000n },
    ],
  },
});
```

```ts [account.ts]
// [!include ~/snippets/hca/guides/account.ts]
```

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

The owner example allows up to 0.01 Sepolia ETH in execution fees; choose a bound appropriate for
your application. Store `operation.id`. The SDK generates an ID and can find matching unfinished work when you repeat
unchanged start inputs. An explicit ID is useful when an application already has an order or job ID.

## Advance the workflow

| Progress                         | Application behavior                                      |
| -------------------------------- | --------------------------------------------------------- |
| Submitted or submitting          | Query saved progress and reconcile the pending operation. |
| Waiting                          | Wait until `readyAt`, then resume.                        |
| Funding required                 | Fund the reported token amount, then resume.              |
| Review or authorization required | Show the requested change and obtain explicit approval.   |
| Registered                       | Show the registered name.                                 |

```ts [resume.ts]
import { sdk } from "./client";

const operation = await sdk.hca.getHcaRegistration({ id: savedOperationId });
if (
  operation.progress.status === "waiting" &&
  BigInt(Math.floor(Date.now() / 1000)) >= operation.progress.readyAt
) {
  await sdk.hca.resumeHcaRegistration({ id: operation.id });
}
```

For provider executions, pass the same compatible `execution` adapter to both status and resume.
`savedOperationId` comes from your persisted application state. Never replace uncertain submitted
work with a fresh ID to bypass recovery.

## Cancel or change terms

`cancelHcaRegistration` stops eligible local progression. It does not undo a transaction or revoke
sessions. Changes to limits or session authorization are explicit inputs to `resumeHcaRegistration`.
Starting again with different terms may select a different workflow, so keep the existing ID when
you mean to continue an operation.
