Skip to Content
SDKRequest Expiry and Terminal States

Request Expiry and Terminal States

This page explains how expiry and terminal states work in SDK-triggered requests.

Expiry defaults

If you do not set expiry, the SDK computes:

expiry = now + (defaultExpirySeconds ?? 60)

Timeout vs expiry

guardAndWait / guard_and_wait also has a client-side timeout:

  • expiry: action lifetime in Beav3r
  • timeoutMs / timeout_ms: local wait limit for your script

If timeout is shorter than expiry, your script can return pending before the request expires.

Practical example

const result = await client.guardAndWait(input, { pollIntervalMs: 2000, timeoutMs: 30_000 })

Terminal states

Final states are:

  • approved
  • executed
  • denied
  • rejected
  • expired

guard vs guardAndWait / guard_and_wait

  • guard returns the immediate decision (executed, pending, denied).
  • guardAndWait / guard_and_wait polls until terminal state or local timeout (pending).

For interactive signer review:

  • expiry window: 180 to 300 seconds
  • wait timeout: at least the expiry window

For async workflows:

  • call guard
  • continue with callbacks or later status polling

Use SDK API Reference for method signatures and Callbacks from the SDK for terminal callback behavior.