@peac/kernel 0.12.0-preview.1 → 0.12.0-preview.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/error-categories.generated.d.ts +1 -1
- package/dist/errors.cjs +50 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.generated.d.ts +6 -1
- package/dist/errors.generated.d.ts.map +1 -1
- package/dist/errors.mjs +50 -0
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +50 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +50 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -310,6 +310,10 @@ var ERROR_CODES = {
|
|
|
310
310
|
E_UCP_VERIFICATION_FAILED: "E_UCP_VERIFICATION_FAILED",
|
|
311
311
|
// Validation error codes
|
|
312
312
|
E_CONSTRAINT_VIOLATION: "E_CONSTRAINT_VIOLATION",
|
|
313
|
+
E_EAT_INVALID_CBOR: "E_EAT_INVALID_CBOR",
|
|
314
|
+
E_EAT_INVALID_COSE: "E_EAT_INVALID_COSE",
|
|
315
|
+
E_EAT_SIZE_EXCEEDED: "E_EAT_SIZE_EXCEEDED",
|
|
316
|
+
E_EAT_UNSUPPORTED_ALG: "E_EAT_UNSUPPORTED_ALG",
|
|
313
317
|
E_EVIDENCE_NOT_JSON: "E_EVIDENCE_NOT_JSON",
|
|
314
318
|
E_EXPIRED: "E_EXPIRED",
|
|
315
319
|
E_INVALID_AMOUNT: "E_INVALID_AMOUNT",
|
|
@@ -337,6 +341,7 @@ var ERROR_CODES = {
|
|
|
337
341
|
E_UNSUPPORTED_WIRE_VERSION: "E_UNSUPPORTED_WIRE_VERSION",
|
|
338
342
|
E_WIRE_VERSION_MISMATCH: "E_WIRE_VERSION_MISMATCH",
|
|
339
343
|
// Verification error codes
|
|
344
|
+
E_EAT_SIGNATURE_FAILED: "E_EAT_SIGNATURE_FAILED",
|
|
340
345
|
E_INVALID_SIGNATURE: "E_INVALID_SIGNATURE",
|
|
341
346
|
E_KEY_NOT_FOUND: "E_KEY_NOT_FOUND",
|
|
342
347
|
E_KID_REUSE_DETECTED: "E_KID_REUSE_DETECTED",
|
|
@@ -1313,6 +1318,42 @@ var ERRORS = {
|
|
|
1313
1318
|
next_action: "retry_with_different_input",
|
|
1314
1319
|
category: "validation"
|
|
1315
1320
|
},
|
|
1321
|
+
E_EAT_INVALID_CBOR: {
|
|
1322
|
+
code: "E_EAT_INVALID_CBOR",
|
|
1323
|
+
http_status: 400,
|
|
1324
|
+
title: "EAT Invalid CBOR",
|
|
1325
|
+
description: "EAT token is not valid CBOR or the payload is not a CBOR map",
|
|
1326
|
+
retryable: false,
|
|
1327
|
+
next_action: "abort",
|
|
1328
|
+
category: "validation"
|
|
1329
|
+
},
|
|
1330
|
+
E_EAT_INVALID_COSE: {
|
|
1331
|
+
code: "E_EAT_INVALID_COSE",
|
|
1332
|
+
http_status: 400,
|
|
1333
|
+
title: "EAT Invalid COSE",
|
|
1334
|
+
description: "EAT token is not a valid COSE_Sign1 structure per RFC 9052 Section 4.2",
|
|
1335
|
+
retryable: false,
|
|
1336
|
+
next_action: "abort",
|
|
1337
|
+
category: "validation"
|
|
1338
|
+
},
|
|
1339
|
+
E_EAT_SIZE_EXCEEDED: {
|
|
1340
|
+
code: "E_EAT_SIZE_EXCEEDED",
|
|
1341
|
+
http_status: 400,
|
|
1342
|
+
title: "EAT Size Exceeded",
|
|
1343
|
+
description: "EAT token exceeds the 64 KB size limit enforced before CBOR decode",
|
|
1344
|
+
retryable: false,
|
|
1345
|
+
next_action: "abort",
|
|
1346
|
+
category: "validation"
|
|
1347
|
+
},
|
|
1348
|
+
E_EAT_UNSUPPORTED_ALG: {
|
|
1349
|
+
code: "E_EAT_UNSUPPORTED_ALG",
|
|
1350
|
+
http_status: 400,
|
|
1351
|
+
title: "EAT Unsupported Algorithm",
|
|
1352
|
+
description: "COSE_Sign1 uses an unsupported algorithm; only EdDSA (alg: -8) is supported",
|
|
1353
|
+
retryable: false,
|
|
1354
|
+
next_action: "abort",
|
|
1355
|
+
category: "validation"
|
|
1356
|
+
},
|
|
1316
1357
|
E_EVIDENCE_NOT_JSON: {
|
|
1317
1358
|
code: "E_EVIDENCE_NOT_JSON",
|
|
1318
1359
|
http_status: 400,
|
|
@@ -1548,6 +1589,15 @@ var ERRORS = {
|
|
|
1548
1589
|
category: "validation"
|
|
1549
1590
|
},
|
|
1550
1591
|
// Verification error codes
|
|
1592
|
+
E_EAT_SIGNATURE_FAILED: {
|
|
1593
|
+
code: "E_EAT_SIGNATURE_FAILED",
|
|
1594
|
+
http_status: 400,
|
|
1595
|
+
title: "EAT Signature Failed",
|
|
1596
|
+
description: "COSE_Sign1 Ed25519 signature verification failed over the Sig_structure",
|
|
1597
|
+
retryable: false,
|
|
1598
|
+
next_action: "retry_with_different_key",
|
|
1599
|
+
category: "verification"
|
|
1600
|
+
},
|
|
1551
1601
|
E_INVALID_SIGNATURE: {
|
|
1552
1602
|
code: "E_INVALID_SIGNATURE",
|
|
1553
1603
|
http_status: 400,
|