Skip to main content

What does event do?

The event command posts a transaction hash back to Mandate after you sign and broadcast a raw-validated transaction. Mandate’s envelope verifier compares the on-chain transaction against the parameters you validated. If they match, the intent moves to confirmed. If they do not match, the circuit breaker trips. This command is required after every validate --raw or transfer --raw flow. Skip it and the intent stays in broadcasted state until it expires.

Usage

npx @mandate.md/cli event <intentId> --tx-hash 0xabc123...

Arguments

ArgumentRequiredDescription
intentIdYesThe intent ID returned by validate or transfer

Options

OptionRequiredDescription
--tx-hashYesThe broadcast transaction hash (0x...)

Output

{
  "posted": true,
  "intentId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "next": "Run: mandate status a1b2c3d4-5678-90ab-cdef-1234567890ab"
}
The next field tells you (or your AI agent) to poll intent status for on-chain confirmation.

When to use this

You need event in the raw validation flow, after step 2:
  1. mandate validate --raw ... or mandate transfer --raw ... (policy check)
  2. Sign and broadcast the transaction locally
  3. mandate event <intentId> --tx-hash 0x... (envelope verify)
  4. mandate status <intentId> (confirm on-chain)
For preflight validation (the default, without --raw), you do not need event. Preflight flows do not require envelope verification.
If the on-chain transaction does not match the validated parameters, the envelope verifier trips the circuit breaker. All future transactions for this agent are blocked until the owner resets it in the dashboard.

Next Steps

Check Intent Status

Poll for on-chain confirmation after posting the event.

MandateClient.postEvent()

The SDK method that powers this command.