# renewNames

Renews multiple names with batching and resumable progress.

## Import

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

## Usage

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

const result = await sdk.registration.renewNames({
  renewals: [],
});
```

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

## Parameters

```ts
import type { RenewNamesParameters } from "@ensforge/sdk/registration";
```

### renewals

`ReadonlyArray<RenewNamesEntryParameters>`

Renewal entries.

### maxTotalPrice

`bigint | undefined`

Maximum aggregate price accepted by the caller.

### resume

`RenewNamesResult | undefined`

Previously returned progress used to continue the workflow.

### walletClient

`WalletClient | undefined`

Viem wallet client override for this operation. Defaults to the wallet resolved from the config.

### account

`Account | Address | undefined`

Account used to authorize this operation. Defaults to the account exposed by the resolved wallet client.

### mode

`WriteMode | undefined`

Write execution strategy. `auto` uses wallet capabilities and falls back to sequential transactions.

### confirmation

`ConfirmationPolicy | undefined`

Controls whether the action returns after submission or waits for one or more confirmations.

## Return Type

```ts
import type { RenewNamesResult } from "@ensforge/sdk/registration";
```

| Property     | Type                                                                                                                                                                      | Description                                            |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `status`     | `"completed" \| "partial"`                                                                                                                                                | Current query, transaction, batch, or workflow status. |
| `renewals`   | `readonly (Omit<RenewNameResult, "status" \| "write" \| "approval" \| "finalState"> & { readonly newExpiry: bigint \| null; readonly finalState: NameState \| null; })[]` | The renewals value returned by the operation.          |
| `approvals`  | `readonly RenewalApproval[]`                                                                                                                                              | The approvals value returned by the operation.         |
| `totalPrice` | `bigint`                                                                                                                                                                  | The totalPrice value returned by the operation.        |
| `write`      | `WritePlanProgress`                                                                                                                                                       | Progress for the write plan used by the workflow.      |

## Effect

Use `.effect` when composing the method in an Effect program. The success and error channels remain
fully typed.

```ts
import { Effect } from "effect";
import { sdk } from "./client";

const program = sdk.registration.renewNames.effect(parameters);

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

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

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

* [`renewNames`](/core/api/actions/registration/renew-names)
