@twin.org/identity-service 0.0.3-next.9 → 0.9.0
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/README.md +2 -2
- package/dist/es/identityProfileRoutes.js +1 -2
- package/dist/es/identityProfileRoutes.js.map +1 -1
- package/dist/es/identityProfileService.js +3 -3
- package/dist/es/identityProfileService.js.map +1 -1
- package/dist/es/identityResolverRoutes.js +3 -4
- package/dist/es/identityResolverRoutes.js.map +1 -1
- package/dist/es/identityResolverService.js +3 -0
- package/dist/es/identityResolverService.js.map +1 -1
- package/dist/es/identityRoutes.js +284 -14
- package/dist/es/identityRoutes.js.map +1 -1
- package/dist/es/identityService.js +154 -31
- package/dist/es/identityService.js.map +1 -1
- package/dist/es/models/IIdentityResolverServiceConfig.js.map +1 -1
- package/dist/es/models/IIdentityServiceConfig.js.map +1 -1
- package/dist/es/models/IIdentityServiceConstructorOptions.js.map +1 -1
- package/dist/es/restEntryPoints.js +3 -0
- package/dist/es/restEntryPoints.js.map +1 -1
- package/dist/types/identityProfileService.d.ts +3 -3
- package/dist/types/identityResolverRoutes.d.ts +1 -1
- package/dist/types/identityResolverService.d.ts +1 -0
- package/dist/types/identityRoutes.d.ts +33 -1
- package/dist/types/identityService.d.ts +59 -12
- package/dist/types/models/IIdentityResolverServiceConfig.d.ts +1 -1
- package/dist/types/models/IIdentityServiceConfig.d.ts +1 -1
- package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +4 -0
- package/dist/types/restEntryPoints.d.ts +3 -0
- package/docs/changelog.md +682 -101
- package/docs/examples.md +196 -1
- package/docs/open-api/spec.json +804 -482
- package/docs/reference/classes/IdentityProfileService.md +11 -11
- package/docs/reference/classes/IdentityResolverService.md +7 -3
- package/docs/reference/classes/IdentityService.md +188 -44
- package/docs/reference/functions/generateRestRoutesIdentityResolver.md +1 -1
- package/docs/reference/functions/identityAlsoKnownAsCreate.md +31 -0
- package/docs/reference/functions/identityAlsoKnownAsRemove.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialVerifyDocument.md +31 -0
- package/docs/reference/functions/identityVerifiablePresentationVerifyDocument.md +31 -0
- package/docs/reference/index.md +4 -0
- package/docs/reference/interfaces/IIdentityProfileServiceConstructorOptions.md +2 -2
- package/docs/reference/interfaces/IIdentityResolverServiceConfig.md +3 -3
- package/docs/reference/interfaces/IIdentityResolverServiceConstructorOptions.md +4 -4
- package/docs/reference/interfaces/IIdentityServiceConfig.md +3 -3
- package/docs/reference/interfaces/IIdentityServiceConstructorOptions.md +10 -2
- package/docs/reference/variables/restEntryPoints.md +2 -0
- package/locales/en.json +2 -0
- package/package.json +17 -16
|
@@ -38,7 +38,7 @@ The dependencies for the identity profile service.
|
|
|
38
38
|
|
|
39
39
|
## Properties
|
|
40
40
|
|
|
41
|
-
### CLASS\_NAME
|
|
41
|
+
### CLASS\_NAME {#class_name}
|
|
42
42
|
|
|
43
43
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ Runtime name for the class.
|
|
|
46
46
|
|
|
47
47
|
## Methods
|
|
48
48
|
|
|
49
|
-
### className()
|
|
49
|
+
### className() {#classname}
|
|
50
50
|
|
|
51
51
|
> **className**(): `string`
|
|
52
52
|
|
|
@@ -64,7 +64,7 @@ The class name of the component.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### create()
|
|
67
|
+
### create() {#create}
|
|
68
68
|
|
|
69
69
|
> **create**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
70
70
|
|
|
@@ -94,7 +94,7 @@ The identity to perform the profile operation on.
|
|
|
94
94
|
|
|
95
95
|
`Promise`\<`void`\>
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
A promise that resolves when the profile has been created.
|
|
98
98
|
|
|
99
99
|
#### Implementation of
|
|
100
100
|
|
|
@@ -102,7 +102,7 @@ Nothing.
|
|
|
102
102
|
|
|
103
103
|
***
|
|
104
104
|
|
|
105
|
-
### get()
|
|
105
|
+
### get() {#get}
|
|
106
106
|
|
|
107
107
|
> **get**(`publicPropertyNames?`, `privatePropertyNames?`, `identity?`): `Promise`\<\{ `identity`: `string`; `publicProfile?`: `Partial`\<`T`\>; `privateProfile?`: `Partial`\<`U`\>; \}\>
|
|
108
108
|
|
|
@@ -140,7 +140,7 @@ The items identity and the properties.
|
|
|
140
140
|
|
|
141
141
|
***
|
|
142
142
|
|
|
143
|
-
### getPublic()
|
|
143
|
+
### getPublic() {#getpublic}
|
|
144
144
|
|
|
145
145
|
> **getPublic**(`identity`, `propertyNames?`): `Promise`\<`Partial`\<`T`\>\>
|
|
146
146
|
|
|
@@ -172,7 +172,7 @@ The items properties.
|
|
|
172
172
|
|
|
173
173
|
***
|
|
174
174
|
|
|
175
|
-
### update()
|
|
175
|
+
### update() {#update}
|
|
176
176
|
|
|
177
177
|
> **update**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
178
178
|
|
|
@@ -202,7 +202,7 @@ The identity to perform the profile operation on.
|
|
|
202
202
|
|
|
203
203
|
`Promise`\<`void`\>
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
A promise that resolves when the profile has been updated.
|
|
206
206
|
|
|
207
207
|
#### Implementation of
|
|
208
208
|
|
|
@@ -210,7 +210,7 @@ Nothing.
|
|
|
210
210
|
|
|
211
211
|
***
|
|
212
212
|
|
|
213
|
-
### remove()
|
|
213
|
+
### remove() {#remove}
|
|
214
214
|
|
|
215
215
|
> **remove**(`identity?`): `Promise`\<`void`\>
|
|
216
216
|
|
|
@@ -228,7 +228,7 @@ The identity to perform the profile operation on.
|
|
|
228
228
|
|
|
229
229
|
`Promise`\<`void`\>
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
A promise that resolves when the profile has been removed.
|
|
232
232
|
|
|
233
233
|
#### Implementation of
|
|
234
234
|
|
|
@@ -236,7 +236,7 @@ Nothing.
|
|
|
236
236
|
|
|
237
237
|
***
|
|
238
238
|
|
|
239
|
-
### list()
|
|
239
|
+
### list() {#list}
|
|
240
240
|
|
|
241
241
|
> **list**(`publicFilters?`, `publicPropertyNames?`, `cursor?`, `limit?`): `Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
242
242
|
|
|
@@ -26,9 +26,13 @@ The options for the service.
|
|
|
26
26
|
|
|
27
27
|
`IdentityResolverService`
|
|
28
28
|
|
|
29
|
+
#### Throws
|
|
30
|
+
|
|
31
|
+
GeneralError if no connectors are registered.
|
|
32
|
+
|
|
29
33
|
## Properties
|
|
30
34
|
|
|
31
|
-
### CLASS\_NAME
|
|
35
|
+
### CLASS\_NAME {#class_name}
|
|
32
36
|
|
|
33
37
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
38
|
|
|
@@ -36,7 +40,7 @@ Runtime name for the class.
|
|
|
36
40
|
|
|
37
41
|
## Methods
|
|
38
42
|
|
|
39
|
-
### className()
|
|
43
|
+
### className() {#classname}
|
|
40
44
|
|
|
41
45
|
> **className**(): `string`
|
|
42
46
|
|
|
@@ -54,7 +58,7 @@ The class name of the component.
|
|
|
54
58
|
|
|
55
59
|
***
|
|
56
60
|
|
|
57
|
-
### identityResolve()
|
|
61
|
+
### identityResolve() {#identityresolve}
|
|
58
62
|
|
|
59
63
|
> **identityResolve**(`identity`): `Promise`\<`IDidDocument`\>
|
|
60
64
|
|
|
@@ -26,9 +26,13 @@ The options for the service.
|
|
|
26
26
|
|
|
27
27
|
`IdentityService`
|
|
28
28
|
|
|
29
|
+
#### Throws
|
|
30
|
+
|
|
31
|
+
GeneralError if no connectors are registered.
|
|
32
|
+
|
|
29
33
|
## Properties
|
|
30
34
|
|
|
31
|
-
### CLASS\_NAME
|
|
35
|
+
### CLASS\_NAME {#class_name}
|
|
32
36
|
|
|
33
37
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
38
|
|
|
@@ -36,7 +40,7 @@ Runtime name for the class.
|
|
|
36
40
|
|
|
37
41
|
## Methods
|
|
38
42
|
|
|
39
|
-
### className()
|
|
43
|
+
### className() {#classname}
|
|
40
44
|
|
|
41
45
|
> **className**(): `string`
|
|
42
46
|
|
|
@@ -54,7 +58,25 @@ The class name of the component.
|
|
|
54
58
|
|
|
55
59
|
***
|
|
56
60
|
|
|
57
|
-
###
|
|
61
|
+
### start() {#start}
|
|
62
|
+
|
|
63
|
+
> **start**(): `Promise`\<`void`\>
|
|
64
|
+
|
|
65
|
+
Register all identity metrics with the telemetry component.
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`Promise`\<`void`\>
|
|
70
|
+
|
|
71
|
+
A promise that resolves when all metrics have been registered.
|
|
72
|
+
|
|
73
|
+
#### Implementation of
|
|
74
|
+
|
|
75
|
+
`IIdentityComponent.start`
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### identityCreate() {#identitycreate}
|
|
58
80
|
|
|
59
81
|
> **identityCreate**(`namespace?`, `controller?`): `Promise`\<`IDidDocument`\>
|
|
60
82
|
|
|
@@ -86,7 +108,7 @@ The created identity document.
|
|
|
86
108
|
|
|
87
109
|
***
|
|
88
110
|
|
|
89
|
-
### identityRemove()
|
|
111
|
+
### identityRemove() {#identityremove}
|
|
90
112
|
|
|
91
113
|
> **identityRemove**(`identity`, `controller?`): `Promise`\<`void`\>
|
|
92
114
|
|
|
@@ -110,7 +132,7 @@ The controller of the identity who can make changes.
|
|
|
110
132
|
|
|
111
133
|
`Promise`\<`void`\>
|
|
112
134
|
|
|
113
|
-
|
|
135
|
+
A promise that resolves when the identity has been removed.
|
|
114
136
|
|
|
115
137
|
#### Implementation of
|
|
116
138
|
|
|
@@ -118,7 +140,7 @@ Nothing.
|
|
|
118
140
|
|
|
119
141
|
***
|
|
120
142
|
|
|
121
|
-
### verificationMethodCreate()
|
|
143
|
+
### verificationMethodCreate() {#verificationmethodcreate}
|
|
122
144
|
|
|
123
145
|
> **verificationMethodCreate**(`identity`, `verificationMethodType`, `verificationMethodId?`, `controller?`): `Promise`\<`IDidDocumentVerificationMethod`\>
|
|
124
146
|
|
|
@@ -170,7 +192,7 @@ NotSupportedError if the platform does not support multiple keys.
|
|
|
170
192
|
|
|
171
193
|
***
|
|
172
194
|
|
|
173
|
-
### verificationMethodRemove()
|
|
195
|
+
### verificationMethodRemove() {#verificationmethodremove}
|
|
174
196
|
|
|
175
197
|
> **verificationMethodRemove**(`verificationMethodId`, `controller?`): `Promise`\<`void`\>
|
|
176
198
|
|
|
@@ -194,7 +216,7 @@ The controller of the identity who can make changes.
|
|
|
194
216
|
|
|
195
217
|
`Promise`\<`void`\>
|
|
196
218
|
|
|
197
|
-
|
|
219
|
+
A promise that resolves when the verification method has been removed.
|
|
198
220
|
|
|
199
221
|
#### Throws
|
|
200
222
|
|
|
@@ -210,7 +232,7 @@ NotSupportedError if the platform does not support multiple revocable keys.
|
|
|
210
232
|
|
|
211
233
|
***
|
|
212
234
|
|
|
213
|
-
### serviceCreate()
|
|
235
|
+
### serviceCreate() {#servicecreate}
|
|
214
236
|
|
|
215
237
|
> **serviceCreate**(`identity`, `serviceId`, `serviceType`, `serviceEndpoint`, `controller?`): `Promise`\<`IDidService`\>
|
|
216
238
|
|
|
@@ -232,15 +254,15 @@ The id of the service.
|
|
|
232
254
|
|
|
233
255
|
##### serviceType
|
|
234
256
|
|
|
235
|
-
|
|
257
|
+
`string` \| `string`[]
|
|
236
258
|
|
|
237
|
-
|
|
259
|
+
The type of the service.
|
|
238
260
|
|
|
239
261
|
##### serviceEndpoint
|
|
240
262
|
|
|
241
|
-
|
|
263
|
+
`string` \| `string`[]
|
|
242
264
|
|
|
243
|
-
|
|
265
|
+
The endpoint for the service.
|
|
244
266
|
|
|
245
267
|
##### controller?
|
|
246
268
|
|
|
@@ -264,7 +286,7 @@ NotFoundError if the id can not be resolved.
|
|
|
264
286
|
|
|
265
287
|
***
|
|
266
288
|
|
|
267
|
-
### serviceRemove()
|
|
289
|
+
### serviceRemove() {#serviceremove}
|
|
268
290
|
|
|
269
291
|
> **serviceRemove**(`serviceId`, `controller?`): `Promise`\<`void`\>
|
|
270
292
|
|
|
@@ -288,7 +310,7 @@ The controller of the identity who can make changes.
|
|
|
288
310
|
|
|
289
311
|
`Promise`\<`void`\>
|
|
290
312
|
|
|
291
|
-
|
|
313
|
+
A promise that resolves when the service has been removed.
|
|
292
314
|
|
|
293
315
|
#### Throws
|
|
294
316
|
|
|
@@ -300,7 +322,101 @@ NotFoundError if the id can not be resolved.
|
|
|
300
322
|
|
|
301
323
|
***
|
|
302
324
|
|
|
303
|
-
###
|
|
325
|
+
### alsoKnownAsAdd() {#alsoknownasadd}
|
|
326
|
+
|
|
327
|
+
> **alsoKnownAsAdd**(`documentId`, `alias`, `controller?`): `Promise`\<`void`\>
|
|
328
|
+
|
|
329
|
+
Add an alias to the alsoKnownAs property on the document.
|
|
330
|
+
If the alias is already present the operation is a no-op.
|
|
331
|
+
|
|
332
|
+
#### Parameters
|
|
333
|
+
|
|
334
|
+
##### documentId
|
|
335
|
+
|
|
336
|
+
`string`
|
|
337
|
+
|
|
338
|
+
The id of the document to update.
|
|
339
|
+
|
|
340
|
+
##### alias
|
|
341
|
+
|
|
342
|
+
`string`
|
|
343
|
+
|
|
344
|
+
The alias to add. Must be a Url or Urn (typically another DID).
|
|
345
|
+
|
|
346
|
+
##### controller?
|
|
347
|
+
|
|
348
|
+
`string`
|
|
349
|
+
|
|
350
|
+
The controller of the identity who can make changes.
|
|
351
|
+
|
|
352
|
+
#### Returns
|
|
353
|
+
|
|
354
|
+
`Promise`\<`void`\>
|
|
355
|
+
|
|
356
|
+
A promise that resolves when the alias has been added.
|
|
357
|
+
|
|
358
|
+
#### Throws
|
|
359
|
+
|
|
360
|
+
GeneralError if the alias is not a Url or Urn.
|
|
361
|
+
|
|
362
|
+
#### Throws
|
|
363
|
+
|
|
364
|
+
NotFoundError if the id can not be resolved.
|
|
365
|
+
|
|
366
|
+
#### Implementation of
|
|
367
|
+
|
|
368
|
+
`IIdentityComponent.alsoKnownAsAdd`
|
|
369
|
+
|
|
370
|
+
***
|
|
371
|
+
|
|
372
|
+
### alsoKnownAsRemove() {#alsoknownasremove}
|
|
373
|
+
|
|
374
|
+
> **alsoKnownAsRemove**(`documentId`, `alias`, `controller?`): `Promise`\<`void`\>
|
|
375
|
+
|
|
376
|
+
Remove an alias from the alsoKnownAs property on the document.
|
|
377
|
+
If the alias is not present the operation is a no-op.
|
|
378
|
+
|
|
379
|
+
#### Parameters
|
|
380
|
+
|
|
381
|
+
##### documentId
|
|
382
|
+
|
|
383
|
+
`string`
|
|
384
|
+
|
|
385
|
+
The id of the document to update.
|
|
386
|
+
|
|
387
|
+
##### alias
|
|
388
|
+
|
|
389
|
+
`string`
|
|
390
|
+
|
|
391
|
+
The alias to remove. Must be a Url or Urn.
|
|
392
|
+
|
|
393
|
+
##### controller?
|
|
394
|
+
|
|
395
|
+
`string`
|
|
396
|
+
|
|
397
|
+
The controller of the identity who can make changes.
|
|
398
|
+
|
|
399
|
+
#### Returns
|
|
400
|
+
|
|
401
|
+
`Promise`\<`void`\>
|
|
402
|
+
|
|
403
|
+
A promise that resolves when the alias has been removed.
|
|
404
|
+
|
|
405
|
+
#### Throws
|
|
406
|
+
|
|
407
|
+
GeneralError if the alias is not a Url or Urn.
|
|
408
|
+
|
|
409
|
+
#### Throws
|
|
410
|
+
|
|
411
|
+
NotFoundError if the id can not be resolved.
|
|
412
|
+
|
|
413
|
+
#### Implementation of
|
|
414
|
+
|
|
415
|
+
`IIdentityComponent.alsoKnownAsRemove`
|
|
416
|
+
|
|
417
|
+
***
|
|
418
|
+
|
|
419
|
+
### verifiableCredentialCreate() {#verifiablecredentialcreate}
|
|
304
420
|
|
|
305
421
|
> **verifiableCredentialCreate**(`verificationMethodId`, `id`, `subject`, `options?`, `controller?`): `Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
306
422
|
|
|
@@ -316,9 +432,9 @@ The verification method id to use.
|
|
|
316
432
|
|
|
317
433
|
##### id
|
|
318
434
|
|
|
319
|
-
|
|
435
|
+
`string` \| `undefined`
|
|
320
436
|
|
|
321
|
-
|
|
437
|
+
The id of the credential.
|
|
322
438
|
|
|
323
439
|
##### subject
|
|
324
440
|
|
|
@@ -342,6 +458,18 @@ The bitmap revocation index of the credential, if undefined will not have revoca
|
|
|
342
458
|
|
|
343
459
|
The date the verifiable credential is valid until.
|
|
344
460
|
|
|
461
|
+
###### jwtHeaderFields?
|
|
462
|
+
|
|
463
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
464
|
+
|
|
465
|
+
Additional fields to include in the JWT header when creating the verifiable credential in jwt format.
|
|
466
|
+
|
|
467
|
+
###### jwtPayloadFields?
|
|
468
|
+
|
|
469
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
470
|
+
|
|
471
|
+
Additional fields to include in the JWT payload when creating the verifiable credential in jwt format.
|
|
472
|
+
|
|
345
473
|
##### controller?
|
|
346
474
|
|
|
347
475
|
`string`
|
|
@@ -364,17 +492,17 @@ NotFoundError if the id can not be resolved.
|
|
|
364
492
|
|
|
365
493
|
***
|
|
366
494
|
|
|
367
|
-
### verifiableCredentialVerify()
|
|
495
|
+
### verifiableCredentialVerify() {#verifiablecredentialverify}
|
|
368
496
|
|
|
369
|
-
> **verifiableCredentialVerify**(`
|
|
497
|
+
> **verifiableCredentialVerify**(`credential`): `Promise`\<\{ `revoked`: `boolean`; `verifiableCredential?`: `IDidVerifiableCredential`; \}\>
|
|
370
498
|
|
|
371
499
|
Verify a verifiable credential is valid.
|
|
372
500
|
|
|
373
501
|
#### Parameters
|
|
374
502
|
|
|
375
|
-
#####
|
|
503
|
+
##### credential
|
|
376
504
|
|
|
377
|
-
`string`
|
|
505
|
+
`string` \| `IDidVerifiableCredential`
|
|
378
506
|
|
|
379
507
|
The credential to verify.
|
|
380
508
|
|
|
@@ -390,7 +518,7 @@ The credential stored in the jwt and the revocation status.
|
|
|
390
518
|
|
|
391
519
|
***
|
|
392
520
|
|
|
393
|
-
### verifiableCredentialRevoke()
|
|
521
|
+
### verifiableCredentialRevoke() {#verifiablecredentialrevoke}
|
|
394
522
|
|
|
395
523
|
> **verifiableCredentialRevoke**(`issuerIdentity`, `credentialIndex`, `controller?`): `Promise`\<`void`\>
|
|
396
524
|
|
|
@@ -408,7 +536,7 @@ The id of the document to update the revocation list for.
|
|
|
408
536
|
|
|
409
537
|
`number`
|
|
410
538
|
|
|
411
|
-
The revocation bitmap index revoke.
|
|
539
|
+
The revocation bitmap index to revoke.
|
|
412
540
|
|
|
413
541
|
##### controller?
|
|
414
542
|
|
|
@@ -420,7 +548,7 @@ The controller of the identity who can make changes.
|
|
|
420
548
|
|
|
421
549
|
`Promise`\<`void`\>
|
|
422
550
|
|
|
423
|
-
|
|
551
|
+
A promise that resolves when the credential has been revoked.
|
|
424
552
|
|
|
425
553
|
#### Implementation of
|
|
426
554
|
|
|
@@ -428,7 +556,7 @@ Nothing.
|
|
|
428
556
|
|
|
429
557
|
***
|
|
430
558
|
|
|
431
|
-
### verifiableCredentialUnrevoke()
|
|
559
|
+
### verifiableCredentialUnrevoke() {#verifiablecredentialunrevoke}
|
|
432
560
|
|
|
433
561
|
> **verifiableCredentialUnrevoke**(`issuerIdentity`, `credentialIndex`, `controller?`): `Promise`\<`void`\>
|
|
434
562
|
|
|
@@ -458,7 +586,7 @@ The controller of the identity who can make changes.
|
|
|
458
586
|
|
|
459
587
|
`Promise`\<`void`\>
|
|
460
588
|
|
|
461
|
-
|
|
589
|
+
A promise that resolves when the credential has been unrevoked.
|
|
462
590
|
|
|
463
591
|
#### Implementation of
|
|
464
592
|
|
|
@@ -466,9 +594,9 @@ Nothing.
|
|
|
466
594
|
|
|
467
595
|
***
|
|
468
596
|
|
|
469
|
-
### verifiablePresentationCreate()
|
|
597
|
+
### verifiablePresentationCreate() {#verifiablepresentationcreate}
|
|
470
598
|
|
|
471
|
-
> **verifiablePresentationCreate**(`verificationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `
|
|
599
|
+
> **verifiablePresentationCreate**(`verificationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `options?`, `controller?`): `Promise`\<\{ `verifiablePresentation`: `IDidVerifiablePresentation`; `jwt`: `string`; \}\>
|
|
472
600
|
|
|
473
601
|
Create a verifiable presentation from the supplied verifiable credentials.
|
|
474
602
|
|
|
@@ -482,21 +610,21 @@ The method to associate with the presentation.
|
|
|
482
610
|
|
|
483
611
|
##### presentationId
|
|
484
612
|
|
|
485
|
-
|
|
613
|
+
`string` \| `undefined`
|
|
486
614
|
|
|
487
|
-
|
|
615
|
+
The id of the presentation.
|
|
488
616
|
|
|
489
617
|
##### contexts
|
|
490
618
|
|
|
491
|
-
|
|
619
|
+
`IJsonLdContextDefinitionRoot` \| `undefined`
|
|
492
620
|
|
|
493
|
-
|
|
621
|
+
The contexts for the data stored in the verifiable credential.
|
|
494
622
|
|
|
495
623
|
##### types
|
|
496
624
|
|
|
497
|
-
|
|
625
|
+
`string` \| `string`[] \| `undefined`
|
|
498
626
|
|
|
499
|
-
|
|
627
|
+
The types for the data stored in the verifiable credential.
|
|
500
628
|
|
|
501
629
|
##### verifiableCredentials
|
|
502
630
|
|
|
@@ -504,11 +632,27 @@ The types for the data stored in the verifiable credential.
|
|
|
504
632
|
|
|
505
633
|
The credentials to use for creating the presentation in jwt format.
|
|
506
634
|
|
|
507
|
-
#####
|
|
635
|
+
##### options?
|
|
508
636
|
|
|
509
|
-
|
|
637
|
+
Additional options for creating the verifiable presentation.
|
|
638
|
+
|
|
639
|
+
###### expirationDate?
|
|
640
|
+
|
|
641
|
+
`Date`
|
|
510
642
|
|
|
511
|
-
The
|
|
643
|
+
The date the verifiable presentation is valid until.
|
|
644
|
+
|
|
645
|
+
###### jwtHeaderFields?
|
|
646
|
+
|
|
647
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
648
|
+
|
|
649
|
+
Additional fields to include in the JWT header when creating the verifiable presentation in jwt format.
|
|
650
|
+
|
|
651
|
+
###### jwtPayloadFields?
|
|
652
|
+
|
|
653
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
654
|
+
|
|
655
|
+
Additional fields to include in the JWT payload when creating the verifiable presentation in jwt format.
|
|
512
656
|
|
|
513
657
|
##### controller?
|
|
514
658
|
|
|
@@ -532,17 +676,17 @@ NotFoundError if the id can not be resolved.
|
|
|
532
676
|
|
|
533
677
|
***
|
|
534
678
|
|
|
535
|
-
### verifiablePresentationVerify()
|
|
679
|
+
### verifiablePresentationVerify() {#verifiablepresentationverify}
|
|
536
680
|
|
|
537
|
-
> **verifiablePresentationVerify**(`
|
|
681
|
+
> **verifiablePresentationVerify**(`presentation`): `Promise`\<\{ `revoked`: `boolean`; `verifiablePresentation?`: `IDidVerifiablePresentation`; `issuers?`: `IDidDocument`[]; \}\>
|
|
538
682
|
|
|
539
683
|
Verify a verifiable presentation is valid.
|
|
540
684
|
|
|
541
685
|
#### Parameters
|
|
542
686
|
|
|
543
|
-
#####
|
|
687
|
+
##### presentation
|
|
544
688
|
|
|
545
|
-
`string`
|
|
689
|
+
`string` \| `IDidVerifiablePresentation`
|
|
546
690
|
|
|
547
691
|
The presentation to verify.
|
|
548
692
|
|
|
@@ -558,7 +702,7 @@ The presentation stored in the jwt and the revocation status.
|
|
|
558
702
|
|
|
559
703
|
***
|
|
560
704
|
|
|
561
|
-
### proofCreate()
|
|
705
|
+
### proofCreate() {#proofcreate}
|
|
562
706
|
|
|
563
707
|
> **proofCreate**(`verificationMethodId`, `proofType`, `unsecureDocument`, `controller?`): `Promise`\<`IProof`\>
|
|
564
708
|
|
|
@@ -602,7 +746,7 @@ The proof.
|
|
|
602
746
|
|
|
603
747
|
***
|
|
604
748
|
|
|
605
|
-
### proofVerify()
|
|
749
|
+
### proofVerify() {#proofverify}
|
|
606
750
|
|
|
607
751
|
> **proofVerify**(`document`, `proof`): `Promise`\<`boolean`\>
|
|
608
752
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identityAlsoKnownAsCreate()
|
|
2
|
+
|
|
3
|
+
> **identityAlsoKnownAsCreate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
|
|
4
|
+
|
|
5
|
+
Create an identity alias.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### httpRequestContext
|
|
10
|
+
|
|
11
|
+
`IHttpRequestContext`
|
|
12
|
+
|
|
13
|
+
The request context for the API.
|
|
14
|
+
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
18
|
+
|
|
19
|
+
The name of the component to use in the routes stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityAlsoKnownAsCreateRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`INoContentResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identityAlsoKnownAsRemove()
|
|
2
|
+
|
|
3
|
+
> **identityAlsoKnownAsRemove**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
|
|
4
|
+
|
|
5
|
+
Remove an identity alias.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### httpRequestContext
|
|
10
|
+
|
|
11
|
+
`IHttpRequestContext`
|
|
12
|
+
|
|
13
|
+
The request context for the API.
|
|
14
|
+
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
18
|
+
|
|
19
|
+
The name of the component to use in the routes stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityAlsoKnownAsRemoveRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`INoContentResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identityVerifiableCredentialVerifyDocument()
|
|
2
|
+
|
|
3
|
+
> **identityVerifiableCredentialVerifyDocument**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IIdentityVerifiableCredentialVerifyResponse`\>
|
|
4
|
+
|
|
5
|
+
Verify a verifiable credential document.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### httpRequestContext
|
|
10
|
+
|
|
11
|
+
`IHttpRequestContext`
|
|
12
|
+
|
|
13
|
+
The request context for the API.
|
|
14
|
+
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
18
|
+
|
|
19
|
+
The name of the component to use in the routes stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityVerifiableCredentialVerifyDocumentRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`IIdentityVerifiableCredentialVerifyResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identityVerifiablePresentationVerifyDocument()
|
|
2
|
+
|
|
3
|
+
> **identityVerifiablePresentationVerifyDocument**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IIdentityVerifiablePresentationVerifyResponse`\>
|
|
4
|
+
|
|
5
|
+
Verify a verifiable presentation document.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### httpRequestContext
|
|
10
|
+
|
|
11
|
+
`IHttpRequestContext`
|
|
12
|
+
|
|
13
|
+
The request context for the API.
|
|
14
|
+
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
18
|
+
|
|
19
|
+
The name of the component to use in the routes stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityVerifiablePresentationVerifyDocumentRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`IIdentityVerifiablePresentationVerifyResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|