Lifecycles

CRE Connect resources move through well-defined state machines. This page lists every status value (taken verbatim from the OpenAPI spec) and shows how each resource transitions in response to API calls and backend events.

Watcher lifecycle

WatcherStatus:

StateReachable viaNotes
pendingPOST /channels/{id}/watchers returns this immediately.Backend is provisioning the watcher.
activeBackend transition once provisioning completes.Watcher is observing the chain.
failedBackend transition.Provisioning or runtime failure.
archivingPATCH /channels/{id}/watchers/{id} with status: archived (returns 202).Async tear-down.
archivedBackend transition once tear-down completes.Terminal.
archive_failedBackend transition.Returned via the WatcherEventStatus enum on event filters.

Subscribe to watcher.status events to receive a transition payload (WatcherStatusPayload) for every move.

Wallet (Smart Account) lifecycle

WalletStatus:

StateReachable viaNotes
pendingPOST /wallets returns this.Backend has accepted the request.
deployingBackend transition.On-chain deploy submitted.
deployedBackend transition.Smart Account deployed; address is stable.
failedBackend transition.Deploy failure.
archivedPATCH /wallets/{id} with status: archived.Wallet is hidden from default listings.

Subscribe to wallet.status events for a stream of wallet transitions (WalletStatusPayload).

Operation lifecycle

OperationStatus:

StateReachable viaNotes
pending_signaturePOST /channels/{id}/operations (no signature).Draft operation awaiting finalization. Not relayed to the chain. See Drafts.
acceptedPOST /channels/{id}/operations (with signature) or PATCH finalize.Backend has accepted the operation and enqueued it for relay.
sendingBackend transition.Picked up by the worker.
sentBackend transition.Submitted to the chain mempool.
broadcastingBackend transition.Awaiting block inclusion.
confirmed_latestBackend transition.Operation included on chain at latest confidence. May still be reorganized. See Multi-Event Finality.
confirmed_safeBackend transition.Operation included on chain at safe confidence. Reorg very unlikely.
confirmedBackend transition.Operation included on chain at finalized confidence. Cannot be reorganized.
failedBackend transition.Permanent failure (revert, gas, …).
cancelledPATCH /channels/{id}/operations/{id} (cancel).Draft was cancelled before signing. Terminal.
expiredBackground scanner or inline during finalize.Deadline elapsed before the operation was finalized or confirmed. Terminal.

Subscribe to operation.status events to track every operation through to a terminal state (OperationStatusPayload). Terminal states are: confirmed, failed, cancelled, expired.

Query lifecycle

QueryStatus:

StateReachable viaNotes
acceptedPOST /channels/{id}/queries returns this.Query created and persisted; job enqueued for dispatch.
sendingBackend transition.Dispatch worker is actively sending to the CRE gateway.
sentBackend transition.Successfully dispatched to CRE gateway; awaiting DON callback.
completedBackend transition.DON returned a successful result with OCR proof. Terminal.
failedBackend transition.DON returned an error, or dispatch failed permanently. Terminal.
expiredBackend transition.TTL elapsed before a terminal callback arrived. Terminal.

Subscribe to query.status events to track queries through to a terminal state. Terminal completed and failed events carry OCR proofs and can be verified with events.Client.VerifyQueryStatus. See Chain Queries.

Event types

The EventType enum drives the events.search and events.poll endpoints:

EventTypePayload structEmitted when
operation.statusOperationStatusPayloadAn operation moves between OperationStatus values.
query.statusQueryStatusPayloadA chain query moves between QueryStatus values.
watcher.statusWatcherStatusPayloadA watcher moves between WatcherStatus values.
watcher.eventWatcherEventPayloadA subscribed contract event is observed on chain.
wallet.statusWalletStatusPayloadA wallet moves between WalletStatus values.

watcher.event payloads are cryptographically verifiable with events.Client.Verify. operation.status events at confirmed_latest, confirmed_safe, and confirmed are also DON-verified via events.Client.VerifyOperationStatus. Terminal query.status events (completed, failed) are DON-verified via events.Client.VerifyQueryStatus. Non-terminal status events and draft lifecycle events (pending_signature, cancelled, expired) are operational notifications without OCR proofs.

Polling vs subscribing

For lifecycle state, you have two options:

  1. Re-fetching the resource: call GET /channels/{id}/operations/{id} (or the equivalent for watchers / wallets) on each tick.
  2. Polling the events stream: call GET /channels/{id}/events with the appropriate type filter and a stable cursor, and consume the lifecycle events as they appear on the channel.

See Submit and Track Operations and Poll and Search Events for examples of both patterns.

Confidence levels and confirmed

An operation.status event reaches confirmed_latest, then confirmed_safe, then confirmed as the underlying transaction's block matures through confidence levels. On testnets, only latest may be active, making confirmed_latest the terminal status. On mainnets, the full ladder runs to confirmed. See Multi-Event Finality for the complete progression and reorg handling.

See also

Get the latest Chainlink content straight to your inbox.