#!/usr/bin/env node /** * perp-guardrail — OWS Policy Engine custom executable. * * Protocol: * stdin → PolicyContext JSON (from OWS engine) * stdout → PolicyResult JSON {"allow": bool, "reason"?: string} * * Validates: * 1. Contract address whitelist (per chain) * 2. Per-transaction USD amount limit * 3. Daily cumulative spending limit * 4. Withdrawal limits (per-tx and daily) * 5. Blocked function selectors (e.g. approve) * 6. Allowed trading symbols * * Configuration is read from PolicyContext.policy_config: * { max_tx_usd, max_daily_usd, max_withdraw_usd, max_daily_withdraw_usd, * allowed_symbols?, block_selectors?, allowed_contracts?, allowed_chains? } */ export {};