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.
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.resumethen 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
| Option | Type | Default | Description |
|---|---|---|---|
id (required) | string | Plan id. | |
step (required) | string | Step id the transaction submitted. | |
hash (required) | Hex | Transaction hash. |
Returns
Resolves to Plan.Record. The updated record.
| 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
| Error | Codes | When |
|---|---|---|
NotFoundError | PLAN_NOT_FOUND | an unknown plan. |
PlanError | PLAN_INVALID | a saved plan cannot be read. |
InvalidInputError | INVALID_RECORD_VALUE | an unknown step or an unrelated transaction. |
NetworkError | RPC_REQUEST_FAILED, RPC_TIMEOUT, 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.
Examples
const record = await ens.plan.reconcile({ id, step: "commit", hash })See also
plan.resumeto continue the plan
Was this page helpful?