Skip to content

SpendingPolicy

Defined in: src/policy/spending-policy.ts:43

Policy-as-data evaluated for every PaymentIntent. Deny-closed throughout: a token not listed in perToken is rejected, and recipientAllowlist is required"any" (unrestricted) is a conscious, greppable choice, never a silent default.

Properties

perToken

readonly perToken: readonly TokenLimit[]

Defined in: src/policy/spending-policy.ts:47


recipientAllowlist

readonly recipientAllowlist: readonly `0x${string}`[] | "any"

Defined in: src/policy/spending-policy.ts:58

Recipient restriction (required — no silent allow-open default): "any" = unrestricted, [] = deny-all, [...] = allowlist. Making "any" explicit keeps the policy deny-closed like perToken.

The on-chain createJpycDailyLimitPolicies takes the same Address[] | "any" shape, with two on-chain-forced differences: it is optional (omitted = "any"), and [] throws there (an on-chain allowlist cannot encode deny-all).


revoked

readonly revoked: boolean

Defined in: src/policy/spending-policy.ts:59


session

readonly session: object

Defined in: src/policy/spending-policy.ts:46

Session id + expiry (unix seconds). An authorization may not outlive the session.

id

readonly id: string

notAfter

readonly notAfter: bigint


version

readonly version: "1"

Defined in: src/policy/spending-policy.ts:44