Commit 7db7386
feat(PR30): XRPL escrow budget fields in PolicyGrantLike (#48)
* feat(PR30): add budgetMinor, budgetEscrowRef, authorizedGateway, offlineMaxSinglePayment to PolicyGrantLike
XRPL-escrow budget enforcement requires these PA-signed fields in the PolicyGrant
so the Trust Gateway can enforce ceilings from a tamper-proof source rather than
trusting agent-reported values.
- PolicyGrantLike: budgetMinor, budgetCurrency, budgetEscrowRef, authorizedGateway,
offlineMaxSinglePayment, offlineMaxSinglePaymentCurrency
- policyGrantForVerificationSchema: Zod validators for all six fields (numeric strings
validated via regex)
- createPolicyGrant / CreatePolicyGrantInput: factory and input type updated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: review corrections — JSDoc consistency and rail-agnostic wording
- types.ts: authorizedGateway — remove XRPL-specific "address" wording, use rail-agnostic description
- types.ts: offlineMaxSinglePayment — "(drops)" → "minor units" (rail-agnostic)
- types.ts: budgetEscrowRef example — add lockId to eth example for consistency with spec
- createPolicyGrant.ts: add missing JSDoc for authorizedGateway, offlineMaxSinglePayment,
offlineMaxSinglePaymentCurrency (other new fields had docs, these three did not)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: NAOR YUVAL <naoryuval@NAORs-MacBook-Air.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent e6ad583 commit 7db7386
3 files changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
15 | 27 | | |
16 | 28 | | |
17 | 29 | | |
| |||
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
33 | 51 | | |
34 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
19 | 37 | | |
20 | 38 | | |
21 | 39 | | |
| |||
0 commit comments