What does the scanner detect?
The Mandate scanner finds wallet and transaction calls in your codebase that lack policy enforcement. It looks for 10 financial call patterns:sendTransaction(),sendRawTransaction()on any objectwallet.transfer(),wallet.send(),wallet.sendTransaction()writeContract(),walletClient.writeexecuteAction(...transfer),execute_swap,execute_trade
MandateClient, MandateWallet, or @mandate imports) or whether the project has the SDK installed as a dependency. Calls without Mandate protection are flagged as unprotected.
The scanner also recognizes project-level protection signals: @mandate.md/sdk in package.json, a MANDATE.md file in the project root, or a .mandate/ configuration directory. When any of these exist, all findings are marked as protected.
Run the scanner
Use the CLI to scan your codebase:.ts, .js, .tsx, and .jsx files. It skips node_modules, dist, .git, and build directories by default.
Reading the output
The scanner prints each unprotected call with its file path, line number, and a snippet of the matching code:CI integration
GitHub Actions
Add a scan step to your workflow. The exit code fails the build when unprotected calls are found.Pre-commit hook
Block commits that introduce unprotected wallet calls:.git/hooks/pre-commit and make it executable with chmod +x .git/hooks/pre-commit. For team-wide enforcement, use a tool like husky or lefthook to distribute the hook.
JSON output for custom reporting
Use--json to get structured output for dashboards or Slack notifications:
Auto-scan in plugins
The Claude Code plugin and OpenClaw plugin run the scanner automatically on session start. When you open a project with the plugin installed, the scanner checks your codebase and reports findings inline. No configuration needed. The plugin scanner uses the same detection patterns as the CLI. If it finds unprotected calls, you see the results before your first interaction. This makes it impossible to miss unguarded transaction paths in your agent code.Next Steps
CLI Scan Reference
Full flag reference and advanced options for the scan command.
CI/CD Guide
Set up continuous Mandate enforcement in your deployment pipeline.
Claude Code Plugin
Auto-scan on startup with two-phase transaction enforcement.
Validate Transactions
Learn the validation flow that protects your agent’s transactions.