@veramo/credential-ld 4.3.1-next.4 → 4.3.1-next.9

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.
Files changed (59) hide show
  1. package/build/action-handler.d.ts +389 -3
  2. package/build/action-handler.d.ts.map +1 -1
  3. package/build/action-handler.js +118 -136
  4. package/build/action-handler.js.map +1 -1
  5. package/build/index.d.ts +8 -16
  6. package/build/index.d.ts.map +1 -1
  7. package/build/index.js +8 -36
  8. package/build/index.js.map +1 -1
  9. package/build/ld-context-loader.d.ts +1 -1
  10. package/build/ld-context-loader.d.ts.map +1 -1
  11. package/build/ld-context-loader.js +6 -20
  12. package/build/ld-context-loader.js.map +1 -1
  13. package/build/ld-credential-module.d.ts +3 -3
  14. package/build/ld-credential-module.d.ts.map +1 -1
  15. package/build/ld-credential-module.js +72 -85
  16. package/build/ld-credential-module.js.map +1 -1
  17. package/build/ld-default-contexts.d.ts +315 -1
  18. package/build/ld-default-contexts.d.ts.map +1 -1
  19. package/build/ld-default-contexts.js +28 -17
  20. package/build/ld-default-contexts.js.map +1 -1
  21. package/build/ld-suite-loader.d.ts +1 -1
  22. package/build/ld-suite-loader.d.ts.map +1 -1
  23. package/build/ld-suite-loader.js +4 -9
  24. package/build/ld-suite-loader.js.map +1 -1
  25. package/build/ld-suites.js +2 -7
  26. package/build/ld-suites.js.map +1 -1
  27. package/build/plugin.schema.json +430 -0
  28. package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts +1 -1
  29. package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts.map +1 -1
  30. package/build/suites/EcdsaSecp256k1RecoverySignature2020.js +16 -52
  31. package/build/suites/EcdsaSecp256k1RecoverySignature2020.js.map +1 -1
  32. package/build/suites/Ed25519Signature2018.d.ts +1 -1
  33. package/build/suites/Ed25519Signature2018.d.ts.map +1 -1
  34. package/build/suites/Ed25519Signature2018.js +12 -48
  35. package/build/suites/Ed25519Signature2018.js.map +1 -1
  36. package/build/suites/Ed25519Signature2020.d.ts +1 -1
  37. package/build/suites/Ed25519Signature2020.d.ts.map +1 -1
  38. package/build/suites/Ed25519Signature2020.js +13 -52
  39. package/build/suites/Ed25519Signature2020.js.map +1 -1
  40. package/build/suites/JsonWebSignature2020.d.ts +1 -1
  41. package/build/suites/JsonWebSignature2020.d.ts.map +1 -1
  42. package/build/suites/JsonWebSignature2020.js +44 -82
  43. package/build/suites/JsonWebSignature2020.js.map +1 -1
  44. package/build/tsdoc-metadata.json +1 -1
  45. package/build/types.js +1 -2
  46. package/package.json +18 -9
  47. package/src/__tests__/context.loader.test.ts +3 -3
  48. package/src/__tests__/issue-verify-flow.test.ts +6 -5
  49. package/src/action-handler.ts +8 -7
  50. package/src/index.ts +8 -17
  51. package/src/ld-context-loader.ts +1 -1
  52. package/src/ld-credential-module.ts +5 -4
  53. package/src/ld-default-contexts.ts +27 -14
  54. package/src/ld-suite-loader.ts +1 -1
  55. package/{plugin.schema.json → src/plugin.schema.json} +0 -0
  56. package/src/suites/EcdsaSecp256k1RecoverySignature2020.ts +4 -4
  57. package/src/suites/Ed25519Signature2018.ts +1 -1
  58. package/src/suites/Ed25519Signature2020.ts +1 -1
  59. package/src/suites/JsonWebSignature2020.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  import { IAgentPlugin, VerifiableCredential, VerifiablePresentation } from '@veramo/core';
2
- import { VeramoLdSignature } from './';
2
+ import { VeramoLdSignature } from './index.js';
3
3
  import { OrPromise, RecordLike } from '@veramo/utils';
4
- import { ContextDoc, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs, ICredentialIssuerLD, IRequiredContext, IVerifyCredentialLDArgs, IVerifyPresentationLDArgs } from './types';
4
+ import { ContextDoc, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs, ICredentialIssuerLD, IRequiredContext, IVerifyCredentialLDArgs, IVerifyPresentationLDArgs } from './types.js';
5
5
  /**
6
6
  * A Veramo plugin that implements the {@link ICredentialIssuerLD} methods.
7
7
  *
@@ -9,7 +9,393 @@ import { ContextDoc, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresent
9
9
  */
