# plan.list

> For the complete documentation index, see [llms.txt](https://ensforge.com/llms.txt).

Lists the saved plans of this client's chain and of its chains, newest first. Parameters, return value, errors and examples for plan.list in @ensforge/sdk.

Source: https://ensforge.com/docs/reference/sdk/plan/list

<ApiMeta kind="Read" stability="stable" since="1.0.0" source="packages/sdk/src/actions/plan/list/index.ts#L50" batchable />

Lists the saved plans of this client's chain and of its `chains`, newest first.

## When to use [#when-to-use]

Use to offer unfinished registrations or migrations after a reload.

## Details [#details]

- Filter by the account that prepared them and by status (`pending`, `completed`,
  `failed`).

## Signature [#signature]

```ts
function list(client: Like, options: list.Options): Promise<list.ReturnType>
```

Call it as `ens.plan.list(options)` on a client, or `Actions.plan.list(client, options)`.

`plan.list.request(options)` builds a deferred read for `Actions.batch`. See [Look up many at once](/docs/sdk/look-up-many-at-once).

## Parameters [#parameters]

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `account` | `string` |  | Only plans prepared for this account. |
| `status` | `Plan.Record["status"]` |  | Only plans with this status. |

## Returns [#returns]

Resolves to `readonly Plan.Record[]`. The saved plans, newest first.

| Field | Type | Description |
| --- | --- | --- |
| `plan` | `Plan` |  |
| `status` | `"pending" \| "completed" \| "failed"` | `pending` while steps remain, `completed` once every step is submitted. |
| `submitted` | `Readonly<globalThis.Record<string, readonly Hex[]>>` | Transaction hashes per submitted step id. |
| `bundles` | `Readonly<globalThis.Record<string, string>>` | EIP-5792 bundle id per step sent in a bundle. |
| `references` (optional) | `Readonly<globalThis.Record<string, string>>` | Route references per step sent through `via` (e.g. UserOperation hashes). |
| `error` (optional) | `string` | Message of the last failure. |
| `updatedAt` | `number` | Unix time in milliseconds. |

## Errors [#errors]

| Error | Codes | When |
| --- | --- | --- |
| [`InvalidInputError`](/docs/reference/errors/invalid-input-error) | [`INVALID_ADDRESS`](/docs/reference/errors/INVALID_ADDRESS) | an invalid account. |
| [`PlanError`](/docs/reference/errors/plan-error) | [`PLAN_INVALID`](/docs/reference/errors/PLAN_INVALID) | a saved plan cannot be read. |
| [`NetworkError`](/docs/reference/errors/network-error) | [`RPC_REQUEST_FAILED`](/docs/reference/errors/RPC_REQUEST_FAILED), [`RPC_TIMEOUT`](/docs/reference/errors/RPC_TIMEOUT), [`RATE_LIMITED`](/docs/reference/errors/RATE_LIMITED) | the RPC request fails. |

It can also fail with the errors every read can (`Errors.CommonError`: `ConfigError`, `ContractRevertError`, `InternalError`, `NetworkError`).

See [How errors work](/docs/sdk/errors-explained).

## Examples [#examples]

<Tabs groupId="api" items={["Client","Standalone","Effect"]} persist>
<Tab>
```ts title="Listing unfinished plans"
const records = await ens.plan.list({ status: "failed" })
```
</Tab>

<Tab>
```ts title="Listing unfinished plans with a standalone call"
import { Actions } from "@ensforge/sdk"

const records = await Actions.plan.list(publicClient, { status: "failed" })
```
</Tab>

<Tab>
```ts title="Listing unfinished plans in an Effect program"
import { Actions } from "@ensforge/sdk/effect"

const records = yield* Actions.plan.list(ens, { status: "failed" })
```
</Tab>
</Tabs>

## See also [#see-also]

- [`plan.get`](/docs/reference/sdk/plan/get) to read one