@sphereon/ssi-sdk.vc-status-list 0.34.1-fix.79 → 0.34.1-next.278
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 +17 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +20 -15
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
- package/src/impl/StatusList2021.ts +6 -0
- package/src/impl/encoding/cbor.ts +14 -12
- package/src/types/BitstringStatusList.ts +1 -1
- package/src/types/index.ts +2 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
|
|
2
|
-
import { IIssuer, StatusListType, CredentialProofFormat, StatusListCredential, StatusListDriverType, StatusListIndexingDirection, StatusPurpose2021, ICredentialStatus, OrPromise, ICredential, IVerifiableCredential } from '@sphereon/ssi-types';
|
|
2
|
+
import { IIssuer, StatusListType, CredentialProofFormat, StatusListCredential, StatusListDriverType, StatusListIndexingDirection, StatusPurpose2021, StatusListCredentialIdMode, ICredentialStatus, OrPromise, ICredential, IVerifiableCredential } from '@sphereon/ssi-types';
|
|
3
3
|
import { IPluginMethodMap, IAgentContext, ICredentialIssuer, ICredentialVerifier, IKeyManager, CredentialPayload } from '@veramo/core';
|
|
4
4
|
import { DataSource } from 'typeorm';
|
|
5
5
|
import { StatusList, BitsPerStatus } from '@sd-jwt/jwt-status-list';
|
|
@@ -134,6 +134,7 @@ interface StatusListResult {
|
|
|
134
134
|
statusList2021?: {
|
|
135
135
|
indexingDirection: StatusListIndexingDirection;
|
|
136
136
|
statusPurpose: StatusPurpose2021;
|
|
137
|
+
credentialIdMode: StatusListCredentialIdMode;
|
|
137
138
|
};
|
|
138
139
|
oauthStatusList?: {
|
|
139
140
|
bitsPerStatus: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
|
|
2
|
-
import { IIssuer, StatusListType, CredentialProofFormat, StatusListCredential, StatusListDriverType, StatusListIndexingDirection, StatusPurpose2021, ICredentialStatus, OrPromise, ICredential, IVerifiableCredential } from '@sphereon/ssi-types';
|
|
2
|
+
import { IIssuer, StatusListType, CredentialProofFormat, StatusListCredential, StatusListDriverType, StatusListIndexingDirection, StatusPurpose2021, StatusListCredentialIdMode, ICredentialStatus, OrPromise, ICredential, IVerifiableCredential } from '@sphereon/ssi-types';
|
|
3
3
|
import { IPluginMethodMap, IAgentContext, ICredentialIssuer, ICredentialVerifier, IKeyManager, CredentialPayload } from '@veramo/core';
|
|
4
4
|
import { DataSource } from 'typeorm';
|
|
5
5
|
import { StatusList, BitsPerStatus } from '@sd-jwt/jwt-status-list';
|
|
@@ -134,6 +134,7 @@ interface StatusListResult {
|
|
|
134
134
|
statusList2021?: {
|
|
135
135
|
indexingDirection: StatusListIndexingDirection;
|
|
136
136
|
statusPurpose: StatusPurpose2021;
|
|
137
|
+
credentialIdMode: StatusListCredentialIdMode;
|
|
137
138
|
};
|
|
138
139
|
oauthStatusList?: {
|
|
139
140
|
bitsPerStatus: number;
|
package/dist/index.js
CHANGED
|
@@ -2,17 +2,17 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
4
|
// src/types/index.ts
|
|
5
|
-
var StatusOAuth = /* @__PURE__ */ function(StatusOAuth2) {
|
|
5
|
+
var StatusOAuth = /* @__PURE__ */ (function(StatusOAuth2) {
|
|
6
6
|
StatusOAuth2[StatusOAuth2["Valid"] = 0] = "Valid";
|
|
7
7
|
StatusOAuth2[StatusOAuth2["Invalid"] = 1] = "Invalid";
|
|
8
8
|
StatusOAuth2[StatusOAuth2["Suspended"] = 2] = "Suspended";
|
|
9
9
|
return StatusOAuth2;
|
|
10
|
-
}({});
|
|
11
|
-
var Status2021 = /* @__PURE__ */ function(Status20212) {
|
|
10
|
+
})({});
|
|
11
|
+
var Status2021 = /* @__PURE__ */ (function(Status20212) {
|
|
12
12
|
Status20212[Status20212["Valid"] = 0] = "Valid";
|
|
13
13
|
Status20212[Status20212["Invalid"] = 1] = "Invalid";
|
|
14
14
|
return Status20212;
|
|
15
|
-
}({});
|
|
15
|
+
})({});
|
|
16
16
|
|
|
17
17
|
// src/functions.ts
|
|
18
18
|
import { CredentialMapper as CredentialMapper4, StatusListType as StatusListType6 } from "@sphereon/ssi-types";
|
|
@@ -172,7 +172,7 @@ function ensureDate(value) {
|
|
|
172
172
|
__name(ensureDate, "ensureDate");
|
|
173
173
|
|
|
174
174
|
// src/impl/StatusList2021.ts
|
|
175
|
-
import { CredentialMapper as CredentialMapper2, DocumentFormat as DocumentFormat2, StatusListType as StatusListType2 } from "@sphereon/ssi-types";
|
|
175
|
+
import { CredentialMapper as CredentialMapper2, DocumentFormat as DocumentFormat2, StatusListCredentialIdMode, StatusListType as StatusListType2 } from "@sphereon/ssi-types";
|
|
176
176
|
import { StatusList } from "@sphereon/vc-status-list";
|
|
177
177
|
var DEFAULT_LIST_LENGTH = 25e4;
|
|
178
178
|
var DEFAULT_PROOF_FORMAT = "lds";
|
|
@@ -202,7 +202,8 @@ var StatusList2021Implementation = class {
|
|
|
202
202
|
statusListCredential,
|
|
203
203
|
statusList2021: {
|
|
204
204
|
statusPurpose,
|
|
205
|
-
indexingDirection: "rightToLeft"
|
|
205
|
+
indexingDirection: "rightToLeft",
|
|
206
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE
|
|
206
207
|
},
|
|
207
208
|
length,
|
|
208
209
|
type: StatusListType2.StatusList2021,
|
|
@@ -241,7 +242,8 @@ var StatusList2021Implementation = class {
|
|
|
241
242
|
encodedList,
|
|
242
243
|
statusList2021: {
|
|
243
244
|
statusPurpose: credentialSubject.statusPurpose,
|
|
244
|
-
indexingDirection: "rightToLeft"
|
|
245
|
+
indexingDirection: "rightToLeft",
|
|
246
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE
|
|
245
247
|
},
|
|
246
248
|
length: statusList.length - 1,
|
|
247
249
|
type: StatusListType2.StatusList2021,
|
|
@@ -278,7 +280,8 @@ var StatusList2021Implementation = class {
|
|
|
278
280
|
encodedList: newEncodedList,
|
|
279
281
|
statusList2021: {
|
|
280
282
|
statusPurpose: args.statusList2021.statusPurpose,
|
|
281
|
-
indexingDirection: "rightToLeft"
|
|
283
|
+
indexingDirection: "rightToLeft",
|
|
284
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE
|
|
282
285
|
},
|
|
283
286
|
length: statusList.length,
|
|
284
287
|
proofFormat: args.proofFormat ?? "lds",
|
|
@@ -340,7 +343,8 @@ var StatusList2021Implementation = class {
|
|
|
340
343
|
statusPurpose,
|
|
341
344
|
statusList2021: {
|
|
342
345
|
indexingDirection: "rightToLeft",
|
|
343
|
-
statusPurpose
|
|
346
|
+
statusPurpose,
|
|
347
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE
|
|
344
348
|
}
|
|
345
349
|
};
|
|
346
350
|
} else {
|
|
@@ -365,7 +369,8 @@ var StatusList2021Implementation = class {
|
|
|
365
369
|
statusPurpose: statusList2021Entity.statusPurpose,
|
|
366
370
|
statusList2021: {
|
|
367
371
|
indexingDirection: statusList2021Entity.indexingDirection,
|
|
368
|
-
statusPurpose: statusList2021Entity.statusPurpose
|
|
372
|
+
statusPurpose: statusList2021Entity.statusPurpose,
|
|
373
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE
|
|
369
374
|
}
|
|
370
375
|
};
|
|
371
376
|
}
|
|
@@ -514,12 +519,12 @@ var getSigningAlgo = /* @__PURE__ */ __name((type) => {
|
|
|
514
519
|
// src/impl/encoding/cbor.ts
|
|
515
520
|
import { StatusList as StatusList3 } from "@sd-jwt/jwt-status-list";
|
|
516
521
|
import { deflate, inflate } from "pako";
|
|
517
|
-
import
|
|
522
|
+
import mdocPkg from "@sphereon/kmp-mdoc-core";
|
|
518
523
|
import base64url2 from "base64url";
|
|
519
|
-
var { com, kotlin } =
|
|
520
|
-
var CborByteString = com.sphereon.cbor.CborByteString;
|
|
521
|
-
var CborUInt = com.sphereon.cbor.CborUInt;
|
|
522
|
-
var CborString = com.sphereon.cbor.CborString;
|
|
524
|
+
var { com, kotlin } = mdocPkg;
|
|
525
|
+
var CborByteString = mdocPkg.com.sphereon.cbor.CborByteString;
|
|
526
|
+
var CborUInt = mdocPkg.com.sphereon.cbor.CborUInt;
|
|
527
|
+
var CborString = mdocPkg.com.sphereon.cbor.CborString;
|
|
523
528
|
var decompressRawStatusList = StatusList3.decodeStatusList.bind(StatusList3);
|
|
524
529
|
var CWT_CLAIMS = {
|
|
525
530
|
SUBJECT: 2,
|