@sphereon/ssi-types 0.34.1-feature.DIIPv4.104 → 0.34.1-feature.DIIPv4.113
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 +48 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -48
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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,12 +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
533
|
StatusListType2["BitstringStatusList"] = "BitstringStatusList";
|
|
534
534
|
return StatusListType2;
|
|
535
|
-
}({});
|
|
535
|
+
})({});
|
|
536
536
|
function isVcdmCredential(credential, vcdmType) {
|
|
537
537
|
if (!credential || typeof credential !== "object") {
|
|
538
538
|
return false;
|
|
@@ -569,7 +569,7 @@ var VCDM_CREDENTIAL_CONTEXT_VERSIONS = [
|
|
|
569
569
|
];
|
|
570
570
|
|
|
571
571
|
// src/utils/did.ts
|
|
572
|
-
var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
|
|
572
|
+
var IProofPurpose = /* @__PURE__ */ (function(IProofPurpose2) {
|
|
573
573
|
IProofPurpose2["verificationMethod"] = "verificationMethod";
|
|
574
574
|
IProofPurpose2["assertionMethod"] = "assertionMethod";
|
|
575
575
|
IProofPurpose2["authentication"] = "authentication";
|
|
@@ -578,8 +578,8 @@ var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
|
|
|
578
578
|
IProofPurpose2["capabilityInvocation"] = "capabilityInvocation";
|
|
579
579
|
IProofPurpose2["capabilityDelegation"] = "capabilityDelegation";
|
|
580
580
|
return IProofPurpose2;
|
|
581
|
-
}({});
|
|
582
|
-
var IProofType = /* @__PURE__ */ function(IProofType2) {
|
|
581
|
+
})({});
|
|
582
|
+
var IProofType = /* @__PURE__ */ (function(IProofType2) {
|
|
583
583
|
IProofType2["Ed25519Signature2018"] = "Ed25519Signature2018";
|
|
584
584
|
IProofType2["Ed25519Signature2020"] = "Ed25519Signature2020";
|
|
585
585
|
IProofType2["EcdsaSecp256k1Signature2019"] = "EcdsaSecp256k1Signature2019";
|
|
@@ -594,7 +594,7 @@ var IProofType = /* @__PURE__ */ function(IProofType2) {
|
|
|
594
594
|
IProofType2["SdJwtProof2024"] = "SdJwtProof2024";
|
|
595
595
|
IProofType2["MdocProof2024"] = "MsoMdocProof2024";
|
|
596
596
|
return IProofType2;
|
|
597
|
-
}({});
|
|
597
|
+
})({});
|
|
598
598
|
var parseDid = /* @__PURE__ */ __name((did) => {
|
|
599
599
|
const parsedDid = parse(did);
|
|
600
600
|
if (parsedDid === null) {
|
|
@@ -919,14 +919,14 @@ var jwtDateToISOString = /* @__PURE__ */ __name(({ jwtClaim, claimName, isRequir
|
|
|
919
919
|
}, "jwtDateToISOString");
|
|
920
920
|
|
|
921
921
|
// src/utils/jose.ts
|
|
922
|
-
var JwkKeyType = /* @__PURE__ */ function(JwkKeyType2) {
|
|
922
|
+
var JwkKeyType = /* @__PURE__ */ (function(JwkKeyType2) {
|
|
923
923
|
JwkKeyType2["EC"] = "EC";
|
|
924
924
|
JwkKeyType2["RSA"] = "RSA";
|
|
925
925
|
JwkKeyType2["oct"] = "oct";
|
|
926
926
|
JwkKeyType2["OKP"] = "OKP";
|
|
927
927
|
return JwkKeyType2;
|
|
928
|
-
}({});
|
|
929
|
-
var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
|
|
928
|
+
})({});
|
|
929
|
+
var JoseSignatureAlgorithm = /* @__PURE__ */ (function(JoseSignatureAlgorithm2) {
|
|
930
930
|
JoseSignatureAlgorithm2["RS256"] = "RS256";
|
|
931
931
|
JoseSignatureAlgorithm2["RS384"] = "RS384";
|
|
932
932
|
JoseSignatureAlgorithm2["RS512"] = "RS512";
|
|
@@ -943,8 +943,8 @@ var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
|
|
|
943
943
|
JoseSignatureAlgorithm2["PS512"] = "PS512";
|
|
944
944
|
JoseSignatureAlgorithm2["none"] = "none";
|
|
945
945
|
return JoseSignatureAlgorithm2;
|
|
946
|
-
}({});
|
|
947
|
-
var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
|
|
946
|
+
})({});
|
|
947
|
+
var JoseKeyOperation = /* @__PURE__ */ (function(JoseKeyOperation2) {
|
|
948
948
|
JoseKeyOperation2["SIGN"] = "sign";
|
|
949
949
|
JoseKeyOperation2["VERIFY"] = "verify";
|
|
950
950
|
JoseKeyOperation2["ENCRYPT"] = "encrypt";
|
|
@@ -954,8 +954,8 @@ var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
|
|
|
954
954
|
JoseKeyOperation2["DERIVE_KEY"] = "deriveKey";
|
|
955
955
|
JoseKeyOperation2["DERIVE_BITS"] = "deriveBits";
|
|
956
956
|
return JoseKeyOperation2;
|
|
957
|
-
}({});
|
|
958
|
-
var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
|
|
957
|
+
})({});
|
|
958
|
+
var JoseCurve = /* @__PURE__ */ (function(JoseCurve2) {
|
|
959
959
|
JoseCurve2["P_256"] = "P-256";
|
|
960
960
|
JoseCurve2["P_384"] = "P-384";
|
|
961
961
|
JoseCurve2["P_521"] = "P-521";
|
|
@@ -966,18 +966,18 @@ var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
|
|
|
966
966
|
JoseCurve2["Ed448"] = "Ed448";
|
|
967
967
|
JoseCurve2["secp256k1"] = "secp256k1";
|
|
968
968
|
return JoseCurve2;
|
|
969
|
-
}({});
|
|
969
|
+
})({});
|
|
970
970
|
|
|
971
971
|
// src/utils/cose.ts
|
|
972
|
-
var ICoseKeyType = /* @__PURE__ */ function(ICoseKeyType2) {
|
|
972
|
+
var ICoseKeyType = /* @__PURE__ */ (function(ICoseKeyType2) {
|
|
973
973
|
ICoseKeyType2[ICoseKeyType2["OKP"] = 1] = "OKP";
|
|
974
974
|
ICoseKeyType2[ICoseKeyType2["EC2"] = 2] = "EC2";
|
|
975
975
|
ICoseKeyType2[ICoseKeyType2["RSA"] = 3] = "RSA";
|
|
976
976
|
ICoseKeyType2[ICoseKeyType2["Symmetric"] = 4] = "Symmetric";
|
|
977
977
|
ICoseKeyType2[ICoseKeyType2["Reserved"] = 0] = "Reserved";
|
|
978
978
|
return ICoseKeyType2;
|
|
979
|
-
}({});
|
|
980
|
-
var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2) {
|
|
979
|
+
})({});
|
|
980
|
+
var ICoseSignatureAlgorithm = /* @__PURE__ */ (function(ICoseSignatureAlgorithm2) {
|
|
981
981
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256"] = -7] = "ES256";
|
|
982
982
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256K"] = -47] = "ES256K";
|
|
983
983
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES384"] = -35] = "ES384";
|
|
@@ -991,8 +991,8 @@ var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2)
|
|
|
991
991
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS384"] = -38] = "PS384";
|
|
992
992
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS512"] = -39] = "PS512";
|
|
993
993
|
return ICoseSignatureAlgorithm2;
|
|
994
|
-
}({});
|
|
995
|
-
var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
|
|
994
|
+
})({});
|
|
995
|
+
var ICoseKeyOperation = /* @__PURE__ */ (function(ICoseKeyOperation2) {
|
|
996
996
|
ICoseKeyOperation2[ICoseKeyOperation2["SIGN"] = 1] = "SIGN";
|
|
997
997
|
ICoseKeyOperation2[ICoseKeyOperation2["VERIFY"] = 2] = "VERIFY";
|
|
998
998
|
ICoseKeyOperation2[ICoseKeyOperation2["ENCRYPT"] = 3] = "ENCRYPT";
|
|
@@ -1004,8 +1004,8 @@ var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
|
|
|
1004
1004
|
ICoseKeyOperation2[ICoseKeyOperation2["MAC_CREATE"] = 9] = "MAC_CREATE";
|
|
1005
1005
|
ICoseKeyOperation2[ICoseKeyOperation2["MAC_VERIFY"] = 10] = "MAC_VERIFY";
|
|
1006
1006
|
return ICoseKeyOperation2;
|
|
1007
|
-
}({});
|
|
1008
|
-
var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
|
|
1007
|
+
})({});
|
|
1008
|
+
var ICoseCurve = /* @__PURE__ */ (function(ICoseCurve2) {
|
|
1009
1009
|
ICoseCurve2[ICoseCurve2["P_256"] = 1] = "P_256";
|
|
1010
1010
|
ICoseCurve2[ICoseCurve2["P_384"] = 2] = "P_384";
|
|
1011
1011
|
ICoseCurve2[ICoseCurve2["P_521"] = 3] = "P_521";
|
|
@@ -1015,18 +1015,18 @@ var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
|
|
|
1015
1015
|
ICoseCurve2[ICoseCurve2["Ed448"] = 7] = "Ed448";
|
|
1016
1016
|
ICoseCurve2[ICoseCurve2["secp256k1"] = -1] = "secp256k1";
|
|
1017
1017
|
return ICoseCurve2;
|
|
1018
|
-
}({});
|
|
1018
|
+
})({});
|
|
1019
1019
|
|
|
1020
1020
|
// src/mapper/credential-constraints.ts
|
|
1021
|
-
var StatusListCredentialIdMode = /* @__PURE__ */ function(StatusListCredentialIdMode2) {
|
|
1021
|
+
var StatusListCredentialIdMode = /* @__PURE__ */ (function(StatusListCredentialIdMode2) {
|
|
1022
1022
|
StatusListCredentialIdMode2["ISSUANCE"] = "ISSUANCE";
|
|
1023
1023
|
StatusListCredentialIdMode2["NEVER"] = "NEVER";
|
|
1024
1024
|
return StatusListCredentialIdMode2;
|
|
1025
|
-
}({});
|
|
1026
|
-
var StatusListDriverType = /* @__PURE__ */ function(StatusListDriverType2) {
|
|
1025
|
+
})({});
|
|
1026
|
+
var StatusListDriverType = /* @__PURE__ */ (function(StatusListDriverType2) {
|
|
1027
1027
|
StatusListDriverType2["AGENT_TYPEORM"] = "agent_typeorm";
|
|
1028
1028
|
return StatusListDriverType2;
|
|
1029
|
-
}({});
|
|
1029
|
+
})({});
|
|
1030
1030
|
|
|
1031
1031
|
// src/mapper/credential-mapper.ts
|
|
1032
1032
|
var import_jwt_decode = require("jwt-decode");
|
|
@@ -1715,7 +1715,7 @@ function isWrappedSdJwtVerifiablePresentation(vp) {
|
|
|
1715
1715
|
return vp.format === "dc+sd-jwt";
|
|
1716
1716
|
}
|
|
1717
1717
|
__name(isWrappedSdJwtVerifiablePresentation, "isWrappedSdJwtVerifiablePresentation");
|
|
1718
|
-
var OriginalType = /* @__PURE__ */ function(OriginalType2) {
|
|
1718
|
+
var OriginalType = /* @__PURE__ */ (function(OriginalType2) {
|
|
1719
1719
|
OriginalType2["JSONLD"] = "json-ld";
|
|
1720
1720
|
OriginalType2["JWT_ENCODED"] = "jwt-encoded";
|
|
1721
1721
|
OriginalType2["JWT_DECODED"] = "jwt-decoded";
|
|
@@ -1724,16 +1724,16 @@ var OriginalType = /* @__PURE__ */ function(OriginalType2) {
|
|
|
1724
1724
|
OriginalType2["MSO_MDOC_ENCODED"] = "mso_mdoc-encoded";
|
|
1725
1725
|
OriginalType2["MSO_MDOC_DECODED"] = "mso_mdoc-decoded";
|
|
1726
1726
|
return OriginalType2;
|
|
1727
|
-
}({});
|
|
1727
|
+
})({});
|
|
1728
1728
|
var JWT_PROOF_TYPE_2020 = "JwtProof2020";
|
|
1729
|
-
var DocumentFormat = /* @__PURE__ */ function(DocumentFormat2) {
|
|
1729
|
+
var DocumentFormat = /* @__PURE__ */ (function(DocumentFormat2) {
|
|
1730
1730
|
DocumentFormat2[DocumentFormat2["JWT"] = 0] = "JWT";
|
|
1731
1731
|
DocumentFormat2[DocumentFormat2["JSONLD"] = 1] = "JSONLD";
|
|
1732
1732
|
DocumentFormat2[DocumentFormat2["SD_JWT_VC"] = 2] = "SD_JWT_VC";
|
|
1733
1733
|
DocumentFormat2[DocumentFormat2["EIP712"] = 3] = "EIP712";
|
|
1734
1734
|
DocumentFormat2[DocumentFormat2["MSO_MDOC"] = 4] = "MSO_MDOC";
|
|
1735
1735
|
return DocumentFormat2;
|
|
1736
|
-
}({});
|
|
1736
|
+
})({});
|
|
1737
1737
|
|
|
1738
1738
|
// src/mapper/jsonld-language-values.ts
|
|
1739
1739
|
var isLanguageValueObject = /* @__PURE__ */ __name((claim) => {
|