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

# Accounts and permissions

Use this guide when you want to deploy an account or send calls directly from its owner. The same
account works with Pimlico and Rhinestone later.

## Configure the owner

The examples use a server-side Viem local account. Set `ENSFORGE_SEPOLIA_RPC_URL` and
`ENSFORGE_SEPOLIA_PRIVATE_KEY` in your runtime environment. Keep that private key out of browser
bundles. A browser application should instead pass its connected wallet client to the SDK.

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

The SDK uses in-memory workflow storage by default. See [Storage and recovery](/hca/guides/storage)
when you need to continue work after a reload or process restart.

## Predict and deploy

Choose the salt once and keep it with the account. The same owner and salt derive the same address;
changing either selects a different account. Prediction does not deploy a contract.

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

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

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

`deployHca` reuses an existing deployment. When it returns a hash, wait for a successful receipt before
continuing. The owner needs Sepolia ETH for this explicit deployment transaction.

## Grant record permission

Replace `your-name.eth` with an existing name controlled by the owner. Check whether the HCA can
change its description, then grant access only if needed.

:::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]
```
:::

This example refuses permissions broader than the requested record. If the resolver supports only
node-wide delegation, inspect that scope before explicitly setting `allowScopeWidening: true`.
The permission transaction is sent by the name's authorized wallet, not by the HCA.

Continue with [Sending calls](/hca/execution), [Pimlico usage](/hca/pimlico/usage) or
[Rhinestone sessions](/hca/rhinestone/sessions).
