@sphereon/ssi-types 0.34.0 → 0.34.1-feat.SSISDK.35.59
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 +53 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +53 -52
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/mapper/credential-mapper.ts +31 -31
- package/src/types/sd-jwt-vc.ts +2 -2
- package/src/types/vc.ts +2 -1
- package/src/utils/vc.ts +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -280,7 +280,8 @@ declare function isWrappedW3CVerifiableCredential(vc: WrappedVerifiableCredentia
|
|
|
280
280
|
declare function isWrappedW3CVerifiablePresentation(vp: WrappedVerifiablePresentation): vp is WrappedW3CVerifiablePresentation;
|
|
281
281
|
declare enum StatusListType {
|
|
282
282
|
StatusList2021 = "StatusList2021",
|
|
283
|
-
OAuthStatusList = "OAuthStatusList"
|
|
283
|
+
OAuthStatusList = "OAuthStatusList",
|
|
284
|
+
BitstringStatusList = "BitstringStatusList"
|
|
284
285
|
}
|
|
285
286
|
declare function isVcdm1Credential(credential: CredentialPayload | IVerifiableCredential | ICredential | VerifiableCredential | unknown): boolean;
|
|
286
287
|
declare function isVcdm2Credential(credential: CredentialPayload | IVerifiableCredential | ICredential | VerifiableCredential | unknown): boolean;
|
|
@@ -1042,7 +1043,7 @@ interface WrappedSdJwtVerifiableCredential {
|
|
|
1042
1043
|
/**
|
|
1043
1044
|
* The claim format, typically used during exchange transport protocols
|
|
1044
1045
|
*/
|
|
1045
|
-
format: '
|
|
1046
|
+
format: 'dc+sd-jwt';
|
|
1046
1047
|
/**
|
|
1047
1048
|
* Internal stable representation of a Credential
|
|
1048
1049
|
*/
|
|
@@ -1066,7 +1067,7 @@ interface WrappedSdJwtVerifiablePresentation {
|
|
|
1066
1067
|
/**
|
|
1067
1068
|
* The claim format, typically used during exchange transport protocols
|
|
1068
1069
|
*/
|
|
1069
|
-
format: '
|
|
1070
|
+
format: 'dc+sd-jwt';
|
|
1070
1071
|
/**
|
|
1071
1072
|
* Internal stable representation of a Presentation
|
|
1072
1073
|
*/
|
|
@@ -1081,8 +1082,8 @@ interface WrappedSdJwtVerifiablePresentation {
|
|
|
1081
1082
|
type WrappedVerifiableCredential = WrappedW3CVerifiableCredential | WrappedSdJwtVerifiableCredential | WrappedMdocCredential;
|
|
1082
1083
|
type WrappedVerifiablePresentation = WrappedW3CVerifiablePresentation | WrappedSdJwtVerifiablePresentation | WrappedMdocPresentation;
|
|
1083
1084
|
type CredentialProofFormat = 'jwt' | 'lds' | 'vc+jwt' | 'cbor';
|
|
1084
|
-
type CredentialFormat = 'jwt_vc' | 'ldp_vc' | 'vc+jwt' | '
|
|
1085
|
-
type PresentationFormat = 'jwt_vp' | 'ldp_vp' | 'vp+jwt' | 'vp+sd-jwt' | 'jwt' | 'ldp' | 'mso_mdoc' | string;
|
|
1085
|
+
type CredentialFormat = 'jwt_vc' | 'ldp_vc' | 'vc+jwt' | 'dc+sd-jwt' | 'jwt' | 'ldp' | 'mso_mdoc' | string;
|
|
1086
|
+
type PresentationFormat = 'jwt_vp' | 'ldp_vp' | 'vp+jwt' | 'vp+sd-jwt' | 'dc+sd-jwt' | 'jwt' | 'ldp' | 'mso_mdoc' | string;
|
|
1086
1087
|
type ClaimFormat = CredentialFormat | PresentationFormat;
|
|
1087
1088
|
type OriginalVerifiableCredential = W3CVerifiableCredential | JwtDecodedVerifiableCredential | SdJwtDecodedVerifiableCredential | MdocOid4vpIssuerSigned | MdocDocument;
|
|
1088
1089
|
type OriginalVerifiablePresentation = W3CVerifiablePresentation | JwtDecodedVerifiablePresentation | SdJwtDecodedVerifiableCredential | MdocOid4vpMdocVpToken | MdocDeviceResponse;
|
package/dist/index.d.ts
CHANGED
|
@@ -280,7 +280,8 @@ declare function isWrappedW3CVerifiableCredential(vc: WrappedVerifiableCredentia
|
|
|
280
280
|
declare function isWrappedW3CVerifiablePresentation(vp: WrappedVerifiablePresentation): vp is WrappedW3CVerifiablePresentation;
|
|
281
281
|
declare enum StatusListType {
|
|
282
282
|
StatusList2021 = "StatusList2021",
|
|
283
|
-
OAuthStatusList = "OAuthStatusList"
|
|
283
|
+
OAuthStatusList = "OAuthStatusList",
|
|
284
|
+
BitstringStatusList = "BitstringStatusList"
|
|
284
285
|
}
|
|
285
286
|
declare function isVcdm1Credential(credential: CredentialPayload | IVerifiableCredential | ICredential | VerifiableCredential | unknown): boolean;
|
|
286
287
|
declare function isVcdm2Credential(credential: CredentialPayload | IVerifiableCredential | ICredential | VerifiableCredential | unknown): boolean;
|
|
@@ -1042,7 +1043,7 @@ interface WrappedSdJwtVerifiableCredential {
|
|
|
1042
1043
|
/**
|
|
1043
1044
|
* The claim format, typically used during exchange transport protocols
|
|
1044
1045
|
*/
|
|
1045
|
-
format: '
|
|
1046
|
+
format: 'dc+sd-jwt';
|
|
1046
1047
|
/**
|
|
1047
1048
|
* Internal stable representation of a Credential
|
|
1048
1049
|
*/
|
|
@@ -1066,7 +1067,7 @@ interface WrappedSdJwtVerifiablePresentation {
|
|
|
1066
1067
|
/**
|
|
1067
1068
|
* The claim format, typically used during exchange transport protocols
|
|
1068
1069
|
*/
|
|
1069
|
-
format: '
|
|
1070
|
+
format: 'dc+sd-jwt';
|
|
1070
1071
|
/**
|
|
1071
1072
|
* Internal stable representation of a Presentation
|
|
1072
1073
|
*/
|
|
@@ -1081,8 +1082,8 @@ interface WrappedSdJwtVerifiablePresentation {
|
|
|
1081
1082
|
type WrappedVerifiableCredential = WrappedW3CVerifiableCredential | WrappedSdJwtVerifiableCredential | WrappedMdocCredential;
|
|
1082
1083
|
type WrappedVerifiablePresentation = WrappedW3CVerifiablePresentation | WrappedSdJwtVerifiablePresentation | WrappedMdocPresentation;
|
|
1083
1084
|
type CredentialProofFormat = 'jwt' | 'lds' | 'vc+jwt' | 'cbor';
|
|
1084
|
-
type CredentialFormat = 'jwt_vc' | 'ldp_vc' | 'vc+jwt' | '
|
|
1085
|
-
type PresentationFormat = 'jwt_vp' | 'ldp_vp' | 'vp+jwt' | 'vp+sd-jwt' | 'jwt' | 'ldp' | 'mso_mdoc' | string;
|
|
1085
|
+
type CredentialFormat = 'jwt_vc' | 'ldp_vc' | 'vc+jwt' | 'dc+sd-jwt' | 'jwt' | 'ldp' | 'mso_mdoc' | string;
|
|
1086
|
+
type PresentationFormat = 'jwt_vp' | 'ldp_vp' | 'vp+jwt' | 'vp+sd-jwt' | 'dc+sd-jwt' | 'jwt' | 'ldp' | 'mso_mdoc' | string;
|
|
1086
1087
|
type ClaimFormat = CredentialFormat | PresentationFormat;
|
|
1087
1088
|
type OriginalVerifiableCredential = W3CVerifiableCredential | JwtDecodedVerifiableCredential | SdJwtDecodedVerifiableCredential | MdocOid4vpIssuerSigned | MdocDocument;
|
|
1088
1089
|
type OriginalVerifiablePresentation = W3CVerifiablePresentation | JwtDecodedVerifiablePresentation | SdJwtDecodedVerifiableCredential | MdocOid4vpMdocVpToken | MdocDeviceResponse;
|
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,11 +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
|
+
StatusListType2["BitstringStatusList"] = "BitstringStatusList";
|
|
437
438
|
return StatusListType2;
|
|
438
|
-
}({});
|
|
439
|
+
})({});
|
|
439
440
|
function isVcdmCredential(credential, vcdmType) {
|
|
440
441
|
if (!credential || typeof credential !== "object") {
|
|
441
442
|
return false;
|
|
@@ -472,7 +473,7 @@ var VCDM_CREDENTIAL_CONTEXT_VERSIONS = [
|
|
|
472
473
|
];
|
|
473
474
|
|
|
474
475
|
// src/utils/did.ts
|
|
475
|
-
var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
|
|
476
|
+
var IProofPurpose = /* @__PURE__ */ (function(IProofPurpose2) {
|
|
476
477
|
IProofPurpose2["verificationMethod"] = "verificationMethod";
|
|
477
478
|
IProofPurpose2["assertionMethod"] = "assertionMethod";
|
|
478
479
|
IProofPurpose2["authentication"] = "authentication";
|
|
@@ -481,8 +482,8 @@ var IProofPurpose = /* @__PURE__ */ function(IProofPurpose2) {
|
|
|
481
482
|
IProofPurpose2["capabilityInvocation"] = "capabilityInvocation";
|
|
482
483
|
IProofPurpose2["capabilityDelegation"] = "capabilityDelegation";
|
|
483
484
|
return IProofPurpose2;
|
|
484
|
-
}({});
|
|
485
|
-
var IProofType = /* @__PURE__ */ function(IProofType2) {
|
|
485
|
+
})({});
|
|
486
|
+
var IProofType = /* @__PURE__ */ (function(IProofType2) {
|
|
486
487
|
IProofType2["Ed25519Signature2018"] = "Ed25519Signature2018";
|
|
487
488
|
IProofType2["Ed25519Signature2020"] = "Ed25519Signature2020";
|
|
488
489
|
IProofType2["EcdsaSecp256k1Signature2019"] = "EcdsaSecp256k1Signature2019";
|
|
@@ -497,7 +498,7 @@ var IProofType = /* @__PURE__ */ function(IProofType2) {
|
|
|
497
498
|
IProofType2["SdJwtProof2024"] = "SdJwtProof2024";
|
|
498
499
|
IProofType2["MdocProof2024"] = "MsoMdocProof2024";
|
|
499
500
|
return IProofType2;
|
|
500
|
-
}({});
|
|
501
|
+
})({});
|
|
501
502
|
var parseDid = /* @__PURE__ */ __name((did) => {
|
|
502
503
|
const parsedDid = parse(did);
|
|
503
504
|
if (parsedDid === null) {
|
|
@@ -796,14 +797,14 @@ var jwtDateToISOString = /* @__PURE__ */ __name(({ jwtClaim, claimName, isRequir
|
|
|
796
797
|
}, "jwtDateToISOString");
|
|
797
798
|
|
|
798
799
|
// src/utils/jose.ts
|
|
799
|
-
var JwkKeyType = /* @__PURE__ */ function(JwkKeyType2) {
|
|
800
|
+
var JwkKeyType = /* @__PURE__ */ (function(JwkKeyType2) {
|
|
800
801
|
JwkKeyType2["EC"] = "EC";
|
|
801
802
|
JwkKeyType2["RSA"] = "RSA";
|
|
802
803
|
JwkKeyType2["oct"] = "oct";
|
|
803
804
|
JwkKeyType2["OKP"] = "OKP";
|
|
804
805
|
return JwkKeyType2;
|
|
805
|
-
}({});
|
|
806
|
-
var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
|
|
806
|
+
})({});
|
|
807
|
+
var JoseSignatureAlgorithm = /* @__PURE__ */ (function(JoseSignatureAlgorithm2) {
|
|
807
808
|
JoseSignatureAlgorithm2["RS256"] = "RS256";
|
|
808
809
|
JoseSignatureAlgorithm2["RS384"] = "RS384";
|
|
809
810
|
JoseSignatureAlgorithm2["RS512"] = "RS512";
|
|
@@ -820,8 +821,8 @@ var JoseSignatureAlgorithm = /* @__PURE__ */ function(JoseSignatureAlgorithm2) {
|
|
|
820
821
|
JoseSignatureAlgorithm2["PS512"] = "PS512";
|
|
821
822
|
JoseSignatureAlgorithm2["none"] = "none";
|
|
822
823
|
return JoseSignatureAlgorithm2;
|
|
823
|
-
}({});
|
|
824
|
-
var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
|
|
824
|
+
})({});
|
|
825
|
+
var JoseKeyOperation = /* @__PURE__ */ (function(JoseKeyOperation2) {
|
|
825
826
|
JoseKeyOperation2["SIGN"] = "sign";
|
|
826
827
|
JoseKeyOperation2["VERIFY"] = "verify";
|
|
827
828
|
JoseKeyOperation2["ENCRYPT"] = "encrypt";
|
|
@@ -831,8 +832,8 @@ var JoseKeyOperation = /* @__PURE__ */ function(JoseKeyOperation2) {
|
|
|
831
832
|
JoseKeyOperation2["DERIVE_KEY"] = "deriveKey";
|
|
832
833
|
JoseKeyOperation2["DERIVE_BITS"] = "deriveBits";
|
|
833
834
|
return JoseKeyOperation2;
|
|
834
|
-
}({});
|
|
835
|
-
var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
|
|
835
|
+
})({});
|
|
836
|
+
var JoseCurve = /* @__PURE__ */ (function(JoseCurve2) {
|
|
836
837
|
JoseCurve2["P_256"] = "P-256";
|
|
837
838
|
JoseCurve2["P_384"] = "P-384";
|
|
838
839
|
JoseCurve2["P_521"] = "P-521";
|
|
@@ -843,18 +844,18 @@ var JoseCurve = /* @__PURE__ */ function(JoseCurve2) {
|
|
|
843
844
|
JoseCurve2["Ed448"] = "Ed448";
|
|
844
845
|
JoseCurve2["secp256k1"] = "secp256k1";
|
|
845
846
|
return JoseCurve2;
|
|
846
|
-
}({});
|
|
847
|
+
})({});
|
|
847
848
|
|
|
848
849
|
// src/utils/cose.ts
|
|
849
|
-
var ICoseKeyType = /* @__PURE__ */ function(ICoseKeyType2) {
|
|
850
|
+
var ICoseKeyType = /* @__PURE__ */ (function(ICoseKeyType2) {
|
|
850
851
|
ICoseKeyType2[ICoseKeyType2["OKP"] = 1] = "OKP";
|
|
851
852
|
ICoseKeyType2[ICoseKeyType2["EC2"] = 2] = "EC2";
|
|
852
853
|
ICoseKeyType2[ICoseKeyType2["RSA"] = 3] = "RSA";
|
|
853
854
|
ICoseKeyType2[ICoseKeyType2["Symmetric"] = 4] = "Symmetric";
|
|
854
855
|
ICoseKeyType2[ICoseKeyType2["Reserved"] = 0] = "Reserved";
|
|
855
856
|
return ICoseKeyType2;
|
|
856
|
-
}({});
|
|
857
|
-
var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2) {
|
|
857
|
+
})({});
|
|
858
|
+
var ICoseSignatureAlgorithm = /* @__PURE__ */ (function(ICoseSignatureAlgorithm2) {
|
|
858
859
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256"] = -7] = "ES256";
|
|
859
860
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES256K"] = -47] = "ES256K";
|
|
860
861
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["ES384"] = -35] = "ES384";
|
|
@@ -868,8 +869,8 @@ var ICoseSignatureAlgorithm = /* @__PURE__ */ function(ICoseSignatureAlgorithm2)
|
|
|
868
869
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS384"] = -38] = "PS384";
|
|
869
870
|
ICoseSignatureAlgorithm2[ICoseSignatureAlgorithm2["PS512"] = -39] = "PS512";
|
|
870
871
|
return ICoseSignatureAlgorithm2;
|
|
871
|
-
}({});
|
|
872
|
-
var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
|
|
872
|
+
})({});
|
|
873
|
+
var ICoseKeyOperation = /* @__PURE__ */ (function(ICoseKeyOperation2) {
|
|
873
874
|
ICoseKeyOperation2[ICoseKeyOperation2["SIGN"] = 1] = "SIGN";
|
|
874
875
|
ICoseKeyOperation2[ICoseKeyOperation2["VERIFY"] = 2] = "VERIFY";
|
|
875
876
|
ICoseKeyOperation2[ICoseKeyOperation2["ENCRYPT"] = 3] = "ENCRYPT";
|
|
@@ -881,8 +882,8 @@ var ICoseKeyOperation = /* @__PURE__ */ function(ICoseKeyOperation2) {
|
|
|
881
882
|
ICoseKeyOperation2[ICoseKeyOperation2["MAC_CREATE"] = 9] = "MAC_CREATE";
|
|
882
883
|
ICoseKeyOperation2[ICoseKeyOperation2["MAC_VERIFY"] = 10] = "MAC_VERIFY";
|
|
883
884
|
return ICoseKeyOperation2;
|
|
884
|
-
}({});
|
|
885
|
-
var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
|
|
885
|
+
})({});
|
|
886
|
+
var ICoseCurve = /* @__PURE__ */ (function(ICoseCurve2) {
|
|
886
887
|
ICoseCurve2[ICoseCurve2["P_256"] = 1] = "P_256";
|
|
887
888
|
ICoseCurve2[ICoseCurve2["P_384"] = 2] = "P_384";
|
|
888
889
|
ICoseCurve2[ICoseCurve2["P_521"] = 3] = "P_521";
|
|
@@ -892,18 +893,18 @@ var ICoseCurve = /* @__PURE__ */ function(ICoseCurve2) {
|
|
|
892
893
|
ICoseCurve2[ICoseCurve2["Ed448"] = 7] = "Ed448";
|
|
893
894
|
ICoseCurve2[ICoseCurve2["secp256k1"] = -1] = "secp256k1";
|
|
894
895
|
return ICoseCurve2;
|
|
895
|
-
}({});
|
|
896
|
+
})({});
|
|
896
897
|
|
|
897
898
|
// src/mapper/credential-constraints.ts
|
|
898
|
-
var StatusListCredentialIdMode = /* @__PURE__ */ function(StatusListCredentialIdMode2) {
|
|
899
|
+
var StatusListCredentialIdMode = /* @__PURE__ */ (function(StatusListCredentialIdMode2) {
|
|
899
900
|
StatusListCredentialIdMode2["ISSUANCE"] = "ISSUANCE";
|
|
900
901
|
StatusListCredentialIdMode2["NEVER"] = "NEVER";
|
|
901
902
|
return StatusListCredentialIdMode2;
|
|
902
|
-
}({});
|
|
903
|
-
var StatusListDriverType = /* @__PURE__ */ function(StatusListDriverType2) {
|
|
903
|
+
})({});
|
|
904
|
+
var StatusListDriverType = /* @__PURE__ */ (function(StatusListDriverType2) {
|
|
904
905
|
StatusListDriverType2["AGENT_TYPEORM"] = "agent_typeorm";
|
|
905
906
|
return StatusListDriverType2;
|
|
906
|
-
}({});
|
|
907
|
+
})({});
|
|
907
908
|
|
|
908
909
|
// src/mapper/credential-mapper.ts
|
|
909
910
|
import { jwtDecode } from "jwt-decode";
|
|
@@ -1039,7 +1040,7 @@ var CredentialMapper = class _CredentialMapper {
|
|
|
1039
1040
|
}
|
|
1040
1041
|
return {
|
|
1041
1042
|
type: _CredentialMapper.isSdJwtDecodedCredential(originalPresentation) ? "sd-jwt-vc-decoded" : "sd-jwt-vc-encoded",
|
|
1042
|
-
format: "
|
|
1043
|
+
format: "dc+sd-jwt",
|
|
1043
1044
|
original: originalPresentation,
|
|
1044
1045
|
presentation: decodedPresentation,
|
|
1045
1046
|
decoded: decodedPresentation.decodedPayload,
|
|
@@ -1133,7 +1134,7 @@ var CredentialMapper = class _CredentialMapper {
|
|
|
1133
1134
|
}
|
|
1134
1135
|
return {
|
|
1135
1136
|
type: _CredentialMapper.isSdJwtDecodedCredential(verifiableCredential) ? "sd-jwt-vc-decoded" : "sd-jwt-vc-encoded",
|
|
1136
|
-
format: "
|
|
1137
|
+
format: "dc+sd-jwt",
|
|
1137
1138
|
original: verifiableCredential,
|
|
1138
1139
|
credential: decodedCredential,
|
|
1139
1140
|
decoded: decodedCredential.decodedPayload
|
|
@@ -1578,14 +1579,14 @@ var CredentialMapper = class _CredentialMapper {
|
|
|
1578
1579
|
}
|
|
1579
1580
|
};
|
|
1580
1581
|
function isWrappedSdJwtVerifiableCredential(vc) {
|
|
1581
|
-
return vc.format === "
|
|
1582
|
+
return vc.format === "dc+sd-jwt";
|
|
1582
1583
|
}
|
|
1583
1584
|
__name(isWrappedSdJwtVerifiableCredential, "isWrappedSdJwtVerifiableCredential");
|
|
1584
1585
|
function isWrappedSdJwtVerifiablePresentation(vp) {
|
|
1585
|
-
return vp.format === "
|
|
1586
|
+
return vp.format === "dc+sd-jwt";
|
|
1586
1587
|
}
|
|
1587
1588
|
__name(isWrappedSdJwtVerifiablePresentation, "isWrappedSdJwtVerifiablePresentation");
|
|
1588
|
-
var OriginalType = /* @__PURE__ */ function(OriginalType2) {
|
|
1589
|
+
var OriginalType = /* @__PURE__ */ (function(OriginalType2) {
|
|
1589
1590
|
OriginalType2["JSONLD"] = "json-ld";
|
|
1590
1591
|
OriginalType2["JWT_ENCODED"] = "jwt-encoded";
|
|
1591
1592
|
OriginalType2["JWT_DECODED"] = "jwt-decoded";
|
|
@@ -1594,16 +1595,16 @@ var OriginalType = /* @__PURE__ */ function(OriginalType2) {
|
|
|
1594
1595
|
OriginalType2["MSO_MDOC_ENCODED"] = "mso_mdoc-encoded";
|
|
1595
1596
|
OriginalType2["MSO_MDOC_DECODED"] = "mso_mdoc-decoded";
|
|
1596
1597
|
return OriginalType2;
|
|
1597
|
-
}({});
|
|
1598
|
+
})({});
|
|
1598
1599
|
var JWT_PROOF_TYPE_2020 = "JwtProof2020";
|
|
1599
|
-
var DocumentFormat = /* @__PURE__ */ function(DocumentFormat2) {
|
|
1600
|
+
var DocumentFormat = /* @__PURE__ */ (function(DocumentFormat2) {
|
|
1600
1601
|
DocumentFormat2[DocumentFormat2["JWT"] = 0] = "JWT";
|
|
1601
1602
|
DocumentFormat2[DocumentFormat2["JSONLD"] = 1] = "JSONLD";
|
|
1602
1603
|
DocumentFormat2[DocumentFormat2["SD_JWT_VC"] = 2] = "SD_JWT_VC";
|
|
1603
1604
|
DocumentFormat2[DocumentFormat2["EIP712"] = 3] = "EIP712";
|
|
1604
1605
|
DocumentFormat2[DocumentFormat2["MSO_MDOC"] = 4] = "MSO_MDOC";
|
|
1605
1606
|
return DocumentFormat2;
|
|
1606
|
-
}({});
|
|
1607
|
+
})({});
|
|
1607
1608
|
|
|
1608
1609
|
// src/mapper/jsonld-language-values.ts
|
|
1609
1610
|
var isLanguageValueObject = /* @__PURE__ */ __name((claim) => {
|