Function: enforcePolicy()¶
Defined in: rine-core/dist/src/x402/policy.d.ts:9
Enforce the spend policy for a single requirement. Deny-by-default: a null policy always throws. Throws a typed X402Error on any violation; returns silently when the requirement is payable within caps.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
policy |
PaymentPolicy | null |
- |
req |
PaymentRequirements |
- |
dailySpentCanonical |
bigint |
already-spent amount today, in canonical micro-units. |
Returns¶
void