Skip to main content
Defined in: guardrails/types.ts:153 Configuration for spend controls. All fields are optional.

Example

Properties

maxAmountPerPayment?

Defined in: guardrails/types.ts:160 Hard per-payment cap. If asset is set the cap only applies to payments in that asset — payments in any other asset are left uncapped by this field (atomic units are not comparable across assets with different decimals). Omit asset to cap every payment by raw atomic amount.

maxCumulativeSpend?

Defined in: guardrails/types.ts:166 Rolling cumulative cap. Unlike maxAmountPerPayment, asset is required (enforced when spend controls are applied) because cross-asset atomic units cannot be summed.

maxCumulativeSpendWindow?

Defined in: guardrails/types.ts:167

allowedNetworks?

Defined in: guardrails/types.ts:168

allowedAssets?

Defined in: guardrails/types.ts:169

allowedPayees?

Defined in: guardrails/types.ts:170

onApproachingLimit()?

Defined in: guardrails/types.ts:171

Parameters

spent
Amount
limit
Amount

Returns

void

approachingLimitThresholds?

Defined in: guardrails/types.ts:172

maxLedgerEntries?

Defined in: guardrails/types.ts:173

store?

Defined in: guardrails/types.ts:174