@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.js
CHANGED
|
@@ -4,26 +4,26 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4
4
|
// src/logging/index.ts
|
|
5
5
|
import createDebug from "debug";
|
|
6
6
|
import { EventEmitter } from "events";
|
|
7
|
-
var LogLevel = /* @__PURE__ */ function(LogLevel2) {
|
|
7
|
+
var LogLevel = /* @__PURE__ */ (function(LogLevel2) {
|
|
8
8
|
LogLevel2[LogLevel2["TRACE"] = 0] = "TRACE";
|
|
9
9
|
LogLevel2[LogLevel2["DEBUG"] = 1] = "DEBUG";
|
|
10
10
|
LogLevel2[LogLevel2["INFO"] = 2] = "INFO";
|
|
11
11
|
LogLevel2[LogLevel2["WARNING"] = 3] = "WARNING";
|
|
12
12
|
LogLevel2[LogLevel2["ERROR"] = 4] = "ERROR";
|
|
13
13
|
return LogLevel2;
|
|
14
|
-
}({});
|
|
15
|
-
var LoggingEventType = /* @__PURE__ */ function(LoggingEventType2) {
|
|
14
|
+
})({});
|
|
15
|
+
var LoggingEventType = /* @__PURE__ */ (function(LoggingEventType2) {
|
|
16
16
|
LoggingEventType2["AUDIT"] = "audit";
|
|
17
17
|
LoggingEventType2["ACTIVITY"] = "activity";
|
|
18
18
|
LoggingEventType2["GENERAL"] = "general";
|
|
19
19
|
return LoggingEventType2;
|
|
20
|
-
}({});
|
|
21
|
-
var LogMethod = /* @__PURE__ */ function(LogMethod2) {
|
|
20
|
+
})({});
|
|
21
|
+
var LogMethod = /* @__PURE__ */ (function(LogMethod2) {
|
|
22
22
|
LogMethod2[LogMethod2["DEBUG_PKG"] = 0] = "DEBUG_PKG";
|
|
23
23
|
LogMethod2[LogMethod2["CONSOLE"] = 1] = "CONSOLE";
|
|
24
24
|
LogMethod2[LogMethod2["EVENT"] = 2] = "EVENT";
|
|
25
25
|
return LogMethod2;
|
|
26
|
-
}({});
|
|
26
|
+
})({});
|
|
27
27
|
function logOptions(opts) {
|
|
28
28
|
return {
|
|
29
29
|
namespace: opts?.namespace ?? "sphereon",
|
|
@@ -200,7 +200,7 @@ var SimpleRecordLogger = class extends SimpleLogger {
|
|
|
200
200
|
|
|
201
201
|
// src/events/index.ts
|
|
202
202
|
import { EventEmitter as EventEmitter2 } from "events";
|
|
203
|
-
var System = /* @__PURE__ */ function(System2) {
|
|
203
|
+
var System = /* @__PURE__ */ (function(System2) {
|
|
204
204
|
System2["GENERAL"] = "general";
|
|
205
205
|
System2["KMS"] = "kms";
|
|
206
206
|
System2["IDENTITY"] = "identity";
|
|
@@ -213,8 +213,8 @@ var System = /* @__PURE__ */ function(System2) {
|
|
|
213
213
|
System2["PROFILE"] = "profile";
|
|
214
214
|
System2["CONTACT"] = "contact";
|
|
215
215
|
return System2;
|
|
216
|
-
}({});
|
|
217
|
-
var SubSystem = /* @__PURE__ */ function(SubSystem2) {
|
|
216
|
+
})({});
|
|
217
|
+
var SubSystem = /* @__PURE__ */ (function(SubSystem2) {
|
|
218
218
|
SubSystem2["KEY"] = "key";
|
|
219
219
|
SubSystem2["DID_PROVIDER"] = "did_provider";
|
|
220
220
|
SubSystem2["DID_RESOLVER"] = "did_resolver";
|
|
@@ -229,16 +229,16 @@ var SubSystem = /* @__PURE__ */ function(SubSystem2) {
|
|
|
229
229
|
SubSystem2["PROFILE"] = "profile";
|
|
230
230
|
SubSystem2["API"] = "api";
|
|
231
231
|
return SubSystem2;
|
|
232
|
-
}({});
|
|
233
|
-
var ActionType = /* @__PURE__ */ function(ActionType2) {
|
|
232
|
+
})({});
|
|
233
|
+
var ActionType = /* @__PURE__ */ (function(ActionType2) {
|
|
234
234
|
ActionType2["CREATE"] = "create";
|
|
235
235
|
ActionType2["READ"] = "read";
|
|
236
236
|
ActionType2["UPDATE"] = "update";
|
|
237
237
|
ActionType2["DELETE"] = "delete";
|
|
238
238
|
ActionType2["EXECUTE"] = "execute";
|
|
239
239
|
return ActionType2;
|
|
240
|
-
}({});
|
|
241
|
-
var DefaultActionSubType = /* @__PURE__ */ function(DefaultActionSubType2) {
|
|
240
|
+
})({});
|
|
241
|
+
var DefaultActionSubType = /* @__PURE__ */ (function(DefaultActionSubType2) {
|
|
242
242
|
DefaultActionSubType2["KEY_GENERATION"] = "Key generation";
|
|
243
243
|
DefaultActionSubType2["KEY_IMPORT"] = "Key import";
|
|
244
244
|
DefaultActionSubType2["KEY_PERSISTENCE"] = "Key persistence";
|
|
@@ -253,14 +253,14 @@ var DefaultActionSubType = /* @__PURE__ */ function(DefaultActionSubType2) {
|
|
|
253
253
|
DefaultActionSubType2["VC_ISSUE_DECLINE"] = "VC issue decline";
|
|
254
254
|
DefaultActionSubType2["VC_SHARE_DECLINE"] = "VC share decline";
|
|
255
255
|
return DefaultActionSubType2;
|
|
256
|
-
}({});
|
|
257
|
-
var InitiatorType = /* @__PURE__ */ function(InitiatorType2) {
|
|
256
|
+
})({});
|
|
257
|
+
var InitiatorType = /* @__PURE__ */ (function(InitiatorType2) {
|
|
258
258
|
InitiatorType2["USER"] = "user";
|
|
259
259
|
InitiatorType2["SYSTEM"] = "system";
|
|
260
260
|
InitiatorType2["EXTERNAL"] = "external";
|
|
261
261
|
return InitiatorType2;
|
|
262
|
-
}({});
|
|
263
|
-
var SystemCorrelationIdType = /* @__PURE__ */ function(SystemCorrelationIdType2) {
|
|
262
|
+
})({});
|
|
263
|
+
var SystemCorrelationIdType = /* @__PURE__ */ (function(SystemCorrelationIdType2) {
|
|
264
264
|
SystemCorrelationIdType2["DID"] = "did";
|
|
265
265
|
SystemCorrelationIdType2["URL"] = "url";
|
|
266
266
|
SystemCorrelationIdType2["EMAIL"] = "email";
|
|
@@ -268,7 +268,7 @@ var SystemCorrelationIdType = /* @__PURE__ */ function(SystemCorrelationIdType2)
|
|
|
268
268
|
SystemCorrelationIdType2["PHONE"] = "phone";
|
|
269
269
|
SystemCorrelationIdType2["USER"] = "user";
|
|
270
270
|
return SystemCorrelationIdType2;
|
|
271
|
-
}({});
|
|
271
|
+
})({});
|
|
272
272
|
var EventManager = class _EventManager {
|
|
273
273
|
static {
|
|
274
274
|
__name(this, "EventManager");
|
|
@@ -431,12 +431,12 @@ function isWrappedW3CVerifiablePresentation(vp) {
|
|
|
431
431
|
return vp.format === "jwt_vp" || vp.format === "ldp_vp";
|
|
432
432
|
}
|
|
433
433
|
__name(isWrappedW3CVerifiablePresentation, "isWrappedW3CVerifiablePresentation");
|
|
434
|
-
var StatusListType = /* @__PURE__ */ function(StatusListType2) {
|
|
434
|
+
var StatusListType = /* @__PURE__ */ (function(StatusListType2) {
|
|
435
435
|
StatusListType2["StatusList2021"] = "StatusList2021";
|
|
436
436
|
StatusListType2["OAuthStatusList"] = "OAuthStatusList";
|
|
437
437
|
StatusListType2["BitstringStatusList"] = "BitstringStatusList";
|
|
438
438
|
return StatusListType2;
|
|
439
|
-
}({});
|
|
439
|
+
})({});
|
|
440
440
|
function isVcdmCredential(credential, vcdmType) {
|
|
441
441
|
if (!credential || typeof credential !== "object") {
|
|
442
442
|
return false;
|
|
@@ -473,7 +473,7 @@ var VCDM_CREDENTIAL_CONTEXT_VERSIONS = [
|
|
|
473
473
|
];
|
|
474
474
|
|
|
475
475
|
// src/utils/did.ts
|
|
476
|
-
var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
|
|
476
|
+
var IProofPurpose = /* @__PURE__ */ (function(IProofPurpose2) {
|
|
477
477
|
IProofPurpose2["verificationMethod"] = "verificationMethod";
|
|
478
478
|
IProofPurpose2["assertionMethod"] = "assertionMethod";
|
|
479
479
|
IProofPurpose2["authentication"] = "authentication";
|
|
@@ -482,8 +482,8 @@ var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
|
|
|
482
482
|
IProofPurpose2["capabilityInvocation"] = "capabilityInvocation";
|
|
483
483
|
IProofPurpose2["capabilityDelegation"] = "capabilityDelegation";
|
|
484
484
|
return IProofPurpose2;
|
|
485
|
-
}({});
|
|
486
|
-
var IProofType = /* @__PURE__ */ function(IProofType2) {
|
|
485
|
+
})({});
|
|
486
|
+
var IProofType = /* @__PURE__ */ (function(IProofType2) {
|
|
487
487
|
IProofType2["Ed25519Signature2018"] = "Ed25519Signature2018";
|
|
488
488
|
IProofType2["Ed25519Signature2020"] = "Ed25519Signature2020";
|
|
489
489
|
IProofType2["EcdsaSecp256k1Signature2019"] = "EcdsaSecp256k1Signature2019";
|
|
@@ -498,7 +498,7 @@ var IProofType = /* @__PURE__ */ function(IProofType2) {
|
|
|
498
498
|
IProofType2["SdJwtProof2024"] = "SdJwtProof2024";
|
|
499
499
|
IProofType2["MdocProof2024"] = "MsoMdocProof2024";
|
|
500
500
|
return IProofType2;
|
|
501
|
-
}({});
|
|
501
|
+
})({});
|
|
502
502
|
var parseDid = /* @__PURE__ */ __name((did) => {
|
|
503
503
|
const parsedDid = parse(did);
|
|
504
504
|
if (parsedDid === null) {
|
|
@@ -823,14 +823,14 @@ var jwtDateToISOString = /* @__PURE__ */ __name(({ jwtClaim, claimName, isRequir
|
|
|
823
823
|
}, "jwtDateToISOString");
|
|
824
824
|
|
|
825
825
|
// src/utils/jose.ts
|
|
826
|
-
var JwkKeyType = /* @__PURE__ */ function(JwkKeyType2) {
|
|
826
|
+
var JwkKeyType = /* @__PURE__ */ (function(JwkKeyType2) {
|
|
827
827
|
JwkKeyType2["EC"] = "EC";
|
|
828
828
|
JwkKeyType2["RSA"] = "RSA";
|
|
829
829
|
JwkKeyType2["oct"] = "oct";
|
|
830
830
|
JwkKeyType2["OKP"] = "OKP";
|
|
831
831
|
return JwkKeyType2;
|
|
832
|
-
}({});
|
|
833
|
-
var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
|
|
832
|
+
})({});
|
|
833
|
+
var JoseSignatureAlgorithm = /* @__PURE__ */ (function(JoseSignatureAlgorithm2) {
|
|
834
834
|
JoseSignatureAlgorithm2["RS256"] = "RS256";
|
|
835
835
|
JoseSignatureAlgorithm2["RS384"] = "RS384";
|
|
836
836
|
JoseSignatureAlgorithm2["RS512"] = "RS512";
|
|
@@ -847,8 +847,8 @@ var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
|
|
|
847
847
|
JoseSignatureAlgorithm2["PS512"] = "PS512";
|
|
848
848
|
JoseSignatureAlgorithm2["none"] = "none";
|
|
849
849
|
return JoseSignatureAlgorithm2;
|
|
850
|
-
}({});
|
|
851
|
-
var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
|
|
850
|
+
})({});
|
|
851
|
+
var JoseKeyOperation = /* @__PURE__ */ (function(JoseKeyOperation2) {
|
|
852
852
|
JoseKeyOperation2["SIGN"] = "sign";
|
|
853
853
|
JoseKeyOperation2["VERIFY"] = "verify";
|
|
854
854
|
JoseKeyOperation2["ENCRYPT"] = "encrypt";
|
|
@@ -858,8 +858,8 @@ var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
|
|
|
858
858
|
JoseKeyOperation2["DERIVE_KEY"] = "deriveKey";
|
|
859
859
|
JoseKeyOperation2["DERIVE_BITS"] = "deriveBits";
|
|
860
860
|
return JoseKeyOperation2;
|
|
861
|
-
}({});
|
|
862
|
-
var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
|
|
861
|
+
})({});
|
|
862
|
+
var JoseCurve = /* @__PURE__ */ (function(JoseCurve2) {
|
|
863
863
|
JoseCurve2["P_256"] = "P-256";
|
|
864
864
|
JoseCurve2["P_384"] = "P-384";
|
|
865
865
|
JoseCurve2["P_521"] = "P-521";
|
|
@@ -870,18 +870,18 @@ var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
|
|
|
870
870
|
JoseCurve2["Ed448"] = "Ed448";
|
|
871
871
|
JoseCurve2["secp256k1"] = "secp256k1";
|
|
872
872
|
return JoseCurve2;
|
|
873
|
-
}({});
|
|
873
|
+
})({});
|
|
874
874
|
|
|
875
875
|
// src/utils/cose.ts
|
|
876
|
-
var ICoseKeyType = /* @__PURE__ */ function(ICoseKeyType2) {
|
|
876
|
+
var ICoseKeyType = /* @__PURE__ */ (function(ICoseKeyType2) {
|
|
877
877
|
ICoseKeyType2[ICoseKeyType2["OKP"] = 1] = "OKP";
|
|
878
878
|
ICoseKeyType2[ICoseKeyType2["EC2"] = 2] = "EC2";
|
|
879
879
|
ICoseKeyType2[ICoseKeyType2["RSA"] = 3] = "RSA";
|
|
880
880
|
ICoseKeyType2[ICoseKeyType2["Symmetric"] = 4] = "Symmetric";
|
|
881
881
|
ICoseKeyType2[ICoseKeyType2["Reserved"] = 0] = "Reserved";
|
|
882
882
|
return ICoseKeyType2;
|
|
883
|
-
}({});
|
|
884
|
-
var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2) {
|
|
883
|
+
})({});
|
|
884
|
+
var ICoseSignatureAlgorithm = /* @__PURE__ */ (function(ICoseSignatureAlgorithm2) {
|
|
885
885
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256"] = -7] = "ES256";
|
|
886
886
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256K"] = -47] = "ES256K";
|
|
887
887
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES384"] = -35] = "ES384";
|
|
@@ -895,8 +895,8 @@ var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2)
|
|
|
895
895
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS384"] = -38] = "PS384";
|
|
896
896
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS512"] = -39] = "PS512";
|
|
897
897
|
return ICoseSignatureAlgorithm2;
|
|
898
|
-
}({});
|
|
899
|
-
var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
|
|
898
|
+
})({});
|
|
899
|
+
var ICoseKeyOperation = /* @__PURE__ */ (function(ICoseKeyOperation2) {
|
|
900
900
|
ICoseKeyOperation2[ICoseKeyOperation2["SIGN"] = 1] = "SIGN";
|
|
901
901
|
ICoseKeyOperation2[ICoseKeyOperation2["VERIFY"] = 2] = "VERIFY";
|
|
902
902
|
ICoseKeyOperation2[ICoseKeyOperation2["ENCRYPT"] = 3] = "ENCRYPT";
|
|
@@ -908,8 +908,8 @@ var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
|
|
|
908
908
|
ICoseKeyOperation2[ICoseKeyOperation2["MAC_CREATE"] = 9] = "MAC_CREATE";
|
|
909
909
|
ICoseKeyOperation2[ICoseKeyOperation2["MAC_VERIFY"] = 10] = "MAC_VERIFY";
|
|
910
910
|
return ICoseKeyOperation2;
|
|
911
|
-
}({});
|
|
912
|
-
var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
|
|
911
|
+
})({});
|
|
912
|
+
var ICoseCurve = /* @__PURE__ */ (function(ICoseCurve2) {
|
|
913
913
|
ICoseCurve2[ICoseCurve2["P_256"] = 1] = "P_256";
|
|
914
914
|
ICoseCurve2[ICoseCurve2["P_384"] = 2] = "P_384";
|
|
915
915
|
ICoseCurve2[ICoseCurve2["P_521"] = 3] = "P_521";
|
|
@@ -919,18 +919,18 @@ var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
|
|
|
919
919
|
ICoseCurve2[ICoseCurve2["Ed448"] = 7] = "Ed448";
|
|
920
920
|
ICoseCurve2[ICoseCurve2["secp256k1"] = -1] = "secp256k1";
|
|
921
921
|
return ICoseCurve2;
|
|
922
|
-
}({});
|
|
922
|
+
})({});
|
|
923
923
|
|
|
924
924
|
// src/mapper/credential-constraints.ts
|
|
925
|
-
var StatusListCredentialIdMode = /* @__PURE__ */ function(StatusListCredentialIdMode2) {
|
|
925
|
+
var StatusListCredentialIdMode = /* @__PURE__ */ (function(StatusListCredentialIdMode2) {
|
|
926
926
|
StatusListCredentialIdMode2["ISSUANCE"] = "ISSUANCE";
|
|
927
927
|
StatusListCredentialIdMode2["NEVER"] = "NEVER";
|
|
928
928
|
return StatusListCredentialIdMode2;
|
|
929
|
-
}({});
|
|
930
|
-
var StatusListDriverType = /* @__PURE__ */ function(StatusListDriverType2) {
|
|
929
|
+
})({});
|
|
930
|
+
var StatusListDriverType = /* @__PURE__ */ (function(StatusListDriverType2) {
|
|
931
931
|
StatusListDriverType2["AGENT_TYPEORM"] = "agent_typeorm";
|
|
932
932
|
return StatusListDriverType2;
|
|
933
|
-
}({});
|
|
933
|
+
})({});
|
|
934
934
|
|
|
935
935
|
// src/mapper/credential-mapper.ts
|
|
936
936
|
import { jwtDecode } from "jwt-decode";
|
|
@@ -1619,7 +1619,7 @@ function isWrappedSdJwtVerifiablePresentation(vp) {
|
|
|
1619
1619
|
return vp.format === "dc+sd-jwt";
|
|
1620
1620
|
}
|
|
1621
1621
|
__name(isWrappedSdJwtVerifiablePresentation, "isWrappedSdJwtVerifiablePresentation");
|
|
1622
|
-
var OriginalType = /* @__PURE__ */ function(OriginalType2) {
|
|
1622
|
+
var OriginalType = /* @__PURE__ */ (function(OriginalType2) {
|
|
1623
1623
|
OriginalType2["JSONLD"] = "json-ld";
|
|
1624
1624
|
OriginalType2["JWT_ENCODED"] = "jwt-encoded";
|
|
1625
1625
|
OriginalType2["JWT_DECODED"] = "jwt-decoded";
|
|
@@ -1628,16 +1628,16 @@ var OriginalType = /* @__PURE__ */ function(OriginalType2) {
|
|
|
1628
1628
|
OriginalType2["MSO_MDOC_ENCODED"] = "mso_mdoc-encoded";
|
|
1629
1629
|
OriginalType2["MSO_MDOC_DECODED"] = "mso_mdoc-decoded";
|
|
1630
1630
|
return OriginalType2;
|
|
1631
|
-
}({});
|
|
1631
|
+
})({});
|
|
1632
1632
|
var JWT_PROOF_TYPE_2020 = "JwtProof2020";
|
|
1633
|
-
var DocumentFormat = /* @__PURE__ */ function(DocumentFormat2) {
|
|
1633
|
+
var DocumentFormat = /* @__PURE__ */ (function(DocumentFormat2) {
|
|
1634
1634
|
DocumentFormat2[DocumentFormat2["JWT"] = 0] = "JWT";
|
|
1635
1635
|
DocumentFormat2[DocumentFormat2["JSONLD"] = 1] = "JSONLD";
|
|
1636
1636
|
DocumentFormat2[DocumentFormat2["SD_JWT_VC"] = 2] = "SD_JWT_VC";
|
|
1637
1637
|
DocumentFormat2[DocumentFormat2["EIP712"] = 3] = "EIP712";
|
|
1638
1638
|
DocumentFormat2[DocumentFormat2["MSO_MDOC"] = 4] = "MSO_MDOC";
|
|
1639
1639
|
return DocumentFormat2;
|
|
1640
|
-
}({});
|
|
1640
|
+
})({});
|
|
1641
1641
|
|
|
1642
1642
|
// src/mapper/jsonld-language-values.ts
|
|
1643
1643
|
var isLanguageValueObject = /* @__PURE__ */ __name((claim) => {
|