@sphereon/ssi-types 0.34.1-next.91 → 0.36.0
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 +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -35
- package/dist/index.d.ts +45 -35
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/index.ts +1 -2
- package/src/mapper/credential-mapper.ts +33 -31
- package/src/types/datastore.ts +6 -0
- package/src/types/index.ts +1 -1
- package/src/types/sd-jwt-vc.ts +1 -3
- package/src/types/vc.ts +40 -0
- package/src/types/vcdm2-sdjwt/index.ts +2 -2
- package/src/types/vcdm2-sdjwt/sd-jwt-vc-config.ts +7 -7
- package/src/types/w3c-vc.ts +2 -3
- package/src/utils/mdoc.ts +4 -4
- package/src/utils/sd-jwt.ts +17 -12
- package/src/utils/vc.ts +1 -1
- package/src/types/dcql.ts +0 -39
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
ActionType: () => ActionType,
|
|
35
35
|
BasicEventEmitter: () => BasicEventEmitter,
|
|
36
36
|
CredentialMapper: () => CredentialMapper,
|
|
37
|
+
CredentialRole: () => CredentialRole,
|
|
37
38
|
DefaultActionSubType: () => DefaultActionSubType,
|
|
38
39
|
DocumentFormat: () => DocumentFormat,
|
|
39
40
|
EventManager: () => EventManager,
|
|
@@ -294,6 +295,15 @@ var SimpleRecordLogger = class extends SimpleLogger {
|
|
|
294
295
|
}
|
|
295
296
|
};
|
|
296
297
|
|
|
298
|
+
// src/types/datastore.ts
|
|
299
|
+
var CredentialRole = /* @__PURE__ */ (function(CredentialRole2) {
|
|
300
|
+
CredentialRole2["ISSUER"] = "ISSUER";
|
|
301
|
+
CredentialRole2["VERIFIER"] = "VERIFIER";
|
|
302
|
+
CredentialRole2["HOLDER"] = "HOLDER";
|
|
303
|
+
CredentialRole2["FEDERATION_TRUST_ANCHOR"] = "FEDERATION_TRUST_ANCHOR";
|
|
304
|
+
return CredentialRole2;
|
|
305
|
+
})({});
|
|
306
|
+
|
|
297
307
|
// src/events/index.ts
|
|
298
308
|
var import_events2 = require("events");
|
|
299
309
|
var System = /* @__PURE__ */ (function(System2) {
|
|
@@ -1091,6 +1101,7 @@ var CredentialMapper = class _CredentialMapper {
|
|
|
1091
1101
|
* an async hasher implementation, use the decodeSdJwtVcAsync method instead and you can provide the decoded payload to methods
|
|
1092
1102
|
* instead of the compact SD-JWT.
|
|
1093
1103
|
*
|
|
1104
|
+
* @param credential
|
|
1094
1105
|
* @param hasher Hasher implementation to use for SD-JWT decoding
|
|
1095
1106
|
*/
|
|
1096
1107
|
static decodeVerifiableCredential(credential, hasher) {
|
|
@@ -1127,7 +1138,8 @@ var CredentialMapper = class _CredentialMapper {
|
|
|
1127
1138
|
* an async hasher implementation, use the decodeSdJwtVcAsync method instead and you can provide the decoded payload to methods
|
|
1128
1139
|
* instead of the compact SD-JWT.
|
|
1129
1140
|
*
|
|
1130
|
-
* @param
|
|
1141
|
+
* @param originalPresentation
|
|
1142
|
+
* @param opts
|
|
1131
1143
|
*/
|
|
1132
1144
|
static toWrappedVerifiablePresentation(originalPresentation, opts) {
|
|
1133
1145
|
if (_CredentialMapper.isMsoMdocDecodedPresentation(originalPresentation) || _CredentialMapper.isMsoMdocOid4VPEncoded(originalPresentation)) {
|