Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeSDK

plan.get

Reads a saved plan and its progress. Parameters, return value, errors and examples for plan.get in @ensforge/sdk. Options, errors and examples for plan.get.

ReadBatchablestable
Since v1.0.0View source

Reads a saved plan and its progress.

When to use

Use to show where a registration, migration or other multi-step write stands.

Details

  • Every write saves its plan to the client's storage as it sends.
  • null when no plan has the id (memory storage forgets plans on reload).

Signature

function get(client: Like, options: get.Options): Promise<get.ReturnType>

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

plan.get.request(options) builds a deferred read for Actions.batch. See Look up many at once.

Parameters

OptionTypeDefaultDescription
id (required)stringPlan id, from result.plan.id or a failure's context.planId.

Returns

Resolves to Plan.Record | null. The saved plan and its progress, or null.

FieldTypeDescription
planPlan
status"pending" | "completed" | "failed"pending while steps remain, completed once every step is submitted.
submittedReadonly<globalThis.Record<string, readonly Hex[]>>Transaction hashes per submitted step id.
bundlesReadonly<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)stringMessage of the last failure.
updatedAtnumberUnix time in milliseconds.

Errors

ErrorCodesWhen
InternalErrorUNEXPECTEDthe storage fails.
PlanErrorPLAN_INVALIDa saved plan cannot be read.
NetworkErrorRPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITEDthe RPC request fails.

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

See How errors work.

Examples

Reading a plan
const record = await ens.plan.get({ id: planId })

See also

Was this page helpful?