10
10
  export declare class CredentialIssuerLD implements IAgentPlugin {
11
11
  readonly methods: ICredentialIssuerLD;
12
- readonly schema: any;
12
+ readonly schema: {
13
+ components: {
14
+ schemas: {
15
+ ICreateVerifiableCredentialLDArgs: {
16
+ type: string;
17
+ properties: {
18
+ credential: {
19
+ $ref: string;
20
+ description: string;
21
+ };
22
+ keyRef: {
23
+ type: string;
24
+ description: string;
25
+ };
26
+ fetchRemoteContexts: {
27
+ type: string;
28
+ description: string;
29
+ };
30
+ };
31
+ required: string[];
32
+ additionalProperties: {
33
+ description: string;
34
+ };
35
+ description: string;
36
+ };
37
+ CredentialPayload: {
38
+ type: string;
39
+ properties: {
40
+ issuer: {
41
+ $ref: string;
42
+ };
43
+ credentialSubject: {
44
+ $ref: string;
45
+ };
46
+ type: {
47
+ type: string;
48
+ items: {
49
+ type: string;
50
+ };
51
+ };
52
+ "@context": {
53
+ type: string;
54
+ items: {
55
+ type: string;
56
+ };
57
+ };
58
+ issuanceDate: {
59
+ $ref: string;
60
+ };
61
+ expirationDate: {
62
+ $ref: string;
63
+ };
64
+ credentialStatus: {
65
+ $ref: string;
66
+ };
67
+ id: {
68
+ type: string;
69
+ };
70
+ };
71
+ required: string[];
72
+ description: string;
73
+ };
74
+ IssuerType: {
75
+ anyOf: ({
76
+ type: string;
77
+ properties: {
78
+ id: {
79
+ type: string;
80
+ };
81
+ };
82
+ required: string[];
83
+ } | {
84
+ type: string;
85
+ properties?: undefined;
86
+ required?: undefined;
87
+ })[];
88
+ description: string;
89
+ };
90
+ CredentialSubject: {
91
+ type: string;
92
+ properties: {
93
+ id: {
94
+ type: string;
95
+ };
96
+ };
97
+ description: string;
98
+ };
99
+ DateType: {
100
+ type: string;
101
+ description: string;
102
+ };
103
+ CredentialStatusReference: {
104
+ type: string;
105
+ properties: {
106
+ id: {
107
+ type: string;
108
+ };
109
+ type: {
110
+ type: string;
111
+ };
112
+ };
113
+ required: string[];
114
+ description: string;
115
+ };
116
+ VerifiableCredential: {
117
+ type: string;
118
+ properties: {
119
+ proof: {
120
+ $ref: string;
121
+ };
122
+ issuer: {
123
+ $ref: string;
124
+ };
125
+ credentialSubject: {
126
+ $ref: string;
127
+ };
128
+ type: {
129
+ anyOf: ({
130
+ type: string;
131
+ items: {
132
+ type: string;
133
+ };
134
+ } | {
135
+ type: string;
136
+ items?: undefined;
137
+ })[];
138
+ };
139
+ "@context": {
140
+ anyOf: ({
141
+ type: string;
142
+ items: {
143
+ type: string;
144
+ };
145
+ } | {
146
+ type: string;
147
+ items?: undefined;
148
+ })[];
149
+ };
150
+ issuanceDate: {
151
+ type: string;
152
+ };
153
+ expirationDate: {
154
+ type: string; /** {@inheritdoc ICredentialIssuerLD.verifyPresentationLD} */
155
+ };
156
+ credentialStatus: {
157
+ $ref: string;
158
+ };
159
+ id: {
160
+ type: string;
161
+ };
162
+ };
163
+ required: string[];
164
+ description: string;
165
+ };
166
+ ProofType: {
167
+ type: string;
168
+ properties: {
169
+ type: {
170
+ type: string;
171
+ };
172
+ };
173
+ description: string;
174
+ };
175
+ ICreateVerifiablePresentationLDArgs: {
176
+ type: string;
177
+ properties: {
178
+ presentation: {
179
+ $ref: string;
180
+ description: string;
181
+ };
182
+ challenge: {
183
+ type: string;
184
+ description: string;
185
+ };
186
+ domain: {
187
+ type: string;
188
+ description: string;
189
+ };
190
+ keyRef: {
191
+ type: string;
192
+ description: string;
193
+ };
194
+ fetchRemoteContexts: {
195
+ type: string;
196
+ description: string;
197
+ };
198
+ };
199
+ required: string[];
200
+ additionalProperties: {
201
+ description: string;
202
+ };
203
+ description: string;
204
+ };
205
+ PresentationPayload: {
206
+ type: string;
207
+ properties: {
208
+ holder: {
209
+ type: string;
210
+ };
211
+ verifiableCredential: {
212
+ type: string;
213
+ items: {
214
+ $ref: string;
215
+ };
216
+ };
217
+ type: {
218
+ type: string;
219
+ items: {
220
+ type: string;
221
+ };
222
+ };
223
+ "@context": {
224
+ type: string;
225
+ items: {
226
+ type: string;
227
+ };
228
+ };
229
+ verifier: {
230
+ type: string;
231
+ items: {
232
+ type: string;
233
+ };
234
+ };
235
+ issuanceDate: {
236
+ $ref: string;
237
+ };
238
+ expirationDate: {
239
+ $ref: string;
240
+ };
241
+ id: {
242
+ type: string;
243
+ };
244
+ };
245
+ required: string[];
246
+ description: string;
247
+ };
248
+ W3CVerifiableCredential: {
249
+ anyOf: {
250
+ $ref: string;
251
+ }[];
252
+ description: string;
253
+ };
254
+ CompactJWT: {
255
+ type: string;
256
+ description: string;
257
+ };
258
+ VerifiablePresentation: {
259
+ type: string;
260
+ properties: {
261
+ proof: {
262
+ $ref: string;
263
+ };
264
+ holder: {
265
+ type: string;
266
+ };
267
+ verifiableCredential: {
268
+ type: string;
269
+ items: {
270
+ $ref: string;
271
+ };
272
+ };
273
+ type: {
274
+ anyOf: ({
275
+ type: string;
276
+ items: {
277
+ type: string;
278
+ };
279
+ } | {
280
+ type: string;
281
+ items?: undefined;
282
+ })[];
283
+ };
284
+ "@context": {
285
+ anyOf: ({
286
+ type: string;
287
+ items: {
288
+ type: string;
289
+ };
290
+ } | {
291
+ type: string;
292
+ items?: undefined;
293
+ })[];
294
+ };
295
+ verifier: {
296
+ type: string;
297
+ items: {
298
+ type: string;
299
+ };
300
+ };
301
+ issuanceDate: {
302
+ type: string;
303
+ };
304
+ expirationDate: {
305
+ type: string;
306
+ };
307
+ id: {
308
+ type: string;
309
+ };
310
+ };
311
+ required: string[];
312
+ description: string;
313
+ };
314
+ IVerifyCredentialLDArgs: {
315
+ type: string;
316
+ properties: {
317
+ credential: {
318
+ $ref: string;
319
+ description: string;
320
+ };
321
+ fetchRemoteContexts: {
322
+ type: string;
323
+ description: string;
324
+ };
325
+ };
326
+ required: string[];
327
+ additionalProperties: {
328
+ description: string;
329
+ };
330
+ description: string;
331
+ };
332
+ IVerifyPresentationLDArgs: {
333
+ type: string;
334
+ properties: {
335
+ presentation: {
336
+ $ref: string;
337
+ description: string;
338
+ };
339
+ challenge: {
340
+ type: string;
341
+ description: string;
342
+ };
343
+ domain: {
344
+ type: string;
345
+ description: string;
346
+ };
347
+ fetchRemoteContexts: {
348
+ type: string;
349
+ description: string;
350
+ };
351
+ };
352
+ required: string[];
353
+ additionalProperties: {
354
+ description: string;
355
+ };
356
+ description: string;
357
+ };
358
+ };
359
+ methods: {
360
+ createVerifiableCredentialLD: {
361
+ description: string;
362
+ arguments: {
363
+ $ref: string;
364
+ };
365
+ returnType: {
366
+ $ref: string;
367
+ };
368
+ };
369
+ createVerifiablePresentationLD: {
370
+ description: string;
371
+ arguments: {
372
+ $ref: string;
373
+ };
374
+ returnType: {
375
+ $ref: string;
376
+ };
377
+ };
378
+ verifyCredentialLD: {
379
+ description: string;
380
+ arguments: {
381
+ $ref: string;
382
+ };
383
+ returnType: {
384
+ type: string;
385
+ };
386
+ };
387
+ verifyPresentationLD: {
388
+ description: string;
389
+ arguments: {
390
+ $ref: string;
391
+ };
392
+ returnType: {
393
+ type: string;
394
+ };
395
+ };
396
+ };
397
+ };
398
+ };
13
399
  private ldCredentialModule;
14
400
  constructor(options: {
15
401
  contextMaps: RecordLike<OrPromise<ContextDoc>>[];
@@ -1 +1 @@
1
- {"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../src/action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAKZ,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAU,iBAAiB,EAAE,MAAM,IAAI,CAAA;AAG9C,OAAO,EAML,SAAS,EAET,UAAU,EACX,MAAM,eAAe,CAAA;AAItB,OAAO,EACL,UAAU,EACV,iCAAiC,EACjC,mCAAmC,EACnC,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,SAAS,CAAA;AAIhB;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,Y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