What does scan do?
The scan command walks your TypeScript and JavaScript files looking for wallet calls (.sendTransaction(), .transfer(), writeContract(), and 7 other patterns) that do not have a corresponding Mandate validation in the same file. It requires no authentication and no configuration.
Usage
Arguments
Options
Patterns detected
The scanner looks for 10 financial call patterns in.ts, .js, .tsx, and .jsx files:
A call is marked protected if the file imports from
@mandate, references MandateClient, MandateWallet, mandate.validate, or mandate.preflight. The scanner also checks for project-level protection: if @mandate.md/sdk appears in any package.json or a MANDATE.md file exists, all findings are marked protected.
Exit codes
Human-readable output
JSON output
CI integration
Add the scan to your CI pipeline. The exit code 1 fails the build if unprotected calls exist. GitHub Actions:--json flag is useful for programmatic processing in CI. Pipe it to jq to extract specific fields or fail on thresholds.
Next Steps
Codebase Scanner Guide
Detailed walkthrough of scanner patterns and remediation steps.
CI/CD Integration
Set up Mandate checks in your deployment pipeline.
Validate Transactions
Add validation to the unprotected calls the scanner found.