Skip to main content
Real-world recipes. Each one is a complete shell snippet you can copy, adjust, and run.

1. Bulk-approve every withdrawal awaiting approval

You’re the second-of-two approvers for a batch of payouts. Approve all waiting-approval withdrawals in one go.
For safety, add a --createdAtFrom filter to scope the batch to a known window so a stale waiting-approval from last week doesn’t sneak in.

2. Watch a single transaction to completion

Trigger a withdrawal, then block until it’s completed (or failed).
The --externalId is critical: if the script crashes between bron tx withdrawal and the wait loop and you re-run, idempotency guarantees no duplicate withdrawal. See bron help idempotency for the full contract.

3. Daily treasury snapshot — balances + USD totals

A nightly cron that posts a CSV of every non-empty balance with USD value to a shared bucket.
--embed prices saves you a separate bron symbols prices call per balance — the join happens server-side under _embedded.

4. Audit-trail export for compliance

Every withdrawal in a quarter, with creator + amount + destination, as a single JSON Lines file.
The Audit Trail button in the UI calls the same endpoint — the CLI version is reproducible and trivial to integrate into a pipeline.

5. Settled volume for a period — sum the events, not the intents

To total what actually moved, sum _embedded.events[] (the on-chain settlement facts), not params.amount (the requested amount). They differ for swaps, bridges, intents, fiat and any fee-bearing transfer. Pass --includeEvents to fetch the events array.
From an MCP host the same aggregation goes in the jq tool argument, so only the total comes back into context — see Shaping responses.

6. Live ops dashboard — react to failed broadcasts in real time

A monitoring loop that subscribes to all failed broadcasts in a workspace and pages the on-call.
Auto-reconnect means this loop keeps running across server restarts and idle timeouts — the connection is reopened in seconds without intervention.

7. Pre-flight a transaction with tx dry-run

Before submitting a real bron tx withdrawal, dry-run it to surface validation errors and fee estimates.
If the dry-run prints fee + ETA + no errors, submit for real:

8. Body composition with --file + per-field overrides

Reuse a JSON template, override the amount and idempotency key per call:
Order of body merge:
  1. Baseline from --file <path> or --json '{...}' (mutually exclusive).
  2. Per-field flags (--<name> / --<a>.<b>) override matching paths in the baseline.
--file - reads the baseline from stdin — handy for piping templates from another tool.