@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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.vc-status-list",
|
|
3
3
|
"description": "Sphereon SSI-SDK plugin for Status List management, like StatusList2021.",
|
|
4
|
-
"version": "0.34.1-
|
|
4
|
+
"version": "0.34.1-next.278+0eacb25b",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
@@ -23,17 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@4sure-tech/vc-bitstring-status-lists": "0.1.0-unstable.1",
|
|
26
|
-
"@sd-jwt/core": "^0.
|
|
27
|
-
"@sd-jwt/jwt-status-list": "^0.
|
|
28
|
-
"@sd-jwt/sd-jwt-vc": "^0.
|
|
26
|
+
"@sd-jwt/core": "^0.15.0",
|
|
27
|
+
"@sd-jwt/jwt-status-list": "^0.15.0",
|
|
28
|
+
"@sd-jwt/sd-jwt-vc": "^0.15.1",
|
|
29
29
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
30
|
-
"@sphereon/oid4vci-common": "0.19.1-
|
|
31
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-
|
|
32
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-
|
|
33
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-
|
|
34
|
-
"@sphereon/ssi-sdk.credential-vcdm": "0.34.1-
|
|
35
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-
|
|
36
|
-
"@sphereon/ssi-types": "0.34.1-
|
|
30
|
+
"@sphereon/oid4vci-common": "0.19.1-next.220",
|
|
31
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-next.278+0eacb25b",
|
|
32
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-next.278+0eacb25b",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-next.278+0eacb25b",
|
|
34
|
+
"@sphereon/ssi-sdk.credential-vcdm": "0.34.1-next.278+0eacb25b",
|
|
35
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-next.278+0eacb25b",
|
|
36
|
+
"@sphereon/ssi-sdk.data-store-types": "0.34.1-next.278+0eacb25b",
|
|
37
|
+
"@sphereon/ssi-types": "0.34.1-next.278+0eacb25b",
|
|
37
38
|
"@sphereon/vc-status-list": "7.0.0-next.0",
|
|
38
39
|
"@veramo/core": "4.2.0",
|
|
39
40
|
"@veramo/credential-status": "4.2.0",
|
|
@@ -72,5 +73,5 @@
|
|
|
72
73
|
"SSI",
|
|
73
74
|
"StatusList2021"
|
|
74
75
|
],
|
|
75
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "0eacb25b6e38cef88d04d696d84e3c2ebcf89ede"
|
|
76
77
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
DocumentFormat,
|
|
7
7
|
type IIssuer,
|
|
8
8
|
type StatusListCredential,
|
|
9
|
+
StatusListCredentialIdMode,
|
|
9
10
|
StatusListType,
|
|
10
11
|
} from '@sphereon/ssi-types'
|
|
11
12
|
|
|
@@ -60,6 +61,7 @@ export class StatusList2021Implementation implements IStatusList {
|
|
|
60
61
|
statusList2021: {
|
|
61
62
|
statusPurpose,
|
|
62
63
|
indexingDirection: 'rightToLeft',
|
|
64
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE,
|
|
63
65
|
},
|
|
64
66
|
length,
|
|
65
67
|
type: StatusListType.StatusList2021,
|
|
@@ -108,6 +110,7 @@ export class StatusList2021Implementation implements IStatusList {
|
|
|
108
110
|
statusList2021: {
|
|
109
111
|
statusPurpose: credentialSubject.statusPurpose,
|
|
110
112
|
indexingDirection: 'rightToLeft',
|
|
113
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE,
|
|
111
114
|
},
|
|
112
115
|
length: statusList.length - 1,
|
|
113
116
|
type: StatusListType.StatusList2021,
|
|
@@ -153,6 +156,7 @@ export class StatusList2021Implementation implements IStatusList {
|
|
|
153
156
|
statusList2021: {
|
|
154
157
|
statusPurpose: args.statusList2021.statusPurpose,
|
|
155
158
|
indexingDirection: 'rightToLeft',
|
|
159
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE,
|
|
156
160
|
},
|
|
157
161
|
length: statusList.length,
|
|
158
162
|
proofFormat: args.proofFormat ?? 'lds',
|
|
@@ -224,6 +228,7 @@ export class StatusList2021Implementation implements IStatusList {
|
|
|
224
228
|
statusList2021: {
|
|
225
229
|
indexingDirection: 'rightToLeft',
|
|
226
230
|
statusPurpose,
|
|
231
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE,
|
|
227
232
|
},
|
|
228
233
|
}
|
|
229
234
|
} else {
|
|
@@ -251,6 +256,7 @@ export class StatusList2021Implementation implements IStatusList {
|
|
|
251
256
|
statusList2021: {
|
|
252
257
|
indexingDirection: statusList2021Entity.indexingDirection,
|
|
253
258
|
statusPurpose: statusList2021Entity.statusPurpose,
|
|
259
|
+
credentialIdMode: StatusListCredentialIdMode.ISSUANCE,
|
|
254
260
|
},
|
|
255
261
|
}
|
|
256
262
|
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import type { BitsPerStatus } from '@sd-jwt/jwt-status-list'
|
|
2
2
|
import { StatusList } from '@sd-jwt/jwt-status-list'
|
|
3
3
|
import { deflate, inflate } from 'pako'
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
import mdocPkg from '@sphereon/kmp-mdoc-core'
|
|
6
|
+
const { com, kotlin } = mdocPkg
|
|
7
|
+
|
|
6
8
|
import base64url from 'base64url'
|
|
7
9
|
import type { IRequiredContext, SignedStatusListData } from '../../types'
|
|
8
10
|
import { type DecodedStatusListPayload, resolveIdentifier } from './common'
|
|
9
11
|
|
|
10
|
-
export type IKey =
|
|
11
|
-
export type CborItem<T> =
|
|
12
|
-
export const CborByteString = com.sphereon.cbor.CborByteString
|
|
13
|
-
export type CborByteStringType =
|
|
14
|
-
export const CborUInt = com.sphereon.cbor.CborUInt
|
|
15
|
-
export type CborUIntType =
|
|
16
|
-
export const CborString = com.sphereon.cbor.CborString
|
|
17
|
-
export type CborStringType =
|
|
12
|
+
export type IKey = mdocPkg.com.sphereon.crypto.IKey
|
|
13
|
+
export type CborItem<T> = mdocPkg.com.sphereon.cbor.CborItem<T>
|
|
14
|
+
export const CborByteString = mdocPkg.com.sphereon.cbor.CborByteString
|
|
15
|
+
export type CborByteStringType = mdocPkg.com.sphereon.cbor.CborByteString
|
|
16
|
+
export const CborUInt = mdocPkg.com.sphereon.cbor.CborUInt
|
|
17
|
+
export type CborUIntType = mdocPkg.com.sphereon.cbor.CborUInt
|
|
18
|
+
export const CborString = mdocPkg.com.sphereon.cbor.CborString
|
|
19
|
+
export type CborStringType = mdocPkg.com.sphereon.cbor.CborString
|
|
18
20
|
|
|
19
21
|
// const cbor = cborpkg.com.sphereon.cbor
|
|
20
|
-
// const kmp = cborpkg.com.sphereon.kmp
|
|
22
|
+
// const kmp = cborpkg. mdoc.com.sphereon.kmp
|
|
21
23
|
// const kotlin = cborpkg.kotlin
|
|
22
24
|
const decompressRawStatusList = (StatusList as any).decodeStatusList.bind(StatusList)
|
|
23
25
|
|
|
@@ -93,7 +95,7 @@ export const createSignedCbor = async (
|
|
|
93
95
|
function buildClaimsMap(
|
|
94
96
|
id: string,
|
|
95
97
|
issuerString: string,
|
|
96
|
-
statusListMap:
|
|
98
|
+
statusListMap: mdocPkg.com.sphereon.cbor.CborMap<CborStringType, CborItem<any>>,
|
|
97
99
|
expiresAt?: Date,
|
|
98
100
|
) {
|
|
99
101
|
const ttl = 65535 // FIXME figure out what value should be / come from and what the difference is with exp
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { BitstringStatusListCredentialUnsigned } from '@4sure-tech/vc-bitstring-status-lists'
|
|
1
2
|
import { StatusListCredential } from '@sphereon/ssi-types'
|
|
2
|
-
import { BitstringStatusListCredentialUnsigned } from '../../../../../vc-bitstring-status-lists'
|
|
3
3
|
|
|
4
4
|
export type BitstringStatusListCredential = BitstringStatusListCredentialUnsigned & StatusListCredential
|
package/src/types/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type IVerifiableCredential,
|
|
8
8
|
type OrPromise,
|
|
9
9
|
type StatusListCredential,
|
|
10
|
+
StatusListCredentialIdMode,
|
|
10
11
|
StatusListDriverType,
|
|
11
12
|
type StatusListIndexingDirection,
|
|
12
13
|
StatusListType,
|
|
@@ -112,6 +113,7 @@ export interface StatusListResult {
|
|
|
112
113
|
statusList2021?: {
|
|
113
114
|
indexingDirection: StatusListIndexingDirection
|
|
114
115
|
statusPurpose: StatusPurpose2021
|
|
116
|
+
credentialIdMode: StatusListCredentialIdMode
|
|
115
117
|
}
|
|
116
118
|
oauthStatusList?: {
|
|
117
119
|
bitsPerStatus: number
|