@sphereon/ssi-sdk.vc-status-list 0.34.1-feature.SSISDK.17.bitstring.sl.11 → 0.34.1-feature.SSISDK.17.bitstring.sl.14
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 +395 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -41
- package/dist/index.d.ts +75 -41
- package/dist/index.js +396 -217
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/functions.ts +50 -62
- package/src/impl/BitstringStatusListImplementation.ts +265 -121
- package/src/impl/IStatusList.ts +43 -11
- package/src/impl/OAuthStatusList.ts +81 -33
- package/src/impl/StatusList2021.ts +79 -39
- package/src/index.ts +1 -0
- package/src/types/index.ts +22 -36
- package/src/utils.ts +48 -19
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,61 @@
|
|
|
1
1
|
import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
|
|
2
|
-
import {
|
|
3
|
-
import { IPluginMethodMap, IAgentContext, ICredentialIssuer, ICredentialVerifier, IKeyManager,
|
|
2
|
+
import { IIssuer, StatusListType, CredentialProofFormat, StatusListCredential, StatusListDriverType, StatusListIndexingDirection, StatusPurpose2021, ICredentialStatus, OrPromise, ICredential, IVerifiableCredential } from '@sphereon/ssi-types';
|
|
3
|
+
import { IPluginMethodMap, IAgentContext, ICredentialIssuer, ICredentialVerifier, IKeyManager, CredentialPayload } from '@veramo/core';
|
|
4
4
|
import { DataSource } from 'typeorm';
|
|
5
|
-
import { BitsPerStatus } from '@sd-jwt/jwt-status-list';
|
|
5
|
+
import { StatusList, BitsPerStatus } from '@sd-jwt/jwt-status-list';
|
|
6
6
|
import { SdJwtVcPayload } from '@sd-jwt/sd-jwt-vc';
|
|
7
7
|
import { StatusListOpts } from '@sphereon/oid4vci-common';
|
|
8
8
|
import { BitstringStatusPurpose } from '@4sure-tech/vc-bitstring-status-lists';
|
|
9
|
-
import {
|
|
9
|
+
import { IVcdmCredentialPlugin } from '@sphereon/ssi-sdk.credential-vcdm';
|
|
10
|
+
import { BitstringStatusListArgs, IStatusListEntity, StatusListEntity, IStatusListEntryEntity, IBitstringStatusListEntryEntity, BitstringStatusListEntryCredentialStatus } from '@sphereon/ssi-sdk.data-store';
|
|
10
11
|
import { StatusMethod } from 'credential-status';
|
|
11
12
|
|
|
13
|
+
interface DecodedStatusListPayload {
|
|
14
|
+
issuer: string;
|
|
15
|
+
id: string;
|
|
16
|
+
statusList: StatusList;
|
|
17
|
+
exp?: number;
|
|
18
|
+
ttl?: number;
|
|
19
|
+
iat: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface IExtractedCredentialDetails {
|
|
23
|
+
id: string;
|
|
24
|
+
issuer: string | IIssuer;
|
|
25
|
+
encodedList: string;
|
|
26
|
+
decodedPayload?: DecodedStatusListPayload;
|
|
27
|
+
}
|
|
28
|
+
interface IStatusListImplementationResult {
|
|
29
|
+
id: string;
|
|
30
|
+
encodedList: string;
|
|
31
|
+
issuer: string | IIssuer;
|
|
32
|
+
type: StatusListType;
|
|
33
|
+
proofFormat: CredentialProofFormat;
|
|
34
|
+
length: number;
|
|
35
|
+
statusListCredential: StatusListCredential;
|
|
36
|
+
statuslistContentType: string;
|
|
37
|
+
correlationId?: string;
|
|
38
|
+
driverType?: StatusListDriverType;
|
|
39
|
+
}
|
|
40
|
+
interface IStatusList2021ImplementationResult extends IStatusListImplementationResult {
|
|
41
|
+
type: StatusListType.StatusList2021;
|
|
42
|
+
indexingDirection: StatusListIndexingDirection;
|
|
43
|
+
statusPurpose: StatusPurpose2021;
|
|
44
|
+
}
|
|
45
|
+
interface IOAuthStatusListImplementationResult extends IStatusListImplementationResult {
|
|
46
|
+
type: StatusListType.OAuthStatusList;
|
|
47
|
+
bitsPerStatus: number;
|
|
48
|
+
expiresAt?: Date;
|
|
49
|
+
}
|
|
50
|
+
interface IBitstringStatusListImplementationResult extends IStatusListImplementationResult {
|
|
51
|
+
type: StatusListType.BitstringStatusList;
|
|
52
|
+
statusPurpose: BitstringStatusPurpose | BitstringStatusPurpose[];
|
|
53
|
+
bitsPerStatus?: number;
|
|
54
|
+
validFrom?: Date;
|
|
55
|
+
validUntil?: Date;
|
|
56
|
+
ttl?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
12
59
|
declare enum StatusOAuth {
|
|
13
60
|
Valid = 0,
|
|
14
61
|
Invalid = 1,
|
|
@@ -18,7 +65,6 @@ declare enum Status2021 {
|
|
|
18
65
|
Valid = 0,
|
|
19
66
|
Invalid = 1
|
|
20
67
|
}
|
|
21
|
-
type BitstringStatus = number;
|
|
22
68
|
type StatusList2021Args = {
|
|
23
69
|
indexingDirection: StatusListIndexingDirection;
|
|
24
70
|
statusPurpose?: StatusPurpose2021;
|
|
@@ -27,13 +73,6 @@ type OAuthStatusListArgs = {
|
|
|
27
73
|
bitsPerStatus: BitsPerStatus;
|
|
28
74
|
expiresAt?: Date;
|
|
29
75
|
};
|
|
30
|
-
type BitstringStatusListArgs = {
|
|
31
|
-
statusPurpose: BitstringStatusPurpose;
|
|
32
|
-
bitsPerStatus: number;
|
|
33
|
-
ttl?: number;
|
|
34
|
-
validFrom?: Date;
|
|
35
|
-
validUntil?: Date;
|
|
36
|
-
};
|
|
37
76
|
type BaseCreateNewStatusListArgs = {
|
|
38
77
|
type: StatusListType;
|
|
39
78
|
id: string;
|
|
@@ -79,7 +118,7 @@ interface UpdateStatusListFromStatusListCredentialArgs {
|
|
|
79
118
|
statusListCredential: StatusListCredential;
|
|
80
119
|
keyRef?: string;
|
|
81
120
|
statusListIndex: number | string;
|
|
82
|
-
value: number | Status2021 | StatusOAuth
|
|
121
|
+
value: number | Status2021 | StatusOAuth;
|
|
83
122
|
}
|
|
84
123
|
interface StatusListResult {
|
|
85
124
|
id: string;
|
|
@@ -128,15 +167,6 @@ interface StatusListOAuthEntryCredentialStatus extends ICredentialStatus {
|
|
|
128
167
|
statusListCredential: string;
|
|
129
168
|
expiresAt?: Date;
|
|
130
169
|
}
|
|
131
|
-
interface BitstringStatusListEntryCredentialStatus extends ICredentialStatus {
|
|
132
|
-
type: 'BitstringStatusListEntry';
|
|
133
|
-
statusPurpose: BitstringStatusPurpose | BitstringStatusPurpose[];
|
|
134
|
-
statusListIndex: string;
|
|
135
|
-
statusListCredential: string;
|
|
136
|
-
bitsPerStatus?: number;
|
|
137
|
-
statusMessage?: Array<BitstringStatus>;
|
|
138
|
-
statusReference?: string | string[];
|
|
139
|
-
}
|
|
140
170
|
interface StatusList2021ToVerifiableCredentialArgs {
|
|
141
171
|
issuer: string | IIssuer;
|
|
142
172
|
id: string;
|
|
@@ -160,7 +190,7 @@ interface CreateStatusListArgs {
|
|
|
160
190
|
interface UpdateStatusListIndexArgs {
|
|
161
191
|
statusListCredential: StatusListCredential;
|
|
162
192
|
statusListIndex: number | string;
|
|
163
|
-
value: number | Status2021 | StatusOAuth
|
|
193
|
+
value: number | Status2021 | StatusOAuth;
|
|
164
194
|
bitsPerStatus?: number;
|
|
165
195
|
keyRef?: string;
|
|
166
196
|
expiresAt?: Date;
|
|
@@ -170,11 +200,16 @@ interface CheckStatusIndexArgs {
|
|
|
170
200
|
statusListIndex: string | number;
|
|
171
201
|
bitsPerStatus?: number;
|
|
172
202
|
}
|
|
173
|
-
interface
|
|
174
|
-
|
|
203
|
+
interface IToDetailsFromCredentialArgs {
|
|
204
|
+
statusListCredential: StatusListCredential;
|
|
205
|
+
statusListType: StatusListType;
|
|
206
|
+
bitsPerStatus?: number;
|
|
175
207
|
correlationId?: string;
|
|
176
208
|
driverType?: StatusListDriverType;
|
|
177
|
-
|
|
209
|
+
}
|
|
210
|
+
interface IMergeDetailsWithEntityArgs {
|
|
211
|
+
extractedDetails: IExtractedCredentialDetails;
|
|
212
|
+
statusListEntity: IStatusListEntity;
|
|
178
213
|
}
|
|
179
214
|
/**
|
|
180
215
|
* The interface definition for a plugin that can add statuslist info to a credential
|
|
@@ -248,8 +283,8 @@ type SignedStatusListData = {
|
|
|
248
283
|
statusListCredential: StatusListCredential;
|
|
249
284
|
encodedList: string;
|
|
250
285
|
};
|
|
251
|
-
type IRequiredPlugins =
|
|
252
|
-
type IRequiredContext = IAgentContext<ICredentialIssuer & ICredentialVerifier & IIdentifierResolution & IKeyManager &
|
|
286
|
+
type IRequiredPlugins = IVcdmCredentialPlugin & IIdentifierResolution;
|
|
287
|
+
type IRequiredContext = IAgentContext<ICredentialIssuer & ICredentialVerifier & IIdentifierResolution & IKeyManager & IVcdmCredentialPlugin>;
|
|
253
288
|
|
|
254
289
|
declare function fetchStatusListCredential(args: {
|
|
255
290
|
statusListCredential: string;
|
|
@@ -297,7 +332,7 @@ declare function simpleCheckStatusFromStatusListUrl(args: {
|
|
|
297
332
|
type?: StatusListType | 'StatusList2021Entry';
|
|
298
333
|
id?: string;
|
|
299
334
|
statusListIndex: string;
|
|
300
|
-
}): Promise<number | Status2021 | StatusOAuth
|
|
335
|
+
}): Promise<number | Status2021 | StatusOAuth>;
|
|
301
336
|
declare function checkStatusIndexFromStatusListCredential(args: {
|
|
302
337
|
statusListCredential: StatusListCredential;
|
|
303
338
|
statusPurpose?: StatusPurpose2021 | string | string[];
|
|
@@ -305,21 +340,20 @@ declare function checkStatusIndexFromStatusListCredential(args: {
|
|
|
305
340
|
id?: string;
|
|
306
341
|
statusListIndex: string | number;
|
|
307
342
|
bitsPerStatus?: number;
|
|
308
|
-
}): Promise<number | Status2021 | StatusOAuth
|
|
309
|
-
declare function createNewStatusList(args: CreateNewStatusListFuncArgs, context: IAgentContext<(
|
|
310
|
-
declare function updateStatusIndexFromStatusListCredential(args: UpdateStatusListIndexArgs, context: IAgentContext<
|
|
311
|
-
declare function
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
driverType?: StatusListDriverType;
|
|
315
|
-
bitsPerStatus?: number;
|
|
316
|
-
}): Promise<StatusListResult & Partial<IAddStatusListArgs>>;
|
|
343
|
+
}): Promise<number | Status2021 | StatusOAuth>;
|
|
344
|
+
declare function createNewStatusList(args: CreateNewStatusListFuncArgs, context: IAgentContext<(IVcdmCredentialPlugin | any) & IIdentifierResolution>): Promise<StatusListResult>;
|
|
345
|
+
declare function updateStatusIndexFromStatusListCredential(args: UpdateStatusListIndexArgs, context: IAgentContext<IVcdmCredentialPlugin & IIdentifierResolution>): Promise<StatusListResult>;
|
|
346
|
+
declare function extractCredentialDetails(statusListCredential: StatusListCredential): Promise<IExtractedCredentialDetails>;
|
|
347
|
+
declare function toStatusListDetails(args: IToDetailsFromCredentialArgs): Promise<StatusListResult & (IStatusList2021ImplementationResult | IOAuthStatusListImplementationResult | IBitstringStatusListImplementationResult)>;
|
|
348
|
+
declare function toStatusListDetails(args: IMergeDetailsWithEntityArgs): Promise<StatusListResult & (IStatusList2021ImplementationResult | IOAuthStatusListImplementationResult | IBitstringStatusListImplementationResult)>;
|
|
317
349
|
declare function createCredentialStatusFromStatusList(args: {
|
|
318
350
|
statusList: StatusListEntity;
|
|
319
351
|
statusListEntry: IStatusListEntryEntity | IBitstringStatusListEntryEntity;
|
|
320
352
|
statusListIndex: number;
|
|
321
353
|
}): Promise<StatusList2021EntryCredentialStatus | StatusListOAuthEntryCredentialStatus | BitstringStatusListEntryCredentialStatus>;
|
|
322
|
-
declare function updateStatusListIndexFromEncodedList(args: UpdateStatusListFromEncodedListArgs, context: IAgentContext<
|
|
323
|
-
declare function statusList2021ToVerifiableCredential(args: StatusList2021ToVerifiableCredentialArgs, context: IAgentContext<
|
|
354
|
+
declare function updateStatusListIndexFromEncodedList(args: UpdateStatusListFromEncodedListArgs, context: IAgentContext<IVcdmCredentialPlugin & IIdentifierResolution>): Promise<StatusListResult>;
|
|
355
|
+
declare function statusList2021ToVerifiableCredential(args: StatusList2021ToVerifiableCredentialArgs, context: IAgentContext<IVcdmCredentialPlugin & IIdentifierResolution>): Promise<StatusListCredential>;
|
|
356
|
+
|
|
357
|
+
declare function determineStatusListType(credential: StatusListCredential): StatusListType;
|
|
324
358
|
|
|
325
|
-
export { type BaseCreateNewStatusListArgs, type
|
|
359
|
+
export { type BaseCreateNewStatusListArgs, type CheckStatusIndexArgs, type CreateNewStatusListArgs, type CreateNewStatusListFuncArgs, type CreateStatusListArgs, type CredentialWithStatusSupport, type GetStatusListArgs, type IAddStatusToCredentialArgs, type IAddStatusToSdJwtCredentialArgs, type IIssueCredentialStatusOpts, type IMergeDetailsWithEntityArgs, type IRequiredContext, type IRequiredPlugins, type IStatusListPlugin, type IToDetailsFromCredentialArgs, type OAuthStatusListArgs, type SignedStatusListData, Status2021, type StatusList2021Args, type StatusList2021EntryCredentialStatus, type StatusList2021ToVerifiableCredentialArgs, type StatusListOAuthEntryCredentialStatus, type StatusListResult, StatusOAuth, type UpdateBitstringStatusListArgs, type UpdateOAuthStatusListArgs, type UpdateStatusList2021Args, type UpdateStatusListFromEncodedListArgs, type UpdateStatusListFromStatusListCredentialArgs, type UpdateStatusListIndexArgs, checkStatusForCredential, checkStatusIndexFromStatusListCredential, createCredentialStatusFromStatusList, createNewStatusList, determineStatusListType, extractCredentialDetails, fetchStatusListCredential, simpleCheckStatusFromStatusListUrl, statusList2021ToVerifiableCredential, statusPluginStatusFunction, toStatusListDetails, updateStatusIndexFromStatusListCredential, updateStatusListIndexFromEncodedList, vcLibCheckStatusFunction };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,61 @@
|
|
|
1
1
|
import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
|
|
2
|
-
import {
|
|
3
|
-
import { IPluginMethodMap, IAgentContext, ICredentialIssuer, ICredentialVerifier, IKeyManager,
|
|
2
|
+
import { IIssuer, StatusListType, CredentialProofFormat, StatusListCredential, StatusListDriverType, StatusListIndexingDirection, StatusPurpose2021, ICredentialStatus, OrPromise, ICredential, IVerifiableCredential } from '@sphereon/ssi-types';
|
|
3
|
+
import { IPluginMethodMap, IAgentContext, ICredentialIssuer, ICredentialVerifier, IKeyManager, CredentialPayload } from '@veramo/core';
|
|
4
4
|
import { DataSource } from 'typeorm';
|
|
5
|
-
import { BitsPerStatus } from '@sd-jwt/jwt-status-list';
|
|
5
|
+
import { StatusList, BitsPerStatus } from '@sd-jwt/jwt-status-list';
|
|
6
6
|
import { SdJwtVcPayload } from '@sd-jwt/sd-jwt-vc';
|
|
7
7
|
import { StatusListOpts } from '@sphereon/oid4vci-common';
|
|
8
8
|
import { BitstringStatusPurpose } from '@4sure-tech/vc-bitstring-status-lists';
|
|
9
|
-
import {
|
|
9
|
+
import { IVcdmCredentialPlugin } from '@sphereon/ssi-sdk.credential-vcdm';
|
|
10
|
+
import { BitstringStatusListArgs, IStatusListEntity, StatusListEntity, IStatusListEntryEntity, IBitstringStatusListEntryEntity, BitstringStatusListEntryCredentialStatus } from '@sphereon/ssi-sdk.data-store';
|
|
10
11
|
import { StatusMethod } from 'credential-status';
|
|
11
12
|
|
|
13
|
+
interface DecodedStatusListPayload {
|
|
14
|
+
issuer: string;
|
|
15
|
+
id: string;
|
|
16
|
+
statusList: StatusList;
|
|
17
|
+
exp?: number;
|
|
18
|
+
ttl?: number;
|
|
19
|
+
iat: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface IExtractedCredentialDetails {
|
|
23
|
+
id: string;
|
|
24
|
+
issuer: string | IIssuer;
|
|
25
|
+
encodedList: string;
|
|
26
|
+
decodedPayload?: DecodedStatusListPayload;
|
|
27
|
+
}
|
|
28
|
+
interface IStatusListImplementationResult {
|
|
29
|
+
id: string;
|
|
30
|
+
encodedList: string;
|
|
31
|
+
issuer: string | IIssuer;
|
|
32
|
+
type: StatusListType;
|
|
33
|
+
proofFormat: CredentialProofFormat;
|
|
34
|
+
length: number;
|
|
35
|
+
statusListCredential: StatusListCredential;
|
|
36
|
+
statuslistContentType: string;
|
|
37
|
+
correlationId?: string;
|
|
38
|
+
driverType?: StatusListDriverType;
|
|
39
|
+
}
|
|
40
|
+
interface IStatusList2021ImplementationResult extends IStatusListImplementationResult {
|
|
41
|
+
type: StatusListType.StatusList2021;
|
|
42
|
+
indexingDirection: StatusListIndexingDirection;
|
|
43
|
+
statusPurpose: StatusPurpose2021;
|
|
44
|
+
}
|
|
45
|
+
interface IOAuthStatusListImplementationResult extends IStatusListImplementationResult {
|
|
46
|
+
type: StatusListType.OAuthStatusList;
|
|
47
|
+
bitsPerStatus: number;
|
|
48
|
+
expiresAt?: Date;
|
|
49
|
+
}
|
|
50
|
+
interface IBitstringStatusListImplementationResult extends IStatusListImplementationResult {
|
|
51
|
+
type: StatusListType.BitstringStatusList;
|
|
52
|
+
statusPurpose: BitstringStatusPurpose | BitstringStatusPurpose[];
|
|
53
|
+
bitsPerStatus?: number;
|
|
54
|
+
validFrom?: Date;
|
|
55
|
+
validUntil?: Date;
|
|
56
|
+
ttl?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
12
59
|
declare enum StatusOAuth {
|
|
13
60
|
Valid = 0,
|
|
14
61
|
Invalid = 1,
|
|
@@ -18,7 +65,6 @@ declare enum Status2021 {
|
|
|
18
65
|
Valid = 0,
|
|
19
66
|
Invalid = 1
|
|
20
67
|
}
|
|
21
|
-
type BitstringStatus = number;
|
|
22
68
|
type StatusList2021Args = {
|
|
23
69
|
indexingDirection: StatusListIndexingDirection;
|
|
24
70
|
statusPurpose?: StatusPurpose2021;
|
|
@@ -27,13 +73,6 @@ type OAuthStatusListArgs = {
|
|
|
27
73
|
bitsPerStatus: BitsPerStatus;
|
|
28
74
|
expiresAt?: Date;
|
|
29
75
|
};
|
|
30
|
-
type BitstringStatusListArgs = {
|
|
31
|
-
statusPurpose: BitstringStatusPurpose;
|
|
32
|
-
bitsPerStatus: number;
|
|
33
|
-
ttl?: number;
|
|
34
|
-
validFrom?: Date;
|
|
35
|
-
validUntil?: Date;
|
|
36
|
-
};
|
|
37
76
|
type BaseCreateNewStatusListArgs = {
|
|
38
77
|
type: StatusListType;
|
|
39
78
|
id: string;
|
|
@@ -79,7 +118,7 @@ interface UpdateStatusListFromStatusListCredentialArgs {
|
|
|
79
118
|
statusListCredential: StatusListCredential;
|
|
80
119
|
keyRef?: string;
|
|
81
120
|
statusListIndex: number | string;
|
|
82
|
-
value: number | Status2021 | StatusOAuth
|
|
121
|
+
value: number | Status2021 | StatusOAuth;
|
|
83
122
|
}
|
|
84
123
|
interface StatusListResult {
|
|
85
124
|
id: string;
|
|
@@ -128,15 +167,6 @@ interface StatusListOAuthEntryCredentialStatus extends ICredentialStatus {
|
|
|
128
167
|
statusListCredential: string;
|
|
129
168
|
expiresAt?: Date;
|
|
130
169
|
}
|
|
131
|
-
interface BitstringStatusListEntryCredentialStatus extends ICredentialStatus {
|
|
132
|
-
type: 'BitstringStatusListEntry';
|
|
133
|
-
statusPurpose: BitstringStatusPurpose | BitstringStatusPurpose[];
|
|
134
|
-
statusListIndex: string;
|
|
135
|
-
statusListCredential: string;
|
|
136
|
-
bitsPerStatus?: number;
|
|
137
|
-
statusMessage?: Array<BitstringStatus>;
|
|
138
|
-
statusReference?: string | string[];
|
|
139
|
-
}
|
|
140
170
|
interface StatusList2021ToVerifiableCredentialArgs {
|
|
141
171
|
issuer: string | IIssuer;
|
|
142
172
|
id: string;
|
|
@@ -160,7 +190,7 @@ interface CreateStatusListArgs {
|
|
|
160
190
|
interface UpdateStatusListIndexArgs {
|
|
161
191
|
statusListCredential: StatusListCredential;
|
|
162
192
|
statusListIndex: number | string;
|
|
163
|
-
value: number | Status2021 | StatusOAuth
|
|
193
|
+
value: number | Status2021 | StatusOAuth;
|
|
164
194
|
bitsPerStatus?: number;
|
|
165
195
|
keyRef?: string;
|
|
166
196
|
expiresAt?: Date;
|
|
@@ -170,11 +200,16 @@ interface CheckStatusIndexArgs {
|
|
|
170
200
|
statusListIndex: string | number;
|
|
171
201
|
bitsPerStatus?: number;
|
|
172
202
|
}
|
|
173
|
-
interface
|
|
174
|
-
|
|
203
|
+
interface IToDetailsFromCredentialArgs {
|
|
204
|
+
statusListCredential: StatusListCredential;
|
|
205
|
+
statusListType: StatusListType;
|
|
206
|
+
bitsPerStatus?: number;
|
|
175
207
|
correlationId?: string;
|
|
176
208
|
driverType?: StatusListDriverType;
|
|
177
|
-
|
|
209
|
+
}
|
|
210
|
+
interface IMergeDetailsWithEntityArgs {
|
|
211
|
+
extractedDetails: IExtractedCredentialDetails;
|
|
212
|
+
statusListEntity: IStatusListEntity;
|
|
178
213
|
}
|
|
179
214
|
/**
|
|
180
215
|
* The interface definition for a plugin that can add statuslist info to a credential
|
|
@@ -248,8 +283,8 @@ type SignedStatusListData = {
|
|
|
248
283
|
statusListCredential: StatusListCredential;
|
|
249
284
|
encodedList: string;
|
|
250
285
|
};
|
|
251
|
-
type IRequiredPlugins =
|
|
252
|
-
type IRequiredContext = IAgentContext<ICredentialIssuer & ICredentialVerifier & IIdentifierResolution & IKeyManager &
|
|
286
|
+
type IRequiredPlugins = IVcdmCredentialPlugin & IIdentifierResolution;
|
|
287
|
+
type IRequiredContext = IAgentContext<ICredentialIssuer & ICredentialVerifier & IIdentifierResolution & IKeyManager & IVcdmCredentialPlugin>;
|
|
253
288
|
|
|
254
289
|
declare function fetchStatusListCredential(args: {
|
|
255
290
|
statusListCredential: string;
|
|
@@ -297,7 +332,7 @@ declare function simpleCheckStatusFromStatusListUrl(args: {
|
|
|
297
332
|
type?: StatusListType | 'StatusList2021Entry';
|
|
298
333
|
id?: string;
|
|
299
334
|
statusListIndex: string;
|
|
300
|
-
}): Promise<number | Status2021 | StatusOAuth
|
|
335
|
+
}): Promise<number | Status2021 | StatusOAuth>;
|
|
301
336
|
declare function checkStatusIndexFromStatusListCredential(args: {
|
|
302
337
|
statusListCredential: StatusListCredential;
|
|
303
338
|
statusPurpose?: StatusPurpose2021 | string | string[];
|
|
@@ -305,21 +340,20 @@ declare function checkStatusIndexFromStatusListCredential(args: {
|
|
|
305
340
|
id?: string;
|
|
306
341
|
statusListIndex: string | number;
|
|
307
342
|
bitsPerStatus?: number;
|
|
308
|
-
}): Promise<number | Status2021 | StatusOAuth
|
|
309
|
-
declare function createNewStatusList(args: CreateNewStatusListFuncArgs, context: IAgentContext<(
|
|
310
|
-
declare function updateStatusIndexFromStatusListCredential(args: UpdateStatusListIndexArgs, context: IAgentContext<
|
|
311
|
-
declare function
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
driverType?: StatusListDriverType;
|
|
315
|
-
bitsPerStatus?: number;
|
|
316
|
-
}): Promise<StatusListResult & Partial<IAddStatusListArgs>>;
|
|
343
|
+
}): Promise<number | Status2021 | StatusOAuth>;
|
|
344
|
+
declare function createNewStatusList(args: CreateNewStatusListFuncArgs, context: IAgentContext<(IVcdmCredentialPlugin | any) & IIdentifierResolution>): Promise<StatusListResult>;
|
|
345
|
+
declare function updateStatusIndexFromStatusListCredential(args: UpdateStatusListIndexArgs, context: IAgentContext<IVcdmCredentialPlugin & IIdentifierResolution>): Promise<StatusListResult>;
|
|
346
|
+
declare function extractCredentialDetails(statusListCredential: StatusListCredential): Promise<IExtractedCredentialDetails>;
|
|
347
|
+
declare function toStatusListDetails(args: IToDetailsFromCredentialArgs): Promise<StatusListResult & (IStatusList2021ImplementationResult | IOAuthStatusListImplementationResult | IBitstringStatusListImplementationResult)>;
|
|
348
|
+
declare function toStatusListDetails(args: IMergeDetailsWithEntityArgs): Promise<StatusListResult & (IStatusList2021ImplementationResult | IOAuthStatusListImplementationResult | IBitstringStatusListImplementationResult)>;
|
|
317
349
|
declare function createCredentialStatusFromStatusList(args: {
|
|
318
350
|
statusList: StatusListEntity;
|
|
319
351
|
statusListEntry: IStatusListEntryEntity | IBitstringStatusListEntryEntity;
|
|
320
352
|
statusListIndex: number;
|
|
321
353
|
}): Promise<StatusList2021EntryCredentialStatus | StatusListOAuthEntryCredentialStatus | BitstringStatusListEntryCredentialStatus>;
|
|
322
|
-
declare function updateStatusListIndexFromEncodedList(args: UpdateStatusListFromEncodedListArgs, context: IAgentContext<
|
|
323
|
-
declare function statusList2021ToVerifiableCredential(args: StatusList2021ToVerifiableCredentialArgs, context: IAgentContext<
|
|
354
|
+
declare function updateStatusListIndexFromEncodedList(args: UpdateStatusListFromEncodedListArgs, context: IAgentContext<IVcdmCredentialPlugin & IIdentifierResolution>): Promise<StatusListResult>;
|
|
355
|
+
declare function statusList2021ToVerifiableCredential(args: StatusList2021ToVerifiableCredentialArgs, context: IAgentContext<IVcdmCredentialPlugin & IIdentifierResolution>): Promise<StatusListCredential>;
|
|
356
|
+
|
|
357
|
+
declare function determineStatusListType(credential: StatusListCredential): StatusListType;
|
|
324
358
|
|
|
325
|
-
export { type BaseCreateNewStatusListArgs, type
|
|
359
|
+
export { type BaseCreateNewStatusListArgs, type CheckStatusIndexArgs, type CreateNewStatusListArgs, type CreateNewStatusListFuncArgs, type CreateStatusListArgs, type CredentialWithStatusSupport, type GetStatusListArgs, type IAddStatusToCredentialArgs, type IAddStatusToSdJwtCredentialArgs, type IIssueCredentialStatusOpts, type IMergeDetailsWithEntityArgs, type IRequiredContext, type IRequiredPlugins, type IStatusListPlugin, type IToDetailsFromCredentialArgs, type OAuthStatusListArgs, type SignedStatusListData, Status2021, type StatusList2021Args, type StatusList2021EntryCredentialStatus, type StatusList2021ToVerifiableCredentialArgs, type StatusListOAuthEntryCredentialStatus, type StatusListResult, StatusOAuth, type UpdateBitstringStatusListArgs, type UpdateOAuthStatusListArgs, type UpdateStatusList2021Args, type UpdateStatusListFromEncodedListArgs, type UpdateStatusListFromStatusListCredentialArgs, type UpdateStatusListIndexArgs, checkStatusForCredential, checkStatusIndexFromStatusListCredential, createCredentialStatusFromStatusList, createNewStatusList, determineStatusListType, extractCredentialDetails, fetchStatusListCredential, simpleCheckStatusFromStatusListUrl, statusList2021ToVerifiableCredential, statusPluginStatusFunction, toStatusListDetails, updateStatusIndexFromStatusListCredential, updateStatusListIndexFromEncodedList, vcLibCheckStatusFunction };
|