Skip to main content

Policy Rules

Policy rules control which payment protocols and amounts mindwallet will accept. They are evaluated during the selection pipeline's filter stage.

Configuration​

Add policy rules to your config file:

{
"policy": [
{ "type": "budget", "currency": "USDC", "limit": "10000000", "window": "daily" },
{ "type": "deny-protocol", "protocol": "mpp" },
{ "type": "prefer-protocol", "protocol": "x402", "boost": 0.2 }
]
}

Rule Types​

budget​

Caps spending within a time window.

FieldTypeDefaultDescription
currencystring"USDC"Currency to track
limitstring"0"Maximum amount (in smallest unit)
windowstring"daily"Time window: daily, weekly, monthly

deny-protocol​

Blocks a specific payment protocol entirely.

FieldTypeDescription
protocolstringProtocol to deny: x402, mpp, siwx

prefer-protocol​

Adds a score boost to candidates of a specific protocol, making it more likely to be selected.

FieldTypeDefaultDescription
protocolstring—Protocol to prefer
boostnumber0.1Score boost (0.0 to 1.0)

Implicit Rules​

In private key mode, an implicit prefer-protocol: x402 rule with boost 0.1 is added automatically. This makes x402 the default when multiple protocols can handle a challenge.

Examples​

Allow only SIWX (no payments)​

{
"policy": [
{ "type": "deny-protocol", "protocol": "x402" },
{ "type": "deny-protocol", "protocol": "mpp" }
]
}

Daily budget of 1 USDC​

{
"policy": [
{ "type": "budget", "currency": "USDC", "limit": "1000000", "window": "daily" }
]
}

Prefer Tempo over x402​

{
"policy": [
{ "type": "prefer-protocol", "protocol": "mpp", "boost": 0.3 }
]
}