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:
TypeScript
expiry = now + (defaultExpirySeconds ?? 60)Timeout vs expiry
guardAndWait / guard_and_wait also has a client-side timeout:
expiry: action lifetime in Beav3rtimeoutMs/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
TypeScript
const result = await client.guardAndWait(input, {
pollIntervalMs: 2000,
timeoutMs: 30_000
})Terminal states
Final states are:
approvedexecuteddeniedrejectedexpired
guard vs guardAndWait / guard_and_wait
guardreturns the immediate decision (executed,pending,denied).guardAndWait/guard_and_waitpolls until terminal state or local timeout (pending).
Recommended values
For interactive signer review:
- expiry window:
180to300seconds - 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.