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

# Usage

Start with the clients and account from [Getting started](/hca/pimlico/getting-started). Keep the
adapter instance with the SDK while you submit and track operations.

## Allow the HCA to update a record

Use a name owned or managed by the configured wallet. This step grants resolver access to the HCA
and is paid by that wallet.

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

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

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

If the resolver cannot grant only the requested record permission, the example stops instead of
silently widening access. Review the scope described in [Accounts and permissions](/hca/guides/accounts).

## Send the update

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

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

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

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

Pimlico returns a UserOperation reference. The adapter checks the operation's outcome; a successful
outer bundle receipt alone does not mean your HCA call succeeded. Inspect `outcome.status` before
showing success in your application.

## Send a batch

Add more `.call(...)` intents to `calls`. For example, update `description` and `url` together after
granting both permissions. The batch executes as the HCA, not the owner EOA.

## Register a name

Use a compatible V2 resolver and an available name. Sponsorship pays gas, not the registration price;
the HCA needs the registrar's payment token.

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

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

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

The result can be submitted, waiting or awaiting funding rather than completed. Follow the
[registration lifecycle](/hca/guides/registration) to advance it, and configure durable
[storage](/hca/guides/storage) before relying on restart recovery.

## After a timeout

Keep the returned submission. Query `getHcaExecutionStatus({ submission, execution })` or wait again
with the same adapter. For registration, keep the operation ID and call `getHcaRegistration`.
Avoid resubmitting an operation whose inclusion is still unknown.
