@sphereon/ssi-sdk.vc-status-list-issuer 0.34.0 → 0.34.1-feature.SSISDK.17.bitstring.sl.7
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/package.json +10 -10
- package/src/agent/StatusListPlugin.ts +16 -0
- package/src/functions.ts +1 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.vc-status-list-issuer",
|
|
3
3
|
"description": "Sphereon SSI-SDK plugin for Status List issuance",
|
|
4
|
-
"version": "0.34.
|
|
4
|
+
"version": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@sd-jwt/sd-jwt-vc": "^0.9.2",
|
|
32
32
|
"@sphereon/ssi-sdk-ext.did-utils": "0.29.0",
|
|
33
33
|
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.0",
|
|
34
|
-
"@sphereon/ssi-sdk.core": "0.34.
|
|
35
|
-
"@sphereon/ssi-sdk.vc-status-list": "0.34.
|
|
36
|
-
"@sphereon/ssi-sdk.vc-status-list-issuer-drivers": "0.34.
|
|
37
|
-
"@sphereon/ssi-types": "0.34.
|
|
34
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
35
|
+
"@sphereon/ssi-sdk.vc-status-list": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
36
|
+
"@sphereon/ssi-sdk.vc-status-list-issuer-drivers": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
37
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
38
38
|
"@sphereon/vc-status-list": "7.0.0-next.0",
|
|
39
39
|
"@veramo/core": "4.2.0",
|
|
40
40
|
"debug": "^4.3.5",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.29.0",
|
|
53
53
|
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.0",
|
|
54
54
|
"@sphereon/ssi-sdk-ext.jwt-service": "0.29.0",
|
|
55
|
-
"@sphereon/ssi-sdk.agent-config": "0.34.
|
|
56
|
-
"@sphereon/ssi-sdk.credential-vcdm": "0.34.
|
|
57
|
-
"@sphereon/ssi-sdk.credential-vcdm-jsonld-provider": "0.34.
|
|
58
|
-
"@sphereon/ssi-sdk.data-store": "0.34.
|
|
55
|
+
"@sphereon/ssi-sdk.agent-config": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
56
|
+
"@sphereon/ssi-sdk.credential-vcdm": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
57
|
+
"@sphereon/ssi-sdk.credential-vcdm-jsonld-provider": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
58
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.17.bitstring.sl.7+eb4b995a",
|
|
59
59
|
"@types/body-parser": "^1.19.5",
|
|
60
60
|
"@types/cookie-parser": "^1.4.7",
|
|
61
61
|
"@types/cors": "^2.8.17",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"SSI",
|
|
99
99
|
"StatusList2021"
|
|
100
100
|
],
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "eb4b995abb68a5aee39ad40c3ee996f2e1dff8da"
|
|
102
102
|
}
|
|
@@ -170,6 +170,7 @@ export class StatusListPlugin implements IAgentPlugin {
|
|
|
170
170
|
statusListDetails = await driver.createStatusList({
|
|
171
171
|
statusListCredential: sl.statusListCredential,
|
|
172
172
|
correlationId: sl.correlationId,
|
|
173
|
+
bitsPerStatus: this.selectBitsPerStatus(sl),
|
|
173
174
|
})
|
|
174
175
|
this.instances.push(this.createStatusListInstance(statusListDetails, dataSource, driver))
|
|
175
176
|
}
|
|
@@ -177,6 +178,21 @@ export class StatusListPlugin implements IAgentPlugin {
|
|
|
177
178
|
return statusListDetails
|
|
178
179
|
}
|
|
179
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Selects bitsPerStatus from the used status list type when applicable
|
|
183
|
+
* @param sl
|
|
184
|
+
* @private
|
|
185
|
+
*/
|
|
186
|
+
private selectBitsPerStatus(sl: StatusListResult) {
|
|
187
|
+
if (sl.bitstringStatusList) {
|
|
188
|
+
return sl.bitstringStatusList.bitsPerStatus
|
|
189
|
+
}
|
|
190
|
+
if (sl.oauthStatusList) {
|
|
191
|
+
return sl.oauthStatusList.bitsPerStatus
|
|
192
|
+
}
|
|
193
|
+
return 1
|
|
194
|
+
}
|
|
195
|
+
|
|
180
196
|
/**
|
|
181
197
|
* Adds status information to a credential by either:
|
|
182
198
|
* 1. Using existing status ID from the credential if present
|
package/src/functions.ts
CHANGED
|
@@ -211,11 +211,10 @@ export const handleCredentialStatus = async (
|
|
|
211
211
|
)
|
|
212
212
|
},
|
|
213
213
|
})
|
|
214
|
+
|
|
214
215
|
if (!credential.credentialStatus || Array.isArray(credential.credentialStatus)) {
|
|
215
216
|
credential.credentialStatus = {
|
|
216
217
|
id: `${statusListId}`,
|
|
217
|
-
type: 'StatusList2021Entry',
|
|
218
|
-
statusPurpose: 'revocation',
|
|
219
218
|
statusListCredential: statusListId,
|
|
220
219
|
...updateResult.credentialStatus,
|
|
221
220
|
}
|