Skip to main content

What does approve do?

The approve command polls the Mandate API until the wallet owner makes an approval decision. It blocks until the intent is approved, rejected, or the timeout expires. Use it after catching an approval-required response from validate or transfer.

Usage

Arguments

Options

Output

Approved:
Rejected or expired:

When to use this

The validate and transfer commands return a requiresApproval: true response when the transaction exceeds the approval threshold set in the dashboard. The response includes the intentId and a next field pointing to approve:
At this point, the wallet owner receives a notification (dashboard, Slack, or Telegram) with the transaction details and the agent’s reason field. They approve or reject from the dashboard. Your agent runs mandate approve <intentId> to wait for the decision. Once approved, proceed with signing and broadcasting. If rejected or expired, stop.

Typical flow

  1. mandate validate --action transfer --amount 5000 ... returns approval required
  2. mandate approve <intentId> --timeout 600 waits up to 10 minutes
  3. If approved: mandate event <intentId> --tx-hash 0x... (raw flow only)
  4. mandate status <intentId> to confirm
Set --timeout to match your agent’s tolerance for blocking. For automated pipelines, shorter timeouts (60-300 seconds) prevent indefinite hangs. The default of 3600 seconds matches the server-side approval TTL.

Next Steps

Check Intent Status

Verify the final state after approval.

Handle Approvals Guide

End-to-end guide for integrating approval workflows into your agent.

Dashboard Approvals

Configure approval thresholds and notification channels.