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

Records a transaction sent outside ensforge as a plan step's submission. Parameters, return value, errors and examples for plan.reconcile in @ensforge/sdk.

ReadBatchablestable
Since v1.0.0View source

Records a transaction sent outside ensforge as a plan step's submission.

When to use

Use when a step was sent from another device or the wallet lost track, so resuming does not send it again.

Details

  • The transaction must exist and come from the plan's account, or call one of the step's contracts.
  • plan.resume then waits for it instead of sending the step.

Signature

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

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

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

Parameters

OptionTypeDefaultDescription
id (required)stringPlan id.
step (required)stringStep id the transaction submitted.
hash (required)HexTransaction hash.

Returns

Resolves to Plan.Record. The updated record.

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
NotFoundErrorPLAN_NOT_FOUNDan unknown plan.
PlanErrorPLAN_INVALIDa saved plan cannot be read.
InvalidInputErrorINVALID_RECORD_VALUEan unknown step or an unrelated transaction.
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

Attaching a recovered hash
const record = await ens.plan.reconcile({ id, step: "commit", hash })

See also

Was this page helpful?