@rpp402/protocol 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RPP402
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @rpp402/protocol
2
+
3
+ Published under MIT to the [`@rpp402`](https://www.npmjs.com/~rpp402) scope on npm.
4
+
5
+ ```bash
6
+ npm install @rpp402/protocol
7
+ ```
8
+
9
+ The source of truth for the RPP402 v1 wire format: JSON Schemas and TypeScript types for the six primitives - Discovery, Quote, Commerce Session, Payment Intent, Settlement, Receipt. These schemas are exactly what the [RFCs](https://rpp402.com/docs) document in prose; if they ever disagree, this package wins.
10
+
11
+ ```ts
12
+ import { schemas, RPP_VERSION, type CommerceSession } from "@rpp402/protocol";
13
+
14
+ // Every schema, keyed by primitive - ready to hand to any JSON Schema validator.
15
+ schemas.discovery;
16
+ schemas.commerceSession;
17
+
18
+ RPP_VERSION; // "1.0"
19
+ ```
20
+
21
+ ## What's exported
22
+
23
+ - `schemas` - the seven JSON Schemas (`assetRef`, `discovery`, `quote`, `commerceSession`, `paymentIntent`, `settlement`, `receipt`), inlined so there are no JSON files to resolve at runtime.
24
+ - `RPP_VERSION` - the wire-format version string, `"1.0"`.
25
+ - TypeScript types for every primitive and its fields (`CommerceSession`, `Quote`, `PaymentIntent`, `Settlement`, `Receipt`, `DiscoveryDocument`, `AssetRef`, and more).
26
+
27
+ Most applications don't use this package directly - [`@rpp402/sdk`](https://www.npmjs.com/package/@rpp402/sdk) is built on top of it and validates every response against these schemas for you. Reach for `@rpp402/protocol` when you're implementing a Service, building your own tooling, or validating documents yourself.
28
+
29
+ ## Learn more
30
+
31
+ - Protocol RFCs: <https://rpp402.com/docs>
32
+ - SDK: [`@rpp402/sdk`](https://www.npmjs.com/package/@rpp402/sdk)
33
+ - CLI: [`@rpp402/cli`](https://www.npmjs.com/package/@rpp402/cli)
package/dist/index.cjs ADDED
@@ -0,0 +1,315 @@
1
+ 'use strict';
2
+
3
+ // src/schemas/asset-ref.schema.json
4
+ var asset_ref_schema_default = {
5
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6
+ $id: "https://rpp402.com/schemas/v1/asset-ref.json",
7
+ title: "RPP402 Asset Reference",
8
+ type: "object",
9
+ required: ["type", "symbol", "chain_id", "contract"],
10
+ properties: {
11
+ type: { type: "string", enum: ["stablecoin", "tokenized_security"] },
12
+ symbol: { type: "string" },
13
+ chain_id: { type: "string" },
14
+ contract: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
15
+ issuer: { type: "string" }
16
+ },
17
+ if: { properties: { type: { const: "tokenized_security" } } },
18
+ then: { required: ["issuer"] }
19
+ };
20
+
21
+ // src/schemas/commerce-session.schema.json
22
+ var commerce_session_schema_default = {
23
+ $schema: "https://json-schema.org/draft/2020-12/schema",
24
+ $id: "https://rpp402.com/schemas/v1/commerce-session.json",
25
+ title: "RPP402 Commerce Session",
26
+ type: "object",
27
+ required: ["rpp402_version", "id", "agent_wallet", "status", "legs", "created_at", "expires_at"],
28
+ properties: {
29
+ rpp402_version: { type: "string", const: "1.0" },
30
+ id: { type: "string", pattern: "^sess_[a-zA-Z0-9]{8,}$" },
31
+ agent_wallet: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
32
+ status: {
33
+ type: "string",
34
+ enum: ["created", "quoting", "intent_authorized", "settling", "settled", "receipt_issued", "expired", "cancelled", "failed"]
35
+ },
36
+ legs: {
37
+ type: "array",
38
+ items: {
39
+ type: "object",
40
+ required: ["quote_id", "service_id", "capability", "price"],
41
+ properties: {
42
+ quote_id: { type: "string", pattern: "^quote_[a-zA-Z0-9]{8,}$" },
43
+ service_id: { type: "string", pattern: "^svc_[a-zA-Z0-9]{8,}$" },
44
+ capability: { type: "string" },
45
+ price: {
46
+ type: "object",
47
+ required: ["asset", "amount"],
48
+ properties: {
49
+ asset: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" },
50
+ amount: { type: "string", pattern: "^[0-9]+(\\.[0-9]+)?$" }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ intent_id: { type: ["string", "null"] },
57
+ settlement_id: { type: ["string", "null"] },
58
+ receipt_id: { type: ["string", "null"] },
59
+ created_at: { type: "string", format: "date-time" },
60
+ expires_at: { type: "string", format: "date-time" }
61
+ }
62
+ };
63
+
64
+ // src/schemas/discovery.schema.json
65
+ var discovery_schema_default = {
66
+ $schema: "https://json-schema.org/draft/2020-12/schema",
67
+ $id: "https://rpp402.com/schemas/v1/discovery.json",
68
+ title: "RPP402 Discovery Document",
69
+ type: "object",
70
+ required: ["rpp402_version", "service", "wallet", "capabilities", "supported_assets", "endpoints"],
71
+ properties: {
72
+ rpp402_version: { type: "string", const: "1.0" },
73
+ service: {
74
+ type: "object",
75
+ required: ["id", "name", "description"],
76
+ properties: {
77
+ id: { type: "string", pattern: "^svc_[a-zA-Z0-9]{8,}$" },
78
+ name: { type: "string", minLength: 1 },
79
+ description: { type: "string", minLength: 1 }
80
+ }
81
+ },
82
+ wallet: {
83
+ type: "object",
84
+ required: ["address", "chain_id"],
85
+ properties: {
86
+ address: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
87
+ chain_id: { type: "string" }
88
+ }
89
+ },
90
+ capabilities: {
91
+ type: "array",
92
+ minItems: 1,
93
+ items: {
94
+ type: "object",
95
+ required: ["name", "description"],
96
+ properties: {
97
+ name: { type: "string", pattern: "^[a-z0-9-]+\\.[a-z0-9-]+$" },
98
+ description: { type: "string" },
99
+ pricing_summary: { type: "string" }
100
+ }
101
+ }
102
+ },
103
+ supported_assets: {
104
+ type: "array",
105
+ minItems: 1,
106
+ items: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" }
107
+ },
108
+ endpoints: {
109
+ type: "object",
110
+ required: ["quote", "session", "receipts"],
111
+ properties: {
112
+ quote: { type: "string", format: "uri" },
113
+ session: { type: "string", format: "uri" },
114
+ receipts: { type: "string", format: "uri" }
115
+ }
116
+ }
117
+ }
118
+ };
119
+
120
+ // src/schemas/payment-intent.schema.json
121
+ var payment_intent_schema_default = {
122
+ $schema: "https://json-schema.org/draft/2020-12/schema",
123
+ $id: "https://rpp402.com/schemas/v1/payment-intent.json",
124
+ title: "RPP402 Payment Intent",
125
+ type: "object",
126
+ required: ["rpp402_version", "id", "session_id", "payer_wallet", "asset", "amount", "status", "authorization", "created_at", "expires_at"],
127
+ properties: {
128
+ rpp402_version: { type: "string", const: "1.0" },
129
+ id: { type: "string", pattern: "^intent_[a-zA-Z0-9]{8,}$" },
130
+ session_id: { type: "string", pattern: "^sess_[a-zA-Z0-9]{8,}$" },
131
+ payer_wallet: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
132
+ asset: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" },
133
+ amount_mode: { type: ["string", "null"], enum: ["fixed_quantity", "notional_usd", null] },
134
+ amount: { type: "string", pattern: "^[0-9]+(\\.[0-9]+)?$" },
135
+ status: { type: "string", enum: ["pending", "authorized", "revoked", "expired"] },
136
+ authorization: {
137
+ oneOf: [
138
+ {
139
+ type: "object",
140
+ required: ["type", "signer", "signature", "nonce"],
141
+ properties: {
142
+ type: { const: "eip712_signature" },
143
+ signer: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
144
+ signature: { type: "string", pattern: "^0x[a-fA-F0-9]+$" },
145
+ nonce: { type: "string" }
146
+ }
147
+ },
148
+ {
149
+ type: "object",
150
+ required: ["type", "account_id", "delegation_ref"],
151
+ properties: {
152
+ type: { const: "agentic_account_delegation" },
153
+ account_id: { type: "string", pattern: "^aa_[a-zA-Z0-9]{4,}$" },
154
+ delegation_ref: { type: "string", pattern: "^del_[a-zA-Z0-9]{4,}$" },
155
+ risk_check: { type: "string" }
156
+ }
157
+ }
158
+ ]
159
+ },
160
+ created_at: { type: "string", format: "date-time" },
161
+ expires_at: { type: "string", format: "date-time" }
162
+ },
163
+ if: { properties: { asset: { properties: { type: { const: "tokenized_security" } } } } },
164
+ then: { required: ["amount_mode"] }
165
+ };
166
+
167
+ // src/schemas/quote.schema.json
168
+ var quote_schema_default = {
169
+ $schema: "https://json-schema.org/draft/2020-12/schema",
170
+ $id: "https://rpp402.com/schemas/v1/quote.json",
171
+ title: "RPP402 Quote",
172
+ type: "object",
173
+ required: ["rpp402_version", "id", "service_id", "capability", "price", "expires_at", "created_at"],
174
+ properties: {
175
+ rpp402_version: { type: "string", const: "1.0" },
176
+ id: { type: "string", pattern: "^quote_[a-zA-Z0-9]{8,}$" },
177
+ service_id: { type: "string", pattern: "^svc_[a-zA-Z0-9]{8,}$" },
178
+ capability: { type: "string", pattern: "^[a-z0-9-]+\\.[a-z0-9-]+$" },
179
+ price: {
180
+ type: "object",
181
+ required: ["asset", "amount"],
182
+ properties: {
183
+ asset: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" },
184
+ amount: { type: "string", pattern: "^[0-9]+(\\.[0-9]+)?$" }
185
+ }
186
+ },
187
+ expires_at: { type: "string", format: "date-time" },
188
+ created_at: { type: "string", format: "date-time" }
189
+ }
190
+ };
191
+
192
+ // src/schemas/receipt.schema.json
193
+ var receipt_schema_default = {
194
+ $schema: "https://json-schema.org/draft/2020-12/schema",
195
+ $id: "https://rpp402.com/schemas/v1/receipt.json",
196
+ title: "RPP402 Receipt",
197
+ type: "object",
198
+ required: ["rpp402_version", "id", "session_id", "settlement_id", "payer_wallet", "line_items", "total", "settlement_ref", "signature", "issued_at"],
199
+ properties: {
200
+ rpp402_version: { type: "string", const: "1.0" },
201
+ id: { type: "string", pattern: "^rcpt_[a-zA-Z0-9]{8,}$" },
202
+ session_id: { type: "string", pattern: "^sess_[a-zA-Z0-9]{8,}$" },
203
+ settlement_id: { type: "string", pattern: "^settle_[a-zA-Z0-9]{8,}$" },
204
+ payer_wallet: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
205
+ line_items: {
206
+ type: "array",
207
+ minItems: 1,
208
+ items: {
209
+ type: "object",
210
+ required: ["service_id", "capability", "quote_id", "amount"],
211
+ properties: {
212
+ service_id: { type: "string" },
213
+ capability: { type: "string" },
214
+ quote_id: { type: "string" },
215
+ amount: {
216
+ type: "object",
217
+ required: ["asset", "amount"],
218
+ properties: {
219
+ asset: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" },
220
+ amount: { type: "string" }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ },
226
+ total: {
227
+ type: "object",
228
+ required: ["asset", "amount"],
229
+ properties: {
230
+ asset: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" },
231
+ amount: { type: "string" }
232
+ }
233
+ },
234
+ settlement_ref: {
235
+ type: "object",
236
+ required: ["chain_id", "tx_hash", "block_number"],
237
+ properties: {
238
+ chain_id: { type: "string" },
239
+ tx_hash: { type: "string", pattern: "^0x[a-fA-F0-9]{64}$" },
240
+ block_number: { type: "integer" }
241
+ }
242
+ },
243
+ signature: {
244
+ type: "object",
245
+ required: ["algorithm", "signer", "signature"],
246
+ properties: {
247
+ algorithm: { const: "eip712" },
248
+ signer: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
249
+ signature: { type: "string", pattern: "^0x[a-fA-F0-9]+$" }
250
+ }
251
+ },
252
+ issued_at: { type: "string", format: "date-time" }
253
+ }
254
+ };
255
+
256
+ // src/schemas/settlement.schema.json
257
+ var settlement_schema_default = {
258
+ $schema: "https://json-schema.org/draft/2020-12/schema",
259
+ $id: "https://rpp402.com/schemas/v1/settlement.json",
260
+ title: "RPP402 Settlement",
261
+ type: "object",
262
+ required: ["rpp402_version", "id", "intent_id", "session_id", "chain_id", "status", "transfers", "created_at"],
263
+ properties: {
264
+ rpp402_version: { type: "string", const: "1.0" },
265
+ id: { type: "string", pattern: "^settle_[a-zA-Z0-9]{8,}$" },
266
+ intent_id: { type: "string", pattern: "^intent_[a-zA-Z0-9]{8,}$" },
267
+ session_id: { type: "string", pattern: "^sess_[a-zA-Z0-9]{8,}$" },
268
+ chain_id: { type: "string" },
269
+ tx_hash: { type: ["string", "null"], pattern: "^0x[a-fA-F0-9]{64}$" },
270
+ block_number: { type: ["integer", "null"] },
271
+ status: { type: "string", enum: ["pending", "submitted", "confirmed", "failed"] },
272
+ transfers: {
273
+ type: "array",
274
+ minItems: 1,
275
+ items: {
276
+ type: "object",
277
+ required: ["from", "to", "asset", "amount"],
278
+ properties: {
279
+ from: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
280
+ to: { type: "string", pattern: "^0x[a-fA-F0-9]{40}$" },
281
+ asset: { $ref: "https://rpp402.com/schemas/v1/asset-ref.json" },
282
+ amount: { type: "string", pattern: "^[0-9]+(\\.[0-9]+)?$" }
283
+ }
284
+ }
285
+ },
286
+ reference_price: {
287
+ type: ["object", "null"],
288
+ properties: {
289
+ oracle: { type: "string" },
290
+ symbol: { type: "string" },
291
+ price_usd: { type: "string" },
292
+ sourced_at: { type: "string", format: "date-time" }
293
+ }
294
+ },
295
+ created_at: { type: "string", format: "date-time" },
296
+ confirmed_at: { type: ["string", "null"], format: "date-time" }
297
+ }
298
+ };
299
+
300
+ // src/index.ts
301
+ var schemas = {
302
+ assetRef: asset_ref_schema_default,
303
+ discovery: discovery_schema_default,
304
+ quote: quote_schema_default,
305
+ commerceSession: commerce_session_schema_default,
306
+ paymentIntent: payment_intent_schema_default,
307
+ settlement: settlement_schema_default,
308
+ receipt: receipt_schema_default
309
+ };
310
+ var RPP_VERSION = "1.0";
311
+
312
+ exports.RPP_VERSION = RPP_VERSION;
313
+ exports.schemas = schemas;
314
+ //# sourceMappingURL=index.cjs.map
315
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/asset-ref.schema.json","../src/schemas/commerce-session.schema.json","../src/schemas/discovery.schema.json","../src/schemas/payment-intent.schema.json","../src/schemas/quote.schema.json","../src/schemas/receipt.schema.json","../src/schemas/settlement.schema.json","../src/index.ts"],"names":[],"mappings":";;;AAAA,IAAA,wBAAA,GAAA;AAAA,EACE,OAAA,EAAW,8CAAA;AAAA,EACX,GAAA,EAAO,8CAAA;AAAA,EACP,KAAA,EAAS,wBAAA;AAAA,EACT,IAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAY,CAAC,MAAA,EAAQ,QAAA,EAAU,YAAY,UAAU,CAAA;AAAA,EACrD,UAAA,EAAc;AAAA,IACZ,IAAA,EAAQ,EAAE,IAAA,EAAQ,QAAA,EAAU,MAAQ,CAAC,YAAA,EAAc,oBAAoB,CAAA,EAAE;AAAA,IACzE,MAAA,EAAU,EAAE,IAAA,EAAQ,QAAA,EAAS;AAAA,IAC7B,QAAA,EAAY,EAAE,IAAA,EAAQ,QAAA,EAAS;AAAA,IAC/B,QAAA,EAAY,EAAE,IAAA,EAAQ,QAAA,EAAU,SAAW,qBAAA,EAAsB;AAAA,IACjE,MAAA,EAAU,EAAE,IAAA,EAAQ,QAA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ClE,MAAA,EAAU,EAAE,IAAA,EAAQ,QAAA,EAAU,SAAW,sBAAA;AAAuB;AAClE;AACF,KACF;AAAA,IACA,eAAA,EAAmB;AAAA,MACjB,IAAA,EAAQ,CAAC,QAAA,EAAU,MAAM,CAAA;AAAA,MACzB,UAAA,EAAc;AAAA,QACZ,MAAA,EAAU,EAAE,IAAA,EAAQ,QAAA,EAAS;AAAA,QAC7B,MAAA,EAAU,EAAE,IAAA,EAAQ,QAAA,EAAS;AAAA,QAC7B,SAAA,EAAa,EAAE,IAAA,EAAQ,QAAA,EAAS;AAAA,QAChC,UAAA,EAAc,EAAE,IAAA,EAAQ,QAAA,EAAU,QAAU,WAAA;AAAY;AAC1D,KACF;AAAA,IACA,UAAA,EAAc,EAAE,IAAA,EAAQ,QAAA,EAAU,QAAU,WAAA,EAAY;AAAA,IACxD,YAAA,EAAgB,EAAE,IAAA,EAAQ,CAAC,UAAU,MAAM,CAAA,EAAG,QAAU,WAAA;AAAY;AAExE,CAAA;;;AC1BO,IAAM,OAAA,GAAU;AAAA,EACrB,QAAA,EAAU,wBAAA;AAAA,EACV,SAAA,EAAW,wBAAA;AAAA,EACX,KAAA,EAAO,oBAAA;AAAA,EACP,eAAA,EAAiB,+BAAA;AAAA,EACjB,aAAA,EAAe,6BAAA;AAAA,EACf,UAAA,EAAY,yBAAA;AAAA,EACZ,OAAA,EAAS;AACX;AAEO,IAAM,WAAA,GAAc","file":"index.cjs","sourcesContent":["{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/asset-ref.json\",\n \"title\": \"RPP402 Asset Reference\",\n \"type\": \"object\",\n \"required\": [\"type\", \"symbol\", \"chain_id\", \"contract\"],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": [\"stablecoin\", \"tokenized_security\"] },\n \"symbol\": { \"type\": \"string\" },\n \"chain_id\": { \"type\": \"string\" },\n \"contract\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"issuer\": { \"type\": \"string\" }\n },\n \"if\": { \"properties\": { \"type\": { \"const\": \"tokenized_security\" } } },\n \"then\": { \"required\": [\"issuer\"] }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/commerce-session.json\",\n \"title\": \"RPP402 Commerce Session\",\n \"type\": \"object\",\n \"required\": [\"rpp402_version\", \"id\", \"agent_wallet\", \"status\", \"legs\", \"created_at\", \"expires_at\"],\n \"properties\": {\n \"rpp402_version\": { \"type\": \"string\", \"const\": \"1.0\" },\n \"id\": { \"type\": \"string\", \"pattern\": \"^sess_[a-zA-Z0-9]{8,}$\" },\n \"agent_wallet\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"created\", \"quoting\", \"intent_authorized\", \"settling\", \"settled\", \"receipt_issued\", \"expired\", \"cancelled\", \"failed\"]\n },\n \"legs\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"quote_id\", \"service_id\", \"capability\", \"price\"],\n \"properties\": {\n \"quote_id\": { \"type\": \"string\", \"pattern\": \"^quote_[a-zA-Z0-9]{8,}$\" },\n \"service_id\": { \"type\": \"string\", \"pattern\": \"^svc_[a-zA-Z0-9]{8,}$\" },\n \"capability\": { \"type\": \"string\" },\n \"price\": {\n \"type\": \"object\",\n \"required\": [\"asset\", \"amount\"],\n \"properties\": {\n \"asset\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" },\n \"amount\": { \"type\": \"string\", \"pattern\": \"^[0-9]+(\\\\.[0-9]+)?$\" }\n }\n }\n }\n }\n },\n \"intent_id\": { \"type\": [\"string\", \"null\"] },\n \"settlement_id\": { \"type\": [\"string\", \"null\"] },\n \"receipt_id\": { \"type\": [\"string\", \"null\"] },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"expires_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/discovery.json\",\n \"title\": \"RPP402 Discovery Document\",\n \"type\": \"object\",\n \"required\": [\"rpp402_version\", \"service\", \"wallet\", \"capabilities\", \"supported_assets\", \"endpoints\"],\n \"properties\": {\n \"rpp402_version\": { \"type\": \"string\", \"const\": \"1.0\" },\n \"service\": {\n \"type\": \"object\",\n \"required\": [\"id\", \"name\", \"description\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^svc_[a-zA-Z0-9]{8,}$\" },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"description\": { \"type\": \"string\", \"minLength\": 1 }\n }\n },\n \"wallet\": {\n \"type\": \"object\",\n \"required\": [\"address\", \"chain_id\"],\n \"properties\": {\n \"address\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"chain_id\": { \"type\": \"string\" }\n }\n },\n \"capabilities\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"name\", \"description\"],\n \"properties\": {\n \"name\": { \"type\": \"string\", \"pattern\": \"^[a-z0-9-]+\\\\.[a-z0-9-]+$\" },\n \"description\": { \"type\": \"string\" },\n \"pricing_summary\": { \"type\": \"string\" }\n }\n }\n },\n \"supported_assets\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" }\n },\n \"endpoints\": {\n \"type\": \"object\",\n \"required\": [\"quote\", \"session\", \"receipts\"],\n \"properties\": {\n \"quote\": { \"type\": \"string\", \"format\": \"uri\" },\n \"session\": { \"type\": \"string\", \"format\": \"uri\" },\n \"receipts\": { \"type\": \"string\", \"format\": \"uri\" }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/payment-intent.json\",\n \"title\": \"RPP402 Payment Intent\",\n \"type\": \"object\",\n \"required\": [\"rpp402_version\", \"id\", \"session_id\", \"payer_wallet\", \"asset\", \"amount\", \"status\", \"authorization\", \"created_at\", \"expires_at\"],\n \"properties\": {\n \"rpp402_version\": { \"type\": \"string\", \"const\": \"1.0\" },\n \"id\": { \"type\": \"string\", \"pattern\": \"^intent_[a-zA-Z0-9]{8,}$\" },\n \"session_id\": { \"type\": \"string\", \"pattern\": \"^sess_[a-zA-Z0-9]{8,}$\" },\n \"payer_wallet\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"asset\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" },\n \"amount_mode\": { \"type\": [\"string\", \"null\"], \"enum\": [\"fixed_quantity\", \"notional_usd\", null] },\n \"amount\": { \"type\": \"string\", \"pattern\": \"^[0-9]+(\\\\.[0-9]+)?$\" },\n \"status\": { \"type\": \"string\", \"enum\": [\"pending\", \"authorized\", \"revoked\", \"expired\"] },\n \"authorization\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"required\": [\"type\", \"signer\", \"signature\", \"nonce\"],\n \"properties\": {\n \"type\": { \"const\": \"eip712_signature\" },\n \"signer\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]+$\" },\n \"nonce\": { \"type\": \"string\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"type\", \"account_id\", \"delegation_ref\"],\n \"properties\": {\n \"type\": { \"const\": \"agentic_account_delegation\" },\n \"account_id\": { \"type\": \"string\", \"pattern\": \"^aa_[a-zA-Z0-9]{4,}$\" },\n \"delegation_ref\": { \"type\": \"string\", \"pattern\": \"^del_[a-zA-Z0-9]{4,}$\" },\n \"risk_check\": { \"type\": \"string\" }\n }\n }\n ]\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"expires_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"if\": { \"properties\": { \"asset\": { \"properties\": { \"type\": { \"const\": \"tokenized_security\" } } } } },\n \"then\": { \"required\": [\"amount_mode\"] }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/quote.json\",\n \"title\": \"RPP402 Quote\",\n \"type\": \"object\",\n \"required\": [\"rpp402_version\", \"id\", \"service_id\", \"capability\", \"price\", \"expires_at\", \"created_at\"],\n \"properties\": {\n \"rpp402_version\": { \"type\": \"string\", \"const\": \"1.0\" },\n \"id\": { \"type\": \"string\", \"pattern\": \"^quote_[a-zA-Z0-9]{8,}$\" },\n \"service_id\": { \"type\": \"string\", \"pattern\": \"^svc_[a-zA-Z0-9]{8,}$\" },\n \"capability\": { \"type\": \"string\", \"pattern\": \"^[a-z0-9-]+\\\\.[a-z0-9-]+$\" },\n \"price\": {\n \"type\": \"object\",\n \"required\": [\"asset\", \"amount\"],\n \"properties\": {\n \"asset\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" },\n \"amount\": { \"type\": \"string\", \"pattern\": \"^[0-9]+(\\\\.[0-9]+)?$\" }\n }\n },\n \"expires_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/receipt.json\",\n \"title\": \"RPP402 Receipt\",\n \"type\": \"object\",\n \"required\": [\"rpp402_version\", \"id\", \"session_id\", \"settlement_id\", \"payer_wallet\", \"line_items\", \"total\", \"settlement_ref\", \"signature\", \"issued_at\"],\n \"properties\": {\n \"rpp402_version\": { \"type\": \"string\", \"const\": \"1.0\" },\n \"id\": { \"type\": \"string\", \"pattern\": \"^rcpt_[a-zA-Z0-9]{8,}$\" },\n \"session_id\": { \"type\": \"string\", \"pattern\": \"^sess_[a-zA-Z0-9]{8,}$\" },\n \"settlement_id\": { \"type\": \"string\", \"pattern\": \"^settle_[a-zA-Z0-9]{8,}$\" },\n \"payer_wallet\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"line_items\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"service_id\", \"capability\", \"quote_id\", \"amount\"],\n \"properties\": {\n \"service_id\": { \"type\": \"string\" },\n \"capability\": { \"type\": \"string\" },\n \"quote_id\": { \"type\": \"string\" },\n \"amount\": {\n \"type\": \"object\",\n \"required\": [\"asset\", \"amount\"],\n \"properties\": {\n \"asset\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" },\n \"amount\": { \"type\": \"string\" }\n }\n }\n }\n }\n },\n \"total\": {\n \"type\": \"object\",\n \"required\": [\"asset\", \"amount\"],\n \"properties\": {\n \"asset\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" },\n \"amount\": { \"type\": \"string\" }\n }\n },\n \"settlement_ref\": {\n \"type\": \"object\",\n \"required\": [\"chain_id\", \"tx_hash\", \"block_number\"],\n \"properties\": {\n \"chain_id\": { \"type\": \"string\" },\n \"tx_hash\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{64}$\" },\n \"block_number\": { \"type\": \"integer\" }\n }\n },\n \"signature\": {\n \"type\": \"object\",\n \"required\": [\"algorithm\", \"signer\", \"signature\"],\n \"properties\": {\n \"algorithm\": { \"const\": \"eip712\" },\n \"signer\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]+$\" }\n }\n },\n \"issued_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://rpp402.com/schemas/v1/settlement.json\",\n \"title\": \"RPP402 Settlement\",\n \"type\": \"object\",\n \"required\": [\"rpp402_version\", \"id\", \"intent_id\", \"session_id\", \"chain_id\", \"status\", \"transfers\", \"created_at\"],\n \"properties\": {\n \"rpp402_version\": { \"type\": \"string\", \"const\": \"1.0\" },\n \"id\": { \"type\": \"string\", \"pattern\": \"^settle_[a-zA-Z0-9]{8,}$\" },\n \"intent_id\": { \"type\": \"string\", \"pattern\": \"^intent_[a-zA-Z0-9]{8,}$\" },\n \"session_id\": { \"type\": \"string\", \"pattern\": \"^sess_[a-zA-Z0-9]{8,}$\" },\n \"chain_id\": { \"type\": \"string\" },\n \"tx_hash\": { \"type\": [\"string\", \"null\"], \"pattern\": \"^0x[a-fA-F0-9]{64}$\" },\n \"block_number\": { \"type\": [\"integer\", \"null\"] },\n \"status\": { \"type\": \"string\", \"enum\": [\"pending\", \"submitted\", \"confirmed\", \"failed\"] },\n \"transfers\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"from\", \"to\", \"asset\", \"amount\"],\n \"properties\": {\n \"from\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"to\": { \"type\": \"string\", \"pattern\": \"^0x[a-fA-F0-9]{40}$\" },\n \"asset\": { \"$ref\": \"https://rpp402.com/schemas/v1/asset-ref.json\" },\n \"amount\": { \"type\": \"string\", \"pattern\": \"^[0-9]+(\\\\.[0-9]+)?$\" }\n }\n }\n },\n \"reference_price\": {\n \"type\": [\"object\", \"null\"],\n \"properties\": {\n \"oracle\": { \"type\": \"string\" },\n \"symbol\": { \"type\": \"string\" },\n \"price_usd\": { \"type\": \"string\" },\n \"sourced_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"confirmed_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","// Source of truth for the six RPP402 v1 primitives -see docs/specs/RPP402-000\n// through RPP402-006. Types are hand-maintained against the JSON Schemas\n// below; @rpp402/sdk (Phase 5) and @rpp402/cli (Phase 10) both build on this\n// package rather than restating the wire format themselves.\n\nimport assetRefSchema from \"./schemas/asset-ref.schema.json\" with { type: \"json\" };\nimport commerceSessionSchema from \"./schemas/commerce-session.schema.json\" with { type: \"json\" };\nimport discoverySchema from \"./schemas/discovery.schema.json\" with { type: \"json\" };\nimport paymentIntentSchema from \"./schemas/payment-intent.schema.json\" with { type: \"json\" };\nimport quoteSchema from \"./schemas/quote.schema.json\" with { type: \"json\" };\nimport receiptSchema from \"./schemas/receipt.schema.json\" with { type: \"json\" };\nimport settlementSchema from \"./schemas/settlement.schema.json\" with { type: \"json\" };\n\nexport * from \"./types\";\n\nexport const schemas = {\n assetRef: assetRefSchema,\n discovery: discoverySchema,\n quote: quoteSchema,\n commerceSession: commerceSessionSchema,\n paymentIntent: paymentIntentSchema,\n settlement: settlementSchema,\n receipt: receiptSchema,\n} as const;\n\nexport const RPP_VERSION = \"1.0\" as const;\n"]}