@sphereon/ssi-sdk.vc-status-list 0.32.1-next.54 → 0.33.1-feature.jose.vcdm.55

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.
@@ -1,69 +0,0 @@
1
- import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
2
- import { OriginalVerifiableCredential, StatusListDriverType, StatusListType, StatusPurpose2021 } from '@sphereon/ssi-types';
3
- import { IAgentContext, ICredentialPlugin } from '@veramo/core';
4
- import { StatusMethod } from 'credential-status';
5
- import { CreateNewStatusListFuncArgs, StatusList2021ToVerifiableCredentialArgs, StatusListDetails, StatusListResult, UpdateStatusListFromEncodedListArgs, UpdateStatusListFromStatusListCredentialArgs } from './types';
6
- export declare function fetchStatusListCredential(args: {
7
- statusListCredential: string;
8
- }): Promise<OriginalVerifiableCredential>;
9
- export declare function statusPluginStatusFunction(args: {
10
- documentLoader: any;
11
- suite: any;
12
- mandatoryCredentialStatus?: boolean;
13
- verifyStatusListCredential?: boolean;
14
- verifyMatchingIssuers?: boolean;
15
- errorUnknownListType?: boolean;
16
- }): StatusMethod;
17
- /**
18
- * Function that can be used together with @digitalbazar/vc and @digitialcredentials/vc
19
- * @param args
20
- */
21
- export declare function vcLibCheckStatusFunction(args: {
22
- mandatoryCredentialStatus?: boolean;
23
- verifyStatusListCredential?: boolean;
24
- verifyMatchingIssuers?: boolean;
25
- errorUnknownListType?: boolean;
26
- }): (args: {
27
- credential: OriginalVerifiableCredential;
28
- documentLoader: any;
29
- suite: any;
30
- }) => Promise<{
31
- verified: boolean;
32
- error?: any;
33
- }>;
34
- export declare function checkStatusForCredential(args: {
35
- credential: OriginalVerifiableCredential;
36
- documentLoader: any;
37
- suite: any;
38
- mandatoryCredentialStatus?: boolean;
39
- verifyStatusListCredential?: boolean;
40
- verifyMatchingIssuers?: boolean;
41
- errorUnknownListType?: boolean;
42
- }): Promise<{
43
- verified: boolean;
44
- error?: any;
45
- }>;
46
- export declare function simpleCheckStatusFromStatusListUrl(args: {
47
- statusListCredential: string;
48
- statusPurpose?: StatusPurpose2021;
49
- type?: StatusListType | 'StatusList2021Entry';
50
- id?: string;
51
- statusListIndex: string;
52
- }): Promise<boolean>;
53
- export declare function checkStatusIndexFromStatusListCredential(args: {
54
- statusListCredential: OriginalVerifiableCredential;
55
- statusPurpose?: StatusPurpose2021;
56
- type?: StatusListType | 'StatusList2021Entry';
57
- id?: string;
58
- statusListIndex: string | number;
59
- }): Promise<boolean>;
60
- export declare function createNewStatusList(args: CreateNewStatusListFuncArgs, context: IAgentContext<ICredentialPlugin & IIdentifierResolution>): Promise<StatusListResult>;
61
- export declare function updateStatusIndexFromStatusListCredential(args: UpdateStatusListFromStatusListCredentialArgs, context: IAgentContext<ICredentialPlugin & IIdentifierResolution>): Promise<StatusListDetails>;
62
- export declare function statusListCredentialToDetails(args: {
63
- statusListCredential: OriginalVerifiableCredential;
64
- correlationId?: string;
65
- driverType?: StatusListDriverType;
66
- }): Promise<StatusListDetails>;
67
- export declare function updateStatusListIndexFromEncodedList(args: UpdateStatusListFromEncodedListArgs, context: IAgentContext<ICredentialPlugin & IIdentifierResolution>): Promise<StatusListDetails>;
68
- export declare function statusList2021ToVerifiableCredential(args: StatusList2021ToVerifiableCredentialArgs, context: IAgentContext<ICredentialPlugin & IIdentifierResolution>): Promise<OriginalVerifiableCredential>;
69
- //# sourceMappingURL=functions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AACnF,OAAO,EAIL,4BAA4B,EAC5B,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAiC,aAAa,EAAE,iBAAiB,EAAe,MAAM,cAAc,CAAA;AAC3G,OAAO,EAAuB,YAAY,EAAE,MAAM,mBAAmB,CA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AE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,GAChE,OAAO,CAAC,iBAAiB,CAAC,CA+B5B;AAED,wBAAsB,oCAAoC,CACxD,IAAI,EAAE,wCAAwC,EAC9C,OAAO,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,GAChE,OAAO,CAAC,4BAA4B,CAAC,CA+BvC"}
package/dist/functions.js DELETED
@@ -1,256 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.fetchStatusListCredential = fetchStatusListCredential;
13
- exports.statusPluginStatusFunction = statusPluginStatusFunction;
14
- exports.vcLibCheckStatusFunction = vcLibCheckStatusFunction;
15
- exports.checkStatusForCredential = checkStatusForCredential;
16
- exports.simpleCheckStatusFromStatusListUrl = simpleCheckStatusFromStatusListUrl;
17
- exports.checkStatusIndexFromStatusListCredential = checkStatusIndexFromStatusListCredential;
18
- exports.createNewStatusList = createNewStatusList;
19
- exports.updateStatusIndexFromStatusListCredential = updateStatusIndexFromStatusListCredential;
20
- exports.statusListCredentialToDetails = statusListCredentialToDetails;
21
- exports.updateStatusListIndexFromEncodedList = updateStatusListIndexFromEncodedList;
22
- exports.statusList2021ToVerifiableCredential = statusList2021ToVerifiableCredential;
23
- const ssi_types_1 = require("@sphereon/ssi-types");
24
- const vc_status_list_1 = require("@sphereon/vc-status-list");
25
- function fetchStatusListCredential(args) {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- const url = getAssertedValue('statusListCredential', args.statusListCredential);
28
- try {
29
- const response = yield fetch(url);
30
- if (!response.ok) {
31
- const error = `Fetching status list ${url} resulted in an error: ${response.status} : ${response.statusText}`;
32
- throw Error(error);
33
- }
34
- const responseAsText = yield response.text();
35
- if (responseAsText.trim().startsWith('{')) {
36
- return JSON.parse(responseAsText);
37
- }
38
- return responseAsText;
39
- }
40
- catch (error) {
41
- console.log(`Fetching status list ${url} resulted in an unexpected error: ${error instanceof Error ? error.message : JSON.stringify(error)}`);
42
- throw error;
43
- }
44
- });
45
- }
46
- function statusPluginStatusFunction(args) {
47
- return (credential, didDoc) => __awaiter(this, void 0, void 0, function* () {
48
- const result = yield checkStatusForCredential(Object.assign(Object.assign({}, args), { documentLoader: args.documentLoader, credential: credential, errorUnknownListType: args.errorUnknownListType }));
49
- return Object.assign({ revoked: !result.verified || result.error }, (result.error && { error: result.error }));
50
- });
51
- }
52
- /**
53
- * Function that can be used together with @digitalbazar/vc and @digitialcredentials/vc
54
- * @param args
55
- */
56
- function vcLibCheckStatusFunction(args) {
57
- const { mandatoryCredentialStatus, verifyStatusListCredential, verifyMatchingIssuers, errorUnknownListType } = args;
58
- return (args) => {
59
- return checkStatusForCredential(Object.assign(Object.assign({}, args), { mandatoryCredentialStatus,
60
- verifyStatusListCredential,
61
- verifyMatchingIssuers,
62
- errorUnknownListType }));
63
- };
64
- }
65
- function checkStatusForCredential(args) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- var _a, _b;
68
- const verifyStatusListCredential = (_a = args.verifyStatusListCredential) !== null && _a !== void 0 ? _a : true;
69
- const verifyMatchingIssuers = (_b = args.verifyMatchingIssuers) !== null && _b !== void 0 ? _b : true;
70
- const uniform = ssi_types_1.CredentialMapper.toUniformCredential(args.credential);
71
- if (!('credentialStatus' in uniform) || !uniform.credentialStatus) {
72
- if (args.mandatoryCredentialStatus) {
73
- const error = 'No credential status object found in the Verifiable Credential and it is mandatory';
74
- console.log(error);
75
- return { verified: false, error };
76
- }
77
- return { verified: true };
78
- }
79
- if ('credentialStatus' in uniform && uniform.credentialStatus) {
80
- if (uniform.credentialStatus.type === 'StatusList2021Entry') {
81
- return (0, vc_status_list_1.checkStatus)(Object.assign(Object.assign({}, args), { verifyStatusListCredential, verifyMatchingIssuers }));
82
- }
83
- else if (args === null || args === void 0 ? void 0 : args.errorUnknownListType) {
84
- const error = `Credential status type ${uniform.credentialStatus.type} is not supported, and check status has been configured to not allow for that`;
85
- console.log(error);
86
- return { verified: false, error };
87
- }
88
- else {
89
- console.log(`Skipped verification of status type ${uniform.credentialStatus.type} as we do not support it (yet)`);
90
- }
91
- }
92
- return { verified: true };
93
- });
94
- }
95
- function simpleCheckStatusFromStatusListUrl(args) {
96
- return __awaiter(this, void 0, void 0, function* () {
97
- return checkStatusIndexFromStatusListCredential(Object.assign(Object.assign({}, args), { statusListCredential: yield fetchStatusListCredential(args) }));
98
- });
99
- }
100
- function checkStatusIndexFromStatusListCredential(args) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- var _a;
103
- const requestedType = getAssertedStatusListType((_a = args.type) === null || _a === void 0 ? void 0 : _a.replace('Entry', ''));
104
- const uniform = ssi_types_1.CredentialMapper.toUniformCredential(args.statusListCredential);
105
- const { issuer, type, credentialSubject, id } = uniform;
106
- getAssertedValue('issuer', issuer); // We are only checking the value here
107
- getAssertedValue('credentialSubject', credentialSubject);
108
- if (args.statusPurpose && 'statusPurpose' in credentialSubject) {
109
- if (args.statusPurpose !== credentialSubject.statusPurpose) {
110
- throw Error(`Status purpose in StatusList credential with id ${id} and value ${credentialSubject.statusPurpose} does not match supplied purpose: ${args.statusPurpose}`);
111
- }
112
- }
113
- else if (args.id && args.id !== id) {
114
- throw Error(`Status list id ${id} did not match required supplied id: ${args.id}`);
115
- }
116
- if (!type || !(type.includes(requestedType) || type.includes(requestedType + 'Credential'))) {
117
- throw Error(`Credential type ${JSON.stringify(type)} does not contain requested type ${requestedType}`);
118
- }
119
- // @ts-ignore
120
- const encodedList = getAssertedValue('encodedList', credentialSubject['encodedList']);
121
- const statusList = yield vc_status_list_1.StatusList.decode({ encodedList });
122
- const status = statusList.getStatus(typeof args.statusListIndex === 'number' ? args.statusListIndex : Number.parseInt(args.statusListIndex));
123
- return status;
124
- });
125
- }
126
- function createNewStatusList(args, context) {
127
- return __awaiter(this, void 0, void 0, function* () {
128
- var _a, _b, _c;
129
- const length = (_a = args === null || args === void 0 ? void 0 : args.length) !== null && _a !== void 0 ? _a : 250000;
130
- const proofFormat = (_b = args === null || args === void 0 ? void 0 : args.proofFormat) !== null && _b !== void 0 ? _b : 'lds';
131
- const { issuer, type, id } = getAssertedValues(args);
132
- const correlationId = getAssertedValue('correlationId', args.correlationId);
133
- const list = new vc_status_list_1.StatusList({ length });
134
- const encodedList = yield list.encode();
135
- const statusPurpose = (_c = args.statusPurpose) !== null && _c !== void 0 ? _c : 'revocation';
136
- const statusListCredential = yield statusList2021ToVerifiableCredential(Object.assign(Object.assign({}, args), { type,
137
- proofFormat,
138
- encodedList }), context);
139
- return {
140
- encodedList,
141
- statusListCredential,
142
- length,
143
- type,
144
- proofFormat,
145
- id,
146
- correlationId,
147
- issuer,
148
- statusPurpose,
149
- indexingDirection: 'rightToLeft',
150
- };
151
- });
152
- }
153
- function updateStatusIndexFromStatusListCredential(args, context) {
154
- return __awaiter(this, void 0, void 0, function* () {
155
- return updateStatusListIndexFromEncodedList(Object.assign(Object.assign({}, (yield statusListCredentialToDetails(args))), { statusListIndex: args.statusListIndex, value: args.value }), context);
156
- });
157
- }
158
- function statusListCredentialToDetails(args) {
159
- return __awaiter(this, void 0, void 0, function* () {
160
- const credential = getAssertedValue('statusListCredential', args.statusListCredential);
161
- const uniform = ssi_types_1.CredentialMapper.toUniformCredential(credential);
162
- const { issuer, type, credentialSubject } = uniform;
163
- if (!type.includes('StatusList2021Credential')) {
164
- throw Error('StatusList2021Credential type should be present in the Verifiable Credential');
165
- }
166
- const id = getAssertedValue('id', uniform.id);
167
- // @ts-ignore
168
- const { encodedList, statusPurpose } = credentialSubject;
169
- const proofFormat = ssi_types_1.CredentialMapper.detectDocumentType(credential) === 0 /* DocumentFormat.JWT */ ? 'jwt' : 'lds';
170
- return Object.assign(Object.assign({ id,
171
- encodedList,
172
- issuer, type: ssi_types_1.StatusListType.StatusList2021, proofFormat, indexingDirection: 'rightToLeft', length: (yield vc_status_list_1.StatusList.decode({ encodedList })).length, statusPurpose, statusListCredential: credential }, (args.correlationId && { correlationId: args.correlationId })), (args.driverType && { driverType: args.driverType }));
173
- });
174
- }
175
- function updateStatusListIndexFromEncodedList(args, context) {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- var _a;
178
- const { issuer, type, id } = getAssertedValues(args);
179
- const proofFormat = (_a = args === null || args === void 0 ? void 0 : args.proofFormat) !== null && _a !== void 0 ? _a : 'lds';
180
- const origEncodedList = getAssertedValue('encodedList', args.encodedList);
181
- const index = getAssertedValue('index', typeof args.statusListIndex === 'number' ? args.statusListIndex : Number.parseInt(args.statusListIndex));
182
- const value = getAssertedValue('value', args.value);
183
- const statusPurpose = getAssertedValue('statusPurpose', args.statusPurpose);
184
- const statusList = yield vc_status_list_1.StatusList.decode({ encodedList: origEncodedList });
185
- statusList.setStatus(index, value);
186
- const encodedList = yield statusList.encode();
187
- const statusListCredential = yield statusList2021ToVerifiableCredential(Object.assign(Object.assign({}, args), { type,
188
- proofFormat,
189
- encodedList }), context);
190
- return {
191
- encodedList,
192
- statusListCredential,
193
- length: statusList.length - 1,
194
- type,
195
- proofFormat,
196
- id,
197
- issuer,
198
- statusPurpose,
199
- indexingDirection: 'rightToLeft',
200
- };
201
- });
202
- }
203
- function statusList2021ToVerifiableCredential(args, context) {
204
- return __awaiter(this, void 0, void 0, function* () {
205
- var _a;
206
- const { issuer, id, type } = getAssertedValues(args);
207
- const identifier = yield context.agent.identifierManagedGet({
208
- identifier: typeof issuer === 'string' ? issuer : issuer.id,
209
- vmRelationship: 'assertionMethod',
210
- offlineWhenNoDIDRegistered: true, // FIXME Fix identifier resolution for EBSI
211
- });
212
- const encodedList = getAssertedValue('encodedList', args.encodedList);
213
- const statusPurpose = getAssertedValue('statusPurpose', args.statusPurpose);
214
- const credential = {
215
- '@context': ['https://www.w3.org/2018/credentials/v1', 'https://w3id.org/vc/status-list/2021/v1'],
216
- id,
217
- issuer,
218
- // issuanceDate: "2021-03-10T04:24:12.164Z",
219
- type: ['VerifiableCredential', `${type}Credential`],
220
- credentialSubject: {
221
- id,
222
- type,
223
- statusPurpose,
224
- encodedList,
225
- },
226
- };
227
- // TODO copy statuslist schema to local and disable fetching remote contexts
228
- const verifiableCredential = yield context.agent.createVerifiableCredential({
229
- credential,
230
- keyRef: identifier.kmsKeyRef,
231
- proofFormat: (_a = args.proofFormat) !== null && _a !== void 0 ? _a : 'lds',
232
- fetchRemoteContexts: true,
233
- });
234
- return ssi_types_1.CredentialMapper.toWrappedVerifiableCredential(verifiableCredential).original;
235
- });
236
- }
237
- function getAssertedStatusListType(type) {
238
- const assertedType = type !== null && type !== void 0 ? type : ssi_types_1.StatusListType.StatusList2021;
239
- if (assertedType !== ssi_types_1.StatusListType.StatusList2021) {
240
- throw Error(`StatusList type ${assertedType} is not supported (yet)`);
241
- }
242
- return assertedType;
243
- }
244
- function getAssertedValue(name, value) {
245
- if (value === undefined || value === null) {
246
- throw Error(`Missing required ${name} value`);
247
- }
248
- return value;
249
- }
250
- function getAssertedValues(args) {
251
- const type = getAssertedStatusListType(args === null || args === void 0 ? void 0 : args.type);
252
- const id = getAssertedValue('id', args.id);
253
- const issuer = getAssertedValue('issuer', args.issuer);
254
- return { id, issuer, type };
255
- }
256
- //# sourceMappingURL=functions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":";;;;;;;;;;;AAuBA,8DAiBC;AAED,gEAqBC;AAMD,4DAuBC;AAED,4DAgCC;AAED,gFAWC;AAED,4FA8BC;AAED,kDAkCC;AAED,8FAYC;AAED,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AAK,CAAC,oBAAoB,IAAI,QAAQ,CAAC,CAAA;IAC/C,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAqE;IAC9F,MAAM,IAAI,GAAG,yBAAyB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAC,CAAA;IAClD,MAAM,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;IAC1C,MAAM,MAAM,GAAG,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACtD,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AAC7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;GACG;AAEH,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
@@ -1,111 +0,0 @@
1
- import { IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
2
- import { ICredential, ICredentialStatus, IIssuer, IVerifiableCredential, OriginalVerifiableCredential, OrPromise, StatusListCredentialIdMode, StatusListDriverType, StatusListIndexingDirection, StatusListType, StatusPurpose2021 } from '@sphereon/ssi-types';
3
- import { CredentialPayload, IAgentContext, ICredentialIssuer, ICredentialPlugin, ICredentialVerifier, IPluginMethodMap, ProofFormat } from '@veramo/core';
4
- import { DataSource } from 'typeorm';
5
- export interface CreateNewStatusListFuncArgs extends Omit<StatusList2021ToVerifiableCredentialArgs, 'encodedList'> {
6
- correlationId: string;
7
- length?: number;
8
- }
9
- export interface UpdateStatusListFromEncodedListArgs extends StatusList2021ToVerifiableCredentialArgs {
10
- statusListIndex: number | string;
11
- value: boolean;
12
- }
13
- export interface UpdateStatusListFromStatusListCredentialArgs {
14
- statusListCredential: OriginalVerifiableCredential;
15
- keyRef?: string;
16
- statusListIndex: number | string;
17
- value: boolean;
18
- }
19
- export interface StatusList2021ToVerifiableCredentialArgs {
20
- issuer: string | IIssuer;
21
- id: string;
22
- type?: StatusListType;
23
- statusPurpose: StatusPurpose2021;
24
- encodedList: string;
25
- proofFormat?: ProofFormat;
26
- keyRef?: string;
27
- }
28
- export interface StatusListDetails {
29
- encodedList: string;
30
- length: number;
31
- type: StatusListType;
32
- proofFormat: ProofFormat;
33
- statusPurpose: StatusPurpose2021;
34
- id: string;
35
- issuer: string | IIssuer;
36
- indexingDirection: StatusListIndexingDirection;
37
- statusListCredential: OriginalVerifiableCredential;
38
- correlationId?: string;
39
- driverType?: StatusListDriverType;
40
- credentialIdMode?: StatusListCredentialIdMode;
41
- }
42
- export interface StatusListResult extends StatusListDetails {
43
- statusListCredential: OriginalVerifiableCredential;
44
- }
45
- export interface StatusList2021EntryCredentialStatus extends ICredentialStatus {
46
- type: 'StatusList2021Entry';
47
- statusPurpose: StatusPurpose2021;
48
- statusListIndex: string;
49
- statusListCredential: string;
50
- }
51
- /**
52
- * The interface definition for a plugin that can add statuslist info to a credential
53
- *
54
- * @remarks Please see {@link https://www.w3.org/TR/vc-data-model | W3C Verifiable Credentials data model}
55
- *
56
- * @beta This API is likely to change without a BREAKING CHANGE notice
57
- */
58
- export interface IStatusListPlugin extends IPluginMethodMap {
59
- /**
60
- * Create a new status list
61
- *
62
- * @param args Status list information like type and size
63
- * @param context - This reserved param is automatically added and handled by the framework, *do not override*
64
- *
65
- * @returns - The details of the newly created status list
66
- */
67
- slCreateStatusList(args: CreateNewStatusListArgs, context: IRequiredContext): Promise<StatusListDetails>;
68
- /**
69
- * Ensures status list info like index and list id is added to a credential
70
- *
71
- * @param args - Arguments necessary to add the statuslist info.
72
- * @param context - This reserved param is automatically added and handled by the framework, *do not override*
73
- *
74
- * @returns - a promise that resolves to the credential now with status support
75
- *
76
- * @beta This API is likely to change without a BREAKING CHANGE notice
77
- */
78
- slAddStatusToCredential(args: IAddStatusToCredentialArgs, context: IRequiredContext): Promise<CredentialWithStatusSupport>;
79
- /**
80
- * Get the status list using the configured driver for the SL. Normally a correlationId or id should suffice. Optionally accepts a dbName/datasource
81
- * @param args
82
- * @param context
83
- */
84
- slGetStatusList(args: GetStatusListArgs, context: IRequiredContext): Promise<StatusListDetails>;
85
- }
86
- export type IAddStatusToCredentialArgs = Omit<IIssueCredentialStatusOpts, 'dataSource'> & {
87
- credential: CredentialWithStatusSupport;
88
- };
89
- export interface IIssueCredentialStatusOpts {
90
- dataSource?: DataSource;
91
- credentialId?: string;
92
- statusListId?: string;
93
- statusListIndex?: number | string;
94
- statusEntryCorrelationId?: string;
95
- value?: string;
96
- }
97
- export type GetStatusListArgs = {
98
- id?: string;
99
- correlationId?: string;
100
- dataSource?: OrPromise<DataSource>;
101
- dbName?: string;
102
- };
103
- export type CreateNewStatusListArgs = CreateNewStatusListFuncArgs & {
104
- dataSource?: OrPromise<DataSource>;
105
- dbName?: string;
106
- isDefault?: boolean;
107
- };
108
- export type CredentialWithStatusSupport = ICredential | CredentialPayload | IVerifiableCredential;
109
- export type IRequiredPlugins = ICredentialPlugin & IIdentifierResolution;
110
- export type IRequiredContext = IAgentContext<ICredentialIssuer & ICredentialVerifier & IIdentifierResolution>;
111
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AACnF,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,qBAAqB,EACrB,4BAA4B,EAC5B,SAAS,EACT,0BAA0B,EAC1B,oBAAoB,EACpB,2BAA2B,EAC3B,cAAc,EACd,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACZ,MAAM,cAAc,CAAA;AACrB,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AChB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAAG;IAClE,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,WAAW,GAAG,iBAAiB,GAAG,qBAAqB,CAAA;AAEjG,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,qBAAqB,CAAA;AACxE,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,iBAAiB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}