@sphereon/ssi-types 0.34.1-feature.disable.test.8 → 0.34.1-feature.merge.crypto.extensions.modules.34

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
@@ -100,26 +100,26 @@ module.exports = __toCommonJS(index_exports);
100
100
  // src/logging/index.ts
101
101
  var import_debug = __toESM(require("debug"), 1);
102
102
  var import_events = require("events");
103
- var LogLevel = /* @__PURE__ */ function(LogLevel2) {
103
+ var LogLevel = /* @__PURE__ */ (function(LogLevel2) {
104
104
  LogLevel2[LogLevel2["TRACE"] = 0] = "TRACE";
105
105
  LogLevel2[LogLevel2["DEBUG"] = 1] = "DEBUG";
106
106
  LogLevel2[LogLevel2["INFO"] = 2] = "INFO";
107
107
  LogLevel2[LogLevel2["WARNING"] = 3] = "WARNING";
108
108
  LogLevel2[LogLevel2["ERROR"] = 4] = "ERROR";
109
109
  return LogLevel2;
110
- }({});
111
- var LoggingEventType = /* @__PURE__ */ function(LoggingEventType2) {
110
+ })({});
111
+ var LoggingEventType = /* @__PURE__ */ (function(LoggingEventType2) {
112
112
  LoggingEventType2["AUDIT"] = "audit";
113
113
  LoggingEventType2["ACTIVITY"] = "activity";
114
114
  LoggingEventType2["GENERAL"] = "general";
115
115
  return LoggingEventType2;
116
- }({});
117
- var LogMethod = /* @__PURE__ */ function(LogMethod2) {
116
+ })({});
117
+ var LogMethod = /* @__PURE__ */ (function(LogMethod2) {
118
118
  LogMethod2[LogMethod2["DEBUG_PKG"] = 0] = "DEBUG_PKG";
119
119
  LogMethod2[LogMethod2["CONSOLE"] = 1] = "CONSOLE";
120
120
  LogMethod2[LogMethod2["EVENT"] = 2] = "EVENT";
121
121
  return LogMethod2;
122
- }({});
122
+ })({});
123
123
  function logOptions(opts) {
124
124
  return {
125
125
  namespace: opts?.namespace ?? "sphereon",
@@ -296,7 +296,7 @@ var SimpleRecordLogger = class extends SimpleLogger {
296
296
 
297
297
  // src/events/index.ts
298
298
  var import_events2 = require("events");
299
- var System = /* @__PURE__ */ function(System2) {
299
+ var System = /* @__PURE__ */ (function(System2) {
300
300
  System2["GENERAL"] = "general";
301
301
  System2["KMS"] = "kms";
302
302
  System2["IDENTITY"] = "identity";
@@ -309,8 +309,8 @@ var System = /* @__PURE__ */ function(System2) {
309
309
  System2["PROFILE"] = "profile";
310
310
  System2["CONTACT"] = "contact";
311
311
  return System2;
312
- }({});
313
- var SubSystem = /* @__PURE__ */ function(SubSystem2) {
312
+ })({});
313
+ var SubSystem = /* @__PURE__ */ (function(SubSystem2) {
314
314
  SubSystem2["KEY"] = "key";
315
315
  SubSystem2["DID_PROVIDER"] = "did_provider";
316
316
  SubSystem2["DID_RESOLVER"] = "did_resolver";
@@ -325,16 +325,16 @@ var SubSystem = /* @__PURE__ */ function(SubSystem2) {
325
325
  SubSystem2["PROFILE"] = "profile";
326
326
  SubSystem2["API"] = "api";
327
327
  return SubSystem2;
328
- }({});
329
- var ActionType = /* @__PURE__ */ function(ActionType2) {
328
+ })({});
329
+ var ActionType = /* @__PURE__ */ (function(ActionType2) {
330
330
  ActionType2["CREATE"] = "create";
331
331
  ActionType2["READ"] = "read";
332
332
  ActionType2["UPDATE"] = "update";
333
333
  ActionType2["DELETE"] = "delete";
334
334
  ActionType2["EXECUTE"] = "execute";
335
335
  return ActionType2;
336
- }({});
337
- var DefaultActionSubType = /* @__PURE__ */ function(DefaultActionSubType2) {
336
+ })({});
337
+ var DefaultActionSubType = /* @__PURE__ */ (function(DefaultActionSubType2) {
338
338
  DefaultActionSubType2["KEY_GENERATION"] = "Key generation";
339
339
  DefaultActionSubType2["KEY_IMPORT"] = "Key import";
340
340
  DefaultActionSubType2["KEY_PERSISTENCE"] = "Key persistence";
@@ -349,14 +349,14 @@ var DefaultActionSubType = /* @__PURE__ */ function(DefaultActionSubType2) {
349
349
  DefaultActionSubType2["VC_ISSUE_DECLINE"] = "VC issue decline";
350
350
  DefaultActionSubType2["VC_SHARE_DECLINE"] = "VC share decline";
351
351
  return DefaultActionSubType2;
352
- }({});
353
- var InitiatorType = /* @__PURE__ */ function(InitiatorType2) {
352
+ })({});
353
+ var InitiatorType = /* @__PURE__ */ (function(InitiatorType2) {
354
354
  InitiatorType2["USER"] = "user";
355
355
  InitiatorType2["SYSTEM"] = "system";
356
356
  InitiatorType2["EXTERNAL"] = "external";
357
357
  return InitiatorType2;
358
- }({});
359
- var SystemCorrelationIdType = /* @__PURE__ */ function(SystemCorrelationIdType2) {
358
+ })({});
359
+ var SystemCorrelationIdType = /* @__PURE__ */ (function(SystemCorrelationIdType2) {
360
360
  SystemCorrelationIdType2["DID"] = "did";
361
361
  SystemCorrelationIdType2["URL"] = "url";
362
362
  SystemCorrelationIdType2["EMAIL"] = "email";
@@ -364,7 +364,7 @@ var SystemCorrelationIdType = /* @__PURE__ */ function(SystemCorrelationIdType2)
364
364
  SystemCorrelationIdType2["PHONE"] = "phone";
365
365
  SystemCorrelationIdType2["USER"] = "user";
366
366
  return SystemCorrelationIdType2;
367
- }({});
367
+ })({});
368
368
  var EventManager = class _EventManager {
369
369
  static {
370
370
  __name(this, "EventManager");
@@ -527,11 +527,12 @@ function isWrappedW3CVerifiablePresentation(vp) {
527
527
  return vp.format === "jwt_vp" || vp.format === "ldp_vp";
528
528
  }
529
529
  __name(isWrappedW3CVerifiablePresentation, "isWrappedW3CVerifiablePresentation");
530
- var StatusListType = /* @__PURE__ */ function(StatusListType2) {
530
+ var StatusListType = /* @__PURE__ */ (function(StatusListType2) {
531
531
  StatusListType2["StatusList2021"] = "StatusList2021";
532
532
  StatusListType2["OAuthStatusList"] = "OAuthStatusList";
533
+ StatusListType2["BitstringStatusList"] = "BitstringStatusList";
533
534
  return StatusListType2;
534
- }({});
535
+ })({});
535
536
  function isVcdmCredential(credential, vcdmType) {
536
537
  if (!credential || typeof credential !== "object") {
537
538
  return false;
@@ -568,7 +569,7 @@ var VCDM_CREDENTIAL_CONTEXT_VERSIONS = [
568
569
  ];
569
570
 
570
571
  // src/utils/did.ts
571
- var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
572
+ var IProofPurpose = /* @__PURE__ */ (function(IProofPurpose2) {
572
573
  IProofPurpose2["verificationMethod"] = "verificationMethod";
573
574
  IProofPurpose2["assertionMethod"] = "assertionMethod";
574
575
  IProofPurpose2["authentication"] = "authentication";
@@ -577,8 +578,8 @@ var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
577
578
  IProofPurpose2["capabilityInvocation"] = "capabilityInvocation";
578
579
  IProofPurpose2["capabilityDelegation"] = "capabilityDelegation";
579
580
  return IProofPurpose2;
580
- }({});
581
- var IProofType = /* @__PURE__ */ function(IProofType2) {
581
+ })({});
582
+ var IProofType = /* @__PURE__ */ (function(IProofType2) {
582
583
  IProofType2["Ed25519Signature2018"] = "Ed25519Signature2018";
583
584
  IProofType2["Ed25519Signature2020"] = "Ed25519Signature2020";
584
585
  IProofType2["EcdsaSecp256k1Signature2019"] = "EcdsaSecp256k1Signature2019";
@@ -593,7 +594,7 @@ var IProofType = /* @__PURE__ */ function(IProofType2) {
593
594
  IProofType2["SdJwtProof2024"] = "SdJwtProof2024";
594
595
  IProofType2["MdocProof2024"] = "MsoMdocProof2024";
595
596
  return IProofType2;
596
- }({});
597
+ })({});
597
598
  var parseDid = /* @__PURE__ */ __name((did) => {
598
599
  const parsedDid = parse(did);
599
600
  if (parsedDid === null) {
@@ -892,14 +893,14 @@ var jwtDateToISOString = /* @__PURE__ */ __name(({ jwtClaim, claimName, isRequir
892
893
  }, "jwtDateToISOString");
893
894
 
894
895
  // src/utils/jose.ts
895
- var JwkKeyType = /* @__PURE__ */ function(JwkKeyType2) {
896
+ var JwkKeyType = /* @__PURE__ */ (function(JwkKeyType2) {
896
897
  JwkKeyType2["EC"] = "EC";
897
898
  JwkKeyType2["RSA"] = "RSA";
898
899
  JwkKeyType2["oct"] = "oct";
899
900
  JwkKeyType2["OKP"] = "OKP";
900
901
  return JwkKeyType2;
901
- }({});
902
- var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
902
+ })({});
903
+ var JoseSignatureAlgorithm = /* @__PURE__ */ (function(JoseSignatureAlgorithm2) {
903
904
  JoseSignatureAlgorithm2["RS256"] = "RS256";
904
905
  JoseSignatureAlgorithm2["RS384"] = "RS384";
905
906
  JoseSignatureAlgorithm2["RS512"] = "RS512";
@@ -916,8 +917,8 @@ var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
916
917
  JoseSignatureAlgorithm2["PS512"] = "PS512";
917
918
  JoseSignatureAlgorithm2["none"] = "none";
918
919
  return JoseSignatureAlgorithm2;
919
- }({});
920
- var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
920
+ })({});
921
+ var JoseKeyOperation = /* @__PURE__ */ (function(JoseKeyOperation2) {
921
922
  JoseKeyOperation2["SIGN"] = "sign";
922
923
  JoseKeyOperation2["VERIFY"] = "verify";
923
924
  JoseKeyOperation2["ENCRYPT"] = "encrypt";
@@ -927,8 +928,8 @@ var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
927
928
  JoseKeyOperation2["DERIVE_KEY"] = "deriveKey";
928
929
  JoseKeyOperation2["DERIVE_BITS"] = "deriveBits";
929
930
  return JoseKeyOperation2;
930
- }({});
931
- var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
931
+ })({});
932
+ var JoseCurve = /* @__PURE__ */ (function(JoseCurve2) {
932
933
  JoseCurve2["P_256"] = "P-256";
933
934
  JoseCurve2["P_384"] = "P-384";
934
935
  JoseCurve2["P_521"] = "P-521";
@@ -939,18 +940,18 @@ var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
939
940
  JoseCurve2["Ed448"] = "Ed448";
940
941
  JoseCurve2["secp256k1"] = "secp256k1";
941
942
  return JoseCurve2;
942
- }({});
943
+ })({});
943
944
 
944
945
  // src/utils/cose.ts
945
- var ICoseKeyType = /* @__PURE__ */ function(ICoseKeyType2) {
946
+ var ICoseKeyType = /* @__PURE__ */ (function(ICoseKeyType2) {
946
947
  ICoseKeyType2[ICoseKeyType2["OKP"] = 1] = "OKP";
947
948
  ICoseKeyType2[ICoseKeyType2["EC2"] = 2] = "EC2";
948
949
  ICoseKeyType2[ICoseKeyType2["RSA"] = 3] = "RSA";
949
950
  ICoseKeyType2[ICoseKeyType2["Symmetric"] = 4] = "Symmetric";
950
951
  ICoseKeyType2[ICoseKeyType2["Reserved"] = 0] = "Reserved";
951
952
  return ICoseKeyType2;
952
- }({});
953
- var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2) {
953
+ })({});
954
+ var ICoseSignatureAlgorithm = /* @__PURE__ */ (function(ICoseSignatureAlgorithm2) {
954
955
  ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256"] = -7] = "ES256";
955
956
  ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256K"] = -47] = "ES256K";
956
957
  ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES384"] = -35] = "ES384";
@@ -964,8 +965,8 @@ var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2)
964
965
  ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS384"] = -38] = "PS384";
965
966
  ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS512"] = -39] = "PS512";
966
967
  return ICoseSignatureAlgorithm2;
967
- }({});
968
- var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
968
+ })({});
969
+ var ICoseKeyOperation = /* @__PURE__ */ (function(ICoseKeyOperation2) {
969
970
  ICoseKeyOperation2[ICoseKeyOperation2["SIGN"] = 1] = "SIGN";
970
971
  ICoseKeyOperation2[ICoseKeyOperation2["VERIFY"] = 2] = "VERIFY";
971
972
  ICoseKeyOperation2[ICoseKeyOperation2["ENCRYPT"] = 3] = "ENCRYPT";
@@ -977,8 +978,8 @@ var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
977
978
  ICoseKeyOperation2[ICoseKeyOperation2["MAC_CREATE"] = 9] = "MAC_CREATE";
978
979
  ICoseKeyOperation2[ICoseKeyOperation2["MAC_VERIFY"] = 10] = "MAC_VERIFY";
979
980
  return ICoseKeyOperation2;
980
- }({});
981
- var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
981
+ })({});
982
+ var ICoseCurve = /* @__PURE__ */ (function(ICoseCurve2) {
982
983
  ICoseCurve2[ICoseCurve2["P_256"] = 1] = "P_256";
983
984
  ICoseCurve2[ICoseCurve2["P_384"] = 2] = "P_384";
984
985
  ICoseCurve2[ICoseCurve2["P_521"] = 3] = "P_521";
@@ -988,18 +989,18 @@ var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
988
989
  ICoseCurve2[ICoseCurve2["Ed448"] = 7] = "Ed448";
989
990
  ICoseCurve2[ICoseCurve2["secp256k1"] = -1] = "secp256k1";
990
991
  return ICoseCurve2;
991
- }({});
992
+ })({});
992
993
 
993
994
  // src/mapper/credential-constraints.ts
994
- var StatusListCredentialIdMode = /* @__PURE__ */ function(StatusListCredentialIdMode2) {
995
+ var StatusListCredentialIdMode = /* @__PURE__ */ (function(StatusListCredentialIdMode2) {
995
996
  StatusListCredentialIdMode2["ISSUANCE"] = "ISSUANCE";
996
997
  StatusListCredentialIdMode2["NEVER"] = "NEVER";
997
998
  return StatusListCredentialIdMode2;
998
- }({});
999
- var StatusListDriverType = /* @__PURE__ */ function(StatusListDriverType2) {
999
+ })({});
1000
+ var StatusListDriverType = /* @__PURE__ */ (function(StatusListDriverType2) {
1000
1001
  StatusListDriverType2["AGENT_TYPEORM"] = "agent_typeorm";
1001
1002
  return StatusListDriverType2;
1002
- }({});
1003
+ })({});
1003
1004
 
1004
1005
  // src/mapper/credential-mapper.ts
1005
1006
  var import_jwt_decode = require("jwt-decode");
@@ -1681,7 +1682,7 @@ function isWrappedSdJwtVerifiablePresentation(vp) {
1681
1682
  return vp.format === "vc+sd-jwt";
1682
1683
  }
1683
1684
  __name(isWrappedSdJwtVerifiablePresentation, "isWrappedSdJwtVerifiablePresentation");
1684
- var OriginalType = /* @__PURE__ */ function(OriginalType2) {
1685
+ var OriginalType = /* @__PURE__ */ (function(OriginalType2) {
1685
1686
  OriginalType2["JSONLD"] = "json-ld";
1686
1687
  OriginalType2["JWT_ENCODED"] = "jwt-encoded";
1687
1688
  OriginalType2["JWT_DECODED"] = "jwt-decoded";
@@ -1690,16 +1691,16 @@ var OriginalType = /* @__PURE__ */ function(OriginalType2) {
1690
1691
  OriginalType2["MSO_MDOC_ENCODED"] = "mso_mdoc-encoded";
1691
1692
  OriginalType2["MSO_MDOC_DECODED"] = "mso_mdoc-decoded";
1692
1693
  return OriginalType2;
1693
- }({});
1694
+ })({});
1694
1695
  var JWT_PROOF_TYPE_2020 = "JwtProof2020";
1695
- var DocumentFormat = /* @__PURE__ */ function(DocumentFormat2) {
1696
+ var DocumentFormat = /* @__PURE__ */ (function(DocumentFormat2) {
1696
1697
  DocumentFormat2[DocumentFormat2["JWT"] = 0] = "JWT";
1697
1698
  DocumentFormat2[DocumentFormat2["JSONLD"] = 1] = "JSONLD";
1698
1699
  DocumentFormat2[DocumentFormat2["SD_JWT_VC"] = 2] = "SD_JWT_VC";
1699
1700
  DocumentFormat2[DocumentFormat2["EIP712"] = 3] = "EIP712";
1700
1701
  DocumentFormat2[DocumentFormat2["MSO_MDOC"] = 4] = "MSO_MDOC";
1701
1702
  return DocumentFormat2;
1702
- }({});
1703
+ })({});
1703
1704
 
1704
1705
  // src/mapper/jsonld-language-values.ts
1705
1706
  var isLanguageValueObject = /* @__PURE__ */ __name((claim) => {