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