Policy schema

The sign-rules format a warrant binds.

A policy is JSON. The web3 gate reads sign_rules:

{
  "sign_rules": {
    "window": "24h",
    "deny": [
      { "name": "no withdrawals", "match": { "tx.function": "withdraw" } },
      { "name": "daily cap", "match": { "window.spent_after_usd": { "gt": 100000 } } }
    ],
    "approve": [
      { "name": "mid", "match": { "notional_usd": { "gt": 5000, "lte": 50000 } } }
    ],
    "allow": [
      { "name": "small", "match": { "tx.chain": "sui:testnet", "notional_usd": { "lte": 5000 } } }
    ]
  }
}

Precedence

denyapproveallow, then default-deny. A matching deny always refuses; a matching approve holds for owner sign-off; a matching allow proceeds; no match fails closed.

Facts a rule can match

FactSource
tx.chainthe --chain
tx.package / tx.to / tx.functiondecoded from the tx bytes (Sui), else declared
notional_usdpriced from outflows (Sui) or the declared --value, in USD cents
window.spent_usd / window.spent_after_usdrolling spend from the audit log
asset.<SYM>.amountraw decoded outflow amounts (the oracle-free floor)
unpriceableset when value can't be priced — guard on it for non-Sui or undeclared value

Match operators

String equality, { "lte": n }, { "gt": n }, { "in": [ … ] }. Catch the OR-of-allows footguns (unbounded allow, USD-only with no raw floor) with warden policy lint.