@peac/kernel 0.12.0 → 0.12.2
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/dist/carrier.d.ts +9 -9
- package/dist/constants.cjs +10 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.ts +34 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.mjs +10 -2
- package/dist/constants.mjs.map +1 -1
- package/dist/error-categories.generated.d.ts +1 -1
- package/dist/errors.cjs +40 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.generated.d.ts +5 -1
- package/dist/errors.generated.d.ts.map +1 -1
- package/dist/errors.mjs +40 -0
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +353 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +345 -26
- package/dist/index.mjs.map +1 -1
- package/dist/registries.cjs +303 -24
- package/dist/registries.cjs.map +1 -1
- package/dist/registries.d.ts +9 -49
- package/dist/registries.d.ts.map +1 -1
- package/dist/registries.generated.cjs +418 -0
- package/dist/registries.generated.cjs.map +1 -0
- package/dist/registries.generated.d.ts +78 -0
- package/dist/registries.generated.d.ts.map +1 -0
- package/dist/registries.generated.mjs +400 -0
- package/dist/registries.generated.mjs.map +1 -0
- package/dist/registries.mjs +296 -25
- package/dist/registries.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/wire-02-types.d.ts +6 -6
- package/dist/wire-02-types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -58,7 +58,7 @@ var DISCOVERY = {
|
|
|
58
58
|
};
|
|
59
59
|
var JWKS = {
|
|
60
60
|
rotationDays: 90,
|
|
61
|
-
/** Normative minimum overlap period (
|
|
61
|
+
/** Normative minimum overlap period (v0.11.3+) */
|
|
62
62
|
overlapDays: 30,
|
|
63
63
|
emergencyRevocationHours: 24
|
|
64
64
|
};
|
|
@@ -179,6 +179,14 @@ var POLICY_BLOCK = {
|
|
|
179
179
|
};
|
|
180
180
|
var OCCURRED_AT_TOLERANCE_SECONDS = 300;
|
|
181
181
|
var PEAC_ALG = ALGORITHMS.default;
|
|
182
|
+
var EXTENSION_BUDGET = {
|
|
183
|
+
/** Max UTF-8 bytes per extension group after JSON.stringify (64 KB) */
|
|
184
|
+
maxGroupBytes: 65536,
|
|
185
|
+
/** Max total UTF-8 bytes across all extensions after JSON.stringify (256 KB) */
|
|
186
|
+
maxTotalBytes: 262144,
|
|
187
|
+
/** Max UTF-8 bytes for any single string array field (32 KB) */
|
|
188
|
+
maxArrayPayloadBytes: 32768
|
|
189
|
+
};
|
|
182
190
|
var CONSTANTS = {
|
|
183
191
|
WIRE_TYPE,
|
|
184
192
|
WIRE_VERSION,
|
|
@@ -318,6 +326,8 @@ var ERROR_CODES = {
|
|
|
318
326
|
E_EAT_UNSUPPORTED_ALG: "E_EAT_UNSUPPORTED_ALG",
|
|
319
327
|
E_EVIDENCE_NOT_JSON: "E_EVIDENCE_NOT_JSON",
|
|
320
328
|
E_EXPIRED: "E_EXPIRED",
|
|
329
|
+
E_EXTENSION_NON_JSON_VALUE: "E_EXTENSION_NON_JSON_VALUE",
|
|
330
|
+
E_EXTENSION_SIZE_EXCEEDED: "E_EXTENSION_SIZE_EXCEEDED",
|
|
321
331
|
E_INVALID_AMOUNT: "E_INVALID_AMOUNT",
|
|
322
332
|
E_INVALID_AUDIENCE: "E_INVALID_AUDIENCE",
|
|
323
333
|
E_INVALID_CURRENCY: "E_INVALID_CURRENCY",
|
|
@@ -344,6 +354,8 @@ var ERROR_CODES = {
|
|
|
344
354
|
E_WIRE_VERSION_MISMATCH: "E_WIRE_VERSION_MISMATCH",
|
|
345
355
|
// Verification error codes
|
|
346
356
|
E_EAT_SIGNATURE_FAILED: "E_EAT_SIGNATURE_FAILED",
|
|
357
|
+
E_EXTENSION_GROUP_MISMATCH: "E_EXTENSION_GROUP_MISMATCH",
|
|
358
|
+
E_EXTENSION_GROUP_REQUIRED: "E_EXTENSION_GROUP_REQUIRED",
|
|
347
359
|
E_INVALID_SIGNATURE: "E_INVALID_SIGNATURE",
|
|
348
360
|
E_KEY_NOT_FOUND: "E_KEY_NOT_FOUND",
|
|
349
361
|
E_KID_REUSE_DETECTED: "E_KID_REUSE_DETECTED",
|
|
@@ -1374,6 +1386,24 @@ var ERRORS = {
|
|
|
1374
1386
|
next_action: "retry_with_different_input",
|
|
1375
1387
|
category: "validation"
|
|
1376
1388
|
},
|
|
1389
|
+
E_EXTENSION_NON_JSON_VALUE: {
|
|
1390
|
+
code: "E_EXTENSION_NON_JSON_VALUE",
|
|
1391
|
+
http_status: 400,
|
|
1392
|
+
title: "Extension Non-JSON Value",
|
|
1393
|
+
description: "Extension group value is not a plain JSON value; functions, Symbols, BigInt, Date, RegExp, Map, Set, objects with toJSON(), and other non-JSON types are rejected",
|
|
1394
|
+
retryable: false,
|
|
1395
|
+
next_action: "retry_with_different_input",
|
|
1396
|
+
category: "validation"
|
|
1397
|
+
},
|
|
1398
|
+
E_EXTENSION_SIZE_EXCEEDED: {
|
|
1399
|
+
code: "E_EXTENSION_SIZE_EXCEEDED",
|
|
1400
|
+
http_status: 400,
|
|
1401
|
+
title: "Extension Size Exceeded",
|
|
1402
|
+
description: "Extension group or total extensions record exceeds the normative byte-budget limit (EXTENSION_BUDGET)",
|
|
1403
|
+
retryable: false,
|
|
1404
|
+
next_action: "retry_with_different_input",
|
|
1405
|
+
category: "validation"
|
|
1406
|
+
},
|
|
1377
1407
|
E_INVALID_AMOUNT: {
|
|
1378
1408
|
code: "E_INVALID_AMOUNT",
|
|
1379
1409
|
http_status: 400,
|
|
@@ -1600,6 +1630,24 @@ var ERRORS = {
|
|
|
1600
1630
|
next_action: "retry_with_different_key",
|
|
1601
1631
|
category: "verification"
|
|
1602
1632
|
},
|
|
1633
|
+
E_EXTENSION_GROUP_MISMATCH: {
|
|
1634
|
+
code: "E_EXTENSION_GROUP_MISMATCH",
|
|
1635
|
+
http_status: 400,
|
|
1636
|
+
title: "Extension Group Mismatch",
|
|
1637
|
+
description: "Registered receipt type has a mapped extension group, but a different registered first-party extension group is present while the expected one is absent",
|
|
1638
|
+
retryable: false,
|
|
1639
|
+
next_action: "retry_with_different_input",
|
|
1640
|
+
category: "verification"
|
|
1641
|
+
},
|
|
1642
|
+
E_EXTENSION_GROUP_REQUIRED: {
|
|
1643
|
+
code: "E_EXTENSION_GROUP_REQUIRED",
|
|
1644
|
+
http_status: 400,
|
|
1645
|
+
title: "Extension Group Required",
|
|
1646
|
+
description: "Registered receipt type has a mapped extension group, but that group is absent from the extensions record",
|
|
1647
|
+
retryable: false,
|
|
1648
|
+
next_action: "retry_with_different_input",
|
|
1649
|
+
category: "verification"
|
|
1650
|
+
},
|
|
1603
1651
|
E_INVALID_SIGNATURE: {
|
|
1604
1652
|
code: "E_INVALID_SIGNATURE",
|
|
1605
1653
|
http_status: 400,
|
|
@@ -1958,13 +2006,13 @@ var DISPUTE_ERRORS = {
|
|
|
1958
2006
|
TARGET_NOT_FOUND: "E_DISPUTE_TARGET_NOT_FOUND"
|
|
1959
2007
|
};
|
|
1960
2008
|
|
|
1961
|
-
// src/registries.ts
|
|
2009
|
+
// src/registries.generated.ts
|
|
1962
2010
|
var PAYMENT_RAILS = [
|
|
1963
2011
|
{
|
|
1964
|
-
id: "
|
|
1965
|
-
category: "
|
|
1966
|
-
description: "
|
|
1967
|
-
reference:
|
|
2012
|
+
id: "card-network",
|
|
2013
|
+
category: "card",
|
|
2014
|
+
description: "Generic card network authorizations/clearing",
|
|
2015
|
+
reference: null,
|
|
1968
2016
|
status: "informational"
|
|
1969
2017
|
},
|
|
1970
2018
|
{
|
|
@@ -1975,10 +2023,17 @@ var PAYMENT_RAILS = [
|
|
|
1975
2023
|
status: "informational"
|
|
1976
2024
|
},
|
|
1977
2025
|
{
|
|
1978
|
-
id: "
|
|
1979
|
-
category: "
|
|
1980
|
-
description: "
|
|
1981
|
-
reference:
|
|
2026
|
+
id: "razorpay",
|
|
2027
|
+
category: "payment-gateway",
|
|
2028
|
+
description: "Razorpay payment gateway (UPI, cards, netbanking, wallets)",
|
|
2029
|
+
reference: "https://razorpay.com/docs/",
|
|
2030
|
+
status: "informational"
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
id: "stripe",
|
|
2034
|
+
category: "payment-gateway",
|
|
2035
|
+
description: "Stripe payment processing",
|
|
2036
|
+
reference: "https://stripe.com/docs",
|
|
1982
2037
|
status: "informational"
|
|
1983
2038
|
},
|
|
1984
2039
|
{
|
|
@@ -1987,13 +2042,20 @@ var PAYMENT_RAILS = [
|
|
|
1987
2042
|
description: "Unified Payments Interface",
|
|
1988
2043
|
reference: "https://www.npci.org.in/",
|
|
1989
2044
|
status: "informational"
|
|
2045
|
+
},
|
|
2046
|
+
{
|
|
2047
|
+
id: "x402",
|
|
2048
|
+
category: "agentic-payment",
|
|
2049
|
+
description: "HTTP 402-based paid call receipts",
|
|
2050
|
+
reference: "https://www.x402.org/",
|
|
2051
|
+
status: "informational"
|
|
1990
2052
|
}
|
|
1991
2053
|
];
|
|
1992
2054
|
var CONTROL_ENGINES = [
|
|
1993
2055
|
{
|
|
1994
|
-
id: "
|
|
1995
|
-
category: "
|
|
1996
|
-
description: "Generic
|
|
2056
|
+
id: "mandate-service",
|
|
2057
|
+
category: "mandate",
|
|
2058
|
+
description: "Generic enterprise mandate/approval chain evaluator",
|
|
1997
2059
|
reference: null,
|
|
1998
2060
|
status: "informational"
|
|
1999
2061
|
},
|
|
@@ -2005,11 +2067,25 @@ var CONTROL_ENGINES = [
|
|
|
2005
2067
|
status: "informational"
|
|
2006
2068
|
},
|
|
2007
2069
|
{
|
|
2008
|
-
id: "
|
|
2009
|
-
category: "
|
|
2010
|
-
description: "
|
|
2070
|
+
id: "rsl",
|
|
2071
|
+
category: "access-policy",
|
|
2072
|
+
description: "Robots Specification Layer usage token evaluation",
|
|
2011
2073
|
reference: null,
|
|
2012
2074
|
status: "informational"
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
id: "spend-control-service",
|
|
2078
|
+
category: "limits",
|
|
2079
|
+
description: "Generic spend control decisions (per-tx, daily, monthly limits)",
|
|
2080
|
+
reference: null,
|
|
2081
|
+
status: "informational"
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
id: "tap",
|
|
2085
|
+
category: "agent-verification",
|
|
2086
|
+
description: "Trusted Agent Protocol control decisions (HTTP signature verification)",
|
|
2087
|
+
reference: "https://developer.visa.com/",
|
|
2088
|
+
status: "informational"
|
|
2013
2089
|
}
|
|
2014
2090
|
];
|
|
2015
2091
|
var TRANSPORT_METHODS = [
|
|
@@ -2037,10 +2113,10 @@ var TRANSPORT_METHODS = [
|
|
|
2037
2113
|
];
|
|
2038
2114
|
var AGENT_PROTOCOLS = [
|
|
2039
2115
|
{
|
|
2040
|
-
id: "
|
|
2041
|
-
category: "
|
|
2042
|
-
description: "
|
|
2043
|
-
reference: "https://
|
|
2116
|
+
id: "a2a",
|
|
2117
|
+
category: "agent-protocol",
|
|
2118
|
+
description: "Agent-to-Agent Protocol (A2A, Linux Foundation)",
|
|
2119
|
+
reference: "https://a2a-protocol.org/",
|
|
2044
2120
|
status: "informational"
|
|
2045
2121
|
},
|
|
2046
2122
|
{
|
|
@@ -2057,31 +2133,274 @@ var AGENT_PROTOCOLS = [
|
|
|
2057
2133
|
reference: null,
|
|
2058
2134
|
status: "informational"
|
|
2059
2135
|
},
|
|
2136
|
+
{
|
|
2137
|
+
id: "mcp",
|
|
2138
|
+
category: "tool-protocol",
|
|
2139
|
+
description: "Model Context Protocol (MCP)",
|
|
2140
|
+
reference: "https://modelcontextprotocol.io/",
|
|
2141
|
+
status: "informational"
|
|
2142
|
+
},
|
|
2060
2143
|
{
|
|
2061
2144
|
id: "tap",
|
|
2062
2145
|
category: "card-protocol",
|
|
2063
2146
|
description: "Trusted Agent Protocol (Visa TAP)",
|
|
2064
2147
|
reference: "https://developer.visa.com/",
|
|
2065
2148
|
status: "informational"
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
id: "ucp",
|
|
2152
|
+
category: "commerce-protocol",
|
|
2153
|
+
description: "Universal Commerce Protocol (UCP)",
|
|
2154
|
+
reference: null,
|
|
2155
|
+
status: "informational"
|
|
2066
2156
|
}
|
|
2067
2157
|
];
|
|
2158
|
+
var PROOF_TYPES = [
|
|
2159
|
+
{
|
|
2160
|
+
id: "custom",
|
|
2161
|
+
category: "vendor-defined",
|
|
2162
|
+
description: "Vendor-defined proof type; registered per-issuer in extension metadata",
|
|
2163
|
+
reference: null,
|
|
2164
|
+
status: "informational"
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
id: "did",
|
|
2168
|
+
category: "decentralized-identity",
|
|
2169
|
+
description: "W3C Decentralized Identifier (DID) resolution and verification",
|
|
2170
|
+
reference: "https://www.w3.org/TR/did-core/",
|
|
2171
|
+
status: "informational"
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
id: "eat-background-check",
|
|
2175
|
+
category: "rats",
|
|
2176
|
+
description: "Verifier fetches attestation result from registry in RATS Background-Check model (RFC 9711)",
|
|
2177
|
+
reference: "https://www.rfc-editor.org/rfc/rfc9711",
|
|
2178
|
+
status: "informational"
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
id: "eat-passport",
|
|
2182
|
+
category: "rats",
|
|
2183
|
+
description: "Agent carries Entity Attestation Token in RATS Passport model (RFC 9711)",
|
|
2184
|
+
reference: "https://www.rfc-editor.org/rfc/rfc9711",
|
|
2185
|
+
status: "informational"
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
id: "ed25519-cert-chain",
|
|
2189
|
+
category: "attestation-chain",
|
|
2190
|
+
description: "Ed25519 issuer-to-holder attestation chain (RFC 8032)",
|
|
2191
|
+
reference: "https://www.rfc-editor.org/rfc/rfc8032",
|
|
2192
|
+
status: "informational"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
id: "sigstore-oidc",
|
|
2196
|
+
category: "keyless-signing",
|
|
2197
|
+
description: "OIDC-bound keyless signing via Sigstore (Fulcio + Rekor transparency log)",
|
|
2198
|
+
reference: "https://docs.sigstore.dev/",
|
|
2199
|
+
status: "informational"
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
id: "spiffe",
|
|
2203
|
+
category: "workload-identity",
|
|
2204
|
+
description: "CNCF SPIFFE workload identity (spiffe:// URI scheme)",
|
|
2205
|
+
reference: "https://spiffe.io/docs/latest/spiffe-about/overview/",
|
|
2206
|
+
status: "informational"
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
id: "x509-pki",
|
|
2210
|
+
category: "pki",
|
|
2211
|
+
description: "Traditional X.509 PKI certificate chain verification (RFC 5280)",
|
|
2212
|
+
reference: "https://www.rfc-editor.org/rfc/rfc5280",
|
|
2213
|
+
status: "informational"
|
|
2214
|
+
}
|
|
2215
|
+
];
|
|
2216
|
+
var RECEIPT_TYPES = [
|
|
2217
|
+
{
|
|
2218
|
+
id: "org.peacprotocol/access-decision",
|
|
2219
|
+
pillar: "access",
|
|
2220
|
+
description: "Access control decision evidence (allow, deny, review)",
|
|
2221
|
+
extension_group: "org.peacprotocol/access",
|
|
2222
|
+
status: "informational"
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
id: "org.peacprotocol/attribution-event",
|
|
2226
|
+
pillar: "attribution",
|
|
2227
|
+
description: "Content or action attribution evidence",
|
|
2228
|
+
extension_group: "org.peacprotocol/attribution",
|
|
2229
|
+
status: "informational"
|
|
2230
|
+
},
|
|
2231
|
+
{
|
|
2232
|
+
id: "org.peacprotocol/compliance-check",
|
|
2233
|
+
pillar: "compliance",
|
|
2234
|
+
description: "Regulatory compliance check evidence",
|
|
2235
|
+
extension_group: "org.peacprotocol/compliance",
|
|
2236
|
+
status: "informational"
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
id: "org.peacprotocol/consent-record",
|
|
2240
|
+
pillar: "consent",
|
|
2241
|
+
description: "Consent collection or withdrawal evidence",
|
|
2242
|
+
extension_group: "org.peacprotocol/consent",
|
|
2243
|
+
status: "informational"
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
id: "org.peacprotocol/identity-attestation",
|
|
2247
|
+
pillar: "identity",
|
|
2248
|
+
description: "Identity verification or attestation evidence",
|
|
2249
|
+
extension_group: "org.peacprotocol/identity",
|
|
2250
|
+
status: "informational"
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
id: "org.peacprotocol/payment",
|
|
2254
|
+
pillar: "commerce",
|
|
2255
|
+
description: "Commerce transaction evidence (payment, authorization, settlement)",
|
|
2256
|
+
extension_group: "org.peacprotocol/commerce",
|
|
2257
|
+
status: "informational"
|
|
2258
|
+
},
|
|
2259
|
+
{
|
|
2260
|
+
id: "org.peacprotocol/privacy-signal",
|
|
2261
|
+
pillar: "privacy",
|
|
2262
|
+
description: "Privacy signal observation or enforcement evidence",
|
|
2263
|
+
extension_group: "org.peacprotocol/privacy",
|
|
2264
|
+
status: "informational"
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
id: "org.peacprotocol/provenance-record",
|
|
2268
|
+
pillar: "provenance",
|
|
2269
|
+
description: "Data or content provenance tracking evidence",
|
|
2270
|
+
extension_group: "org.peacprotocol/provenance",
|
|
2271
|
+
status: "informational"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
id: "org.peacprotocol/purpose-declaration",
|
|
2275
|
+
pillar: "purpose",
|
|
2276
|
+
description: "Purpose declaration or limitation evidence",
|
|
2277
|
+
extension_group: "org.peacprotocol/purpose",
|
|
2278
|
+
status: "informational"
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
id: "org.peacprotocol/safety-review",
|
|
2282
|
+
pillar: "safety",
|
|
2283
|
+
description: "Content or agent safety review evidence",
|
|
2284
|
+
extension_group: "org.peacprotocol/safety",
|
|
2285
|
+
status: "informational"
|
|
2286
|
+
}
|
|
2287
|
+
];
|
|
2288
|
+
var EXTENSION_GROUPS = [
|
|
2289
|
+
{
|
|
2290
|
+
id: "org.peacprotocol/access",
|
|
2291
|
+
description: "Access extension: resource, action, decision (allow/deny/review)",
|
|
2292
|
+
status: "informational"
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
id: "org.peacprotocol/attribution",
|
|
2296
|
+
description: "Attribution extension: creator_ref, license_spdx, obligation_type, attribution_text, content_signal_source, content_digest",
|
|
2297
|
+
status: "informational"
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
id: "org.peacprotocol/challenge",
|
|
2301
|
+
description: "Challenge extension: challenge_type, problem (RFC 9457), requirements",
|
|
2302
|
+
status: "informational"
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
id: "org.peacprotocol/commerce",
|
|
2306
|
+
description: "Commerce extension: payment_rail, amount_minor, currency, reference, asset, env",
|
|
2307
|
+
status: "informational"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
id: "org.peacprotocol/compliance",
|
|
2311
|
+
description: "Compliance extension: framework, compliance_status, audit_ref, auditor, audit_date, scope, validity_period, evidence_ref",
|
|
2312
|
+
status: "informational"
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
id: "org.peacprotocol/consent",
|
|
2316
|
+
description: "Consent extension: consent_basis, consent_status, data_categories, retention_period, consent_method, withdrawal_uri, scope, jurisdiction",
|
|
2317
|
+
status: "informational"
|
|
2318
|
+
},
|
|
2319
|
+
{
|
|
2320
|
+
id: "org.peacprotocol/correlation",
|
|
2321
|
+
description: "Correlation extension: trace_id, span_id, workflow_id, parent_jti, depends_on",
|
|
2322
|
+
status: "informational"
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
id: "org.peacprotocol/identity",
|
|
2326
|
+
description: "Identity extension: proof_ref",
|
|
2327
|
+
status: "informational"
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
id: "org.peacprotocol/privacy",
|
|
2331
|
+
description: "Privacy extension: data_classification, processing_basis, retention_period, retention_mode, recipient_scope, anonymization_method, data_subject_category, transfer_mechanism",
|
|
2332
|
+
status: "informational"
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
id: "org.peacprotocol/provenance",
|
|
2336
|
+
description: "Provenance extension: source_type, source_ref, source_uri, build_provenance_uri, verification_method, custody_chain, slsa",
|
|
2337
|
+
status: "informational"
|
|
2338
|
+
},
|
|
2339
|
+
{
|
|
2340
|
+
id: "org.peacprotocol/purpose",
|
|
2341
|
+
description: "Purpose extension: external_purposes, purpose_basis, purpose_limitation, data_minimization, compatible_purposes, peac_purpose_mapping",
|
|
2342
|
+
status: "informational"
|
|
2343
|
+
},
|
|
2344
|
+
{
|
|
2345
|
+
id: "org.peacprotocol/safety",
|
|
2346
|
+
description: "Safety extension: review_status, risk_level, assessment_method, safety_measures, incident_ref, model_ref, category",
|
|
2347
|
+
status: "informational"
|
|
2348
|
+
}
|
|
2349
|
+
];
|
|
2350
|
+
var TYPE_TO_EXTENSION_MAP = /* @__PURE__ */ new Map([
|
|
2351
|
+
["org.peacprotocol/access-decision", "org.peacprotocol/access"],
|
|
2352
|
+
["org.peacprotocol/attribution-event", "org.peacprotocol/attribution"],
|
|
2353
|
+
["org.peacprotocol/compliance-check", "org.peacprotocol/compliance"],
|
|
2354
|
+
["org.peacprotocol/consent-record", "org.peacprotocol/consent"],
|
|
2355
|
+
["org.peacprotocol/identity-attestation", "org.peacprotocol/identity"],
|
|
2356
|
+
["org.peacprotocol/payment", "org.peacprotocol/commerce"],
|
|
2357
|
+
["org.peacprotocol/privacy-signal", "org.peacprotocol/privacy"],
|
|
2358
|
+
["org.peacprotocol/provenance-record", "org.peacprotocol/provenance"],
|
|
2359
|
+
["org.peacprotocol/purpose-declaration", "org.peacprotocol/purpose"],
|
|
2360
|
+
["org.peacprotocol/safety-review", "org.peacprotocol/safety"]
|
|
2361
|
+
]);
|
|
2362
|
+
var PILLAR_VALUES = [
|
|
2363
|
+
"access",
|
|
2364
|
+
"attribution",
|
|
2365
|
+
"commerce",
|
|
2366
|
+
"compliance",
|
|
2367
|
+
"consent",
|
|
2368
|
+
"identity",
|
|
2369
|
+
"privacy",
|
|
2370
|
+
"provenance",
|
|
2371
|
+
"purpose",
|
|
2372
|
+
"safety"
|
|
2373
|
+
];
|
|
2068
2374
|
var REGISTRIES = {
|
|
2069
2375
|
payment_rails: PAYMENT_RAILS,
|
|
2070
2376
|
control_engines: CONTROL_ENGINES,
|
|
2071
2377
|
transport_methods: TRANSPORT_METHODS,
|
|
2072
|
-
agent_protocols: AGENT_PROTOCOLS
|
|
2378
|
+
agent_protocols: AGENT_PROTOCOLS,
|
|
2379
|
+
proof_types: PROOF_TYPES,
|
|
2380
|
+
receipt_types: RECEIPT_TYPES,
|
|
2381
|
+
extension_groups: EXTENSION_GROUPS,
|
|
2382
|
+
pillar_values: PILLAR_VALUES
|
|
2073
2383
|
};
|
|
2074
2384
|
function findPaymentRail(id) {
|
|
2075
|
-
return PAYMENT_RAILS.find((
|
|
2385
|
+
return PAYMENT_RAILS.find((entry) => entry.id === id);
|
|
2076
2386
|
}
|
|
2077
2387
|
function findControlEngine(id) {
|
|
2078
|
-
return CONTROL_ENGINES.find((
|
|
2388
|
+
return CONTROL_ENGINES.find((entry) => entry.id === id);
|
|
2079
2389
|
}
|
|
2080
2390
|
function findTransportMethod(id) {
|
|
2081
|
-
return TRANSPORT_METHODS.find((
|
|
2391
|
+
return TRANSPORT_METHODS.find((entry) => entry.id === id);
|
|
2082
2392
|
}
|
|
2083
2393
|
function findAgentProtocol(id) {
|
|
2084
|
-
return AGENT_PROTOCOLS.find((
|
|
2394
|
+
return AGENT_PROTOCOLS.find((entry) => entry.id === id);
|
|
2395
|
+
}
|
|
2396
|
+
function findProofType(id) {
|
|
2397
|
+
return PROOF_TYPES.find((entry) => entry.id === id);
|
|
2398
|
+
}
|
|
2399
|
+
function findReceiptType(id) {
|
|
2400
|
+
return RECEIPT_TYPES.find((entry) => entry.id === id);
|
|
2401
|
+
}
|
|
2402
|
+
function findExtensionGroup(id) {
|
|
2403
|
+
return EXTENSION_GROUPS.find((entry) => entry.id === id);
|
|
2085
2404
|
}
|
|
2086
2405
|
|
|
2087
2406
|
// src/http.ts
|
|
@@ -2125,6 +2444,8 @@ exports.DISPUTE_ERRORS = DISPUTE_ERRORS;
|
|
|
2125
2444
|
exports.ERRORS = ERRORS;
|
|
2126
2445
|
exports.ERROR_CATEGORIES = ERROR_CATEGORIES;
|
|
2127
2446
|
exports.ERROR_CODES = ERROR_CODES;
|
|
2447
|
+
exports.EXTENSION_BUDGET = EXTENSION_BUDGET;
|
|
2448
|
+
exports.EXTENSION_GROUPS = EXTENSION_GROUPS;
|
|
2128
2449
|
exports.HASH = HASH;
|
|
2129
2450
|
exports.HEADERS = HEADERS;
|
|
2130
2451
|
exports.ISSUER_CONFIG = ISSUER_CONFIG;
|
|
@@ -2136,13 +2457,17 @@ exports.PAYMENT_RAILS = PAYMENT_RAILS;
|
|
|
2136
2457
|
exports.PEAC_ALG = PEAC_ALG;
|
|
2137
2458
|
exports.PEAC_RECEIPT_HEADER = PEAC_RECEIPT_HEADER;
|
|
2138
2459
|
exports.PEAC_RECEIPT_URL_HEADER = PEAC_RECEIPT_URL_HEADER;
|
|
2460
|
+
exports.PILLAR_VALUES = PILLAR_VALUES;
|
|
2139
2461
|
exports.POLICY = POLICY;
|
|
2140
2462
|
exports.POLICY_BLOCK = POLICY_BLOCK;
|
|
2141
2463
|
exports.PRIVATE_IP_RANGES = PRIVATE_IP_RANGES;
|
|
2464
|
+
exports.PROOF_TYPES = PROOF_TYPES;
|
|
2142
2465
|
exports.RECEIPT = RECEIPT;
|
|
2466
|
+
exports.RECEIPT_TYPES = RECEIPT_TYPES;
|
|
2143
2467
|
exports.REGISTRIES = REGISTRIES;
|
|
2144
2468
|
exports.TRANSPORT_METHODS = TRANSPORT_METHODS;
|
|
2145
2469
|
exports.TYPE_GRAMMAR = TYPE_GRAMMAR;
|
|
2470
|
+
exports.TYPE_TO_EXTENSION_MAP = TYPE_TO_EXTENSION_MAP;
|
|
2146
2471
|
exports.VARY_HEADERS = VARY_HEADERS;
|
|
2147
2472
|
exports.VERIFICATION_MODES = VERIFICATION_MODES;
|
|
2148
2473
|
exports.VERIFICATION_REPORT_VERSION = VERIFICATION_REPORT_VERSION;
|
|
@@ -2159,7 +2484,10 @@ exports.WIRE_VERSIONS = WIRE_VERSIONS;
|
|
|
2159
2484
|
exports.applyPurposeVary = applyPurposeVary;
|
|
2160
2485
|
exports.findAgentProtocol = findAgentProtocol;
|
|
2161
2486
|
exports.findControlEngine = findControlEngine;
|
|
2487
|
+
exports.findExtensionGroup = findExtensionGroup;
|
|
2162
2488
|
exports.findPaymentRail = findPaymentRail;
|
|
2489
|
+
exports.findProofType = findProofType;
|
|
2490
|
+
exports.findReceiptType = findReceiptType;
|
|
2163
2491
|
exports.findTransportMethod = findTransportMethod;
|
|
2164
2492
|
exports.formatHash = formatHash;
|
|
2165
2493
|
exports.getError = getError;
|