@twin.org/identity-service 0.0.1-next.9 → 0.0.1
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/cjs/index.cjs +1417 -48
- package/dist/esm/index.mjs +1403 -51
- package/dist/types/identityProfileRoutes.d.ts +1 -1
- package/dist/types/identityProfileService.d.ts +6 -4
- package/dist/types/identityResolverRoutes.d.ts +21 -0
- package/dist/types/identityResolverService.d.ts +27 -0
- package/dist/types/identityRoutes.d.ts +108 -4
- package/dist/types/identityService.d.ts +136 -10
- package/dist/types/index.d.ts +6 -0
- package/dist/types/models/IIdentityProfileServiceConstructorOptions.d.ts +10 -0
- package/dist/types/models/IIdentityResolverServiceConfig.d.ts +9 -0
- package/dist/types/models/IIdentityResolverServiceConstructorOptions.d.ts +15 -0
- package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +10 -0
- package/docs/changelog.md +302 -1
- package/docs/open-api/spec.json +2948 -1360
- package/docs/reference/classes/IdentityProfileService.md +76 -58
- package/docs/reference/classes/IdentityResolverService.md +73 -0
- package/docs/reference/classes/IdentityService.md +560 -16
- package/docs/reference/functions/generateRestRoutesIdentity.md +8 -4
- package/docs/reference/functions/generateRestRoutesIdentityProfile.md +8 -4
- package/docs/reference/functions/generateRestRoutesIdentityResolver.md +25 -0
- package/docs/reference/functions/identitiesList.md +9 -3
- package/docs/reference/functions/identityCreate.md +31 -0
- package/docs/reference/functions/identityGet.md +9 -3
- package/docs/reference/functions/identityGetPublic.md +9 -3
- package/docs/reference/functions/identityProfileCreate.md +9 -3
- package/docs/reference/functions/identityProfileRemove.md +9 -3
- package/docs/reference/functions/identityProfileUpdate.md +9 -3
- package/docs/reference/functions/identityProofCreate.md +31 -0
- package/docs/reference/functions/identityProofVerify.md +31 -0
- package/docs/reference/functions/identityRemove.md +31 -0
- package/docs/reference/functions/identityResolve.md +9 -3
- package/docs/reference/functions/identityServiceCreate.md +31 -0
- package/docs/reference/functions/identityServiceRemove.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialCreate.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialRevoke.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialUnrevoke.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialVerify.md +31 -0
- package/docs/reference/functions/identityVerifiablePresentationCreate.md +31 -0
- package/docs/reference/functions/identityVerifiablePresentationVerify.md +31 -0
- package/docs/reference/functions/identityVerificationMethodCreate.md +31 -0
- package/docs/reference/functions/identityVerificationMethodRemove.md +31 -0
- package/docs/reference/index.md +22 -1
- package/docs/reference/interfaces/IIdentityProfileServiceConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IIdentityResolverServiceConfig.md +11 -0
- package/docs/reference/interfaces/IIdentityResolverServiceConstructorOptions.md +25 -0
- package/docs/reference/interfaces/IIdentityServiceConstructorOptions.md +11 -0
- package/docs/reference/variables/tagsIdentityResolver.md +5 -0
- package/locales/en.json +23 -4
- package/package.json +18 -18
|
@@ -8,31 +8,29 @@ Class which implements the identity contract.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new IdentityService**(`options
|
|
13
|
+
> **new IdentityService**(`options?`): `IdentityService`
|
|
14
14
|
|
|
15
15
|
Create a new instance of IdentityService.
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### options?
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
• **options.config?**: [`IIdentityServiceConfig`](../interfaces/IIdentityServiceConfig.md)
|
|
21
|
+
[`IIdentityServiceConstructorOptions`](../interfaces/IIdentityServiceConstructorOptions.md)
|
|
24
22
|
|
|
25
|
-
The
|
|
23
|
+
The options for the service.
|
|
26
24
|
|
|
27
25
|
#### Returns
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
`IdentityService`
|
|
30
28
|
|
|
31
29
|
## Properties
|
|
32
30
|
|
|
33
31
|
### NAMESPACE
|
|
34
32
|
|
|
35
|
-
> `readonly` `static` **NAMESPACE**: `string` = `"
|
|
33
|
+
> `readonly` `static` **NAMESPACE**: `string` = `"identity"`
|
|
36
34
|
|
|
37
35
|
The namespace supported by the identity service.
|
|
38
36
|
|
|
@@ -50,24 +48,570 @@ Runtime name for the class.
|
|
|
50
48
|
|
|
51
49
|
## Methods
|
|
52
50
|
|
|
53
|
-
###
|
|
51
|
+
### identityCreate()
|
|
54
52
|
|
|
55
|
-
> **
|
|
53
|
+
> **identityCreate**(`namespace?`, `controller?`): `Promise`\<`IDidDocument`\>
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
Create a new identity.
|
|
58
56
|
|
|
59
57
|
#### Parameters
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
##### namespace?
|
|
60
|
+
|
|
61
|
+
`string`
|
|
62
|
+
|
|
63
|
+
The namespace of the connector to use for the identity, defaults to service configured namespace.
|
|
64
|
+
|
|
65
|
+
##### controller?
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
`string`
|
|
68
|
+
|
|
69
|
+
The controller of the identity who can make changes.
|
|
64
70
|
|
|
65
71
|
#### Returns
|
|
66
72
|
|
|
67
73
|
`Promise`\<`IDidDocument`\>
|
|
68
74
|
|
|
69
|
-
The
|
|
75
|
+
The created identity document.
|
|
76
|
+
|
|
77
|
+
#### Implementation of
|
|
78
|
+
|
|
79
|
+
`IIdentityComponent.identityCreate`
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### identityRemove()
|
|
84
|
+
|
|
85
|
+
> **identityRemove**(`identity`, `controller?`): `Promise`\<`void`\>
|
|
86
|
+
|
|
87
|
+
Remove an identity.
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
##### identity
|
|
92
|
+
|
|
93
|
+
`string`
|
|
94
|
+
|
|
95
|
+
The id of the document to remove.
|
|
96
|
+
|
|
97
|
+
##### controller?
|
|
98
|
+
|
|
99
|
+
`string`
|
|
100
|
+
|
|
101
|
+
The controller of the identity who can make changes.
|
|
102
|
+
|
|
103
|
+
#### Returns
|
|
104
|
+
|
|
105
|
+
`Promise`\<`void`\>
|
|
106
|
+
|
|
107
|
+
Nothing.
|
|
108
|
+
|
|
109
|
+
#### Implementation of
|
|
110
|
+
|
|
111
|
+
`IIdentityComponent.identityRemove`
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### verificationMethodCreate()
|
|
116
|
+
|
|
117
|
+
> **verificationMethodCreate**(`identity`, `verificationMethodType`, `verificationMethodId?`, `controller?`): `Promise`\<`IDidDocumentVerificationMethod`\>
|
|
118
|
+
|
|
119
|
+
Add a verification method to the document in JSON Web key Format.
|
|
120
|
+
|
|
121
|
+
#### Parameters
|
|
122
|
+
|
|
123
|
+
##### identity
|
|
124
|
+
|
|
125
|
+
`string`
|
|
126
|
+
|
|
127
|
+
The id of the document to add the verification method to.
|
|
128
|
+
|
|
129
|
+
##### verificationMethodType
|
|
130
|
+
|
|
131
|
+
`DidVerificationMethodType`
|
|
132
|
+
|
|
133
|
+
The type of the verification method to add.
|
|
134
|
+
|
|
135
|
+
##### verificationMethodId?
|
|
136
|
+
|
|
137
|
+
`string`
|
|
138
|
+
|
|
139
|
+
The id of the verification method, if undefined uses the kid of the generated JWK.
|
|
140
|
+
|
|
141
|
+
##### controller?
|
|
142
|
+
|
|
143
|
+
`string`
|
|
144
|
+
|
|
145
|
+
The controller of the identity who can make changes.
|
|
146
|
+
|
|
147
|
+
#### Returns
|
|
148
|
+
|
|
149
|
+
`Promise`\<`IDidDocumentVerificationMethod`\>
|
|
150
|
+
|
|
151
|
+
The verification method.
|
|
152
|
+
|
|
153
|
+
#### Throws
|
|
154
|
+
|
|
155
|
+
NotFoundError if the id can not be resolved.
|
|
156
|
+
|
|
157
|
+
#### Throws
|
|
158
|
+
|
|
159
|
+
NotSupportedError if the platform does not support multiple keys.
|
|
160
|
+
|
|
161
|
+
#### Implementation of
|
|
162
|
+
|
|
163
|
+
`IIdentityComponent.verificationMethodCreate`
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
167
|
+
### verificationMethodRemove()
|
|
168
|
+
|
|
169
|
+
> **verificationMethodRemove**(`verificationMethodId`, `controller?`): `Promise`\<`void`\>
|
|
170
|
+
|
|
171
|
+
Remove a verification method from the document.
|
|
172
|
+
|
|
173
|
+
#### Parameters
|
|
174
|
+
|
|
175
|
+
##### verificationMethodId
|
|
176
|
+
|
|
177
|
+
`string`
|
|
178
|
+
|
|
179
|
+
The id of the verification method.
|
|
180
|
+
|
|
181
|
+
##### controller?
|
|
182
|
+
|
|
183
|
+
`string`
|
|
184
|
+
|
|
185
|
+
The controller of the identity who can make changes.
|
|
186
|
+
|
|
187
|
+
#### Returns
|
|
188
|
+
|
|
189
|
+
`Promise`\<`void`\>
|
|
190
|
+
|
|
191
|
+
Nothing.
|
|
192
|
+
|
|
193
|
+
#### Throws
|
|
194
|
+
|
|
195
|
+
NotFoundError if the id can not be resolved.
|
|
196
|
+
|
|
197
|
+
#### Throws
|
|
198
|
+
|
|
199
|
+
NotSupportedError if the platform does not support multiple revocable keys.
|
|
200
|
+
|
|
201
|
+
#### Implementation of
|
|
202
|
+
|
|
203
|
+
`IIdentityComponent.verificationMethodRemove`
|
|
204
|
+
|
|
205
|
+
***
|
|
206
|
+
|
|
207
|
+
### serviceCreate()
|
|
208
|
+
|
|
209
|
+
> **serviceCreate**(`identity`, `serviceId`, `serviceType`, `serviceEndpoint`, `controller?`): `Promise`\<`IDidService`\>
|
|
210
|
+
|
|
211
|
+
Add a service to the document.
|
|
212
|
+
|
|
213
|
+
#### Parameters
|
|
214
|
+
|
|
215
|
+
##### identity
|
|
216
|
+
|
|
217
|
+
`string`
|
|
218
|
+
|
|
219
|
+
The id of the document to add the service to.
|
|
220
|
+
|
|
221
|
+
##### serviceId
|
|
222
|
+
|
|
223
|
+
`string`
|
|
224
|
+
|
|
225
|
+
The id of the service.
|
|
226
|
+
|
|
227
|
+
##### serviceType
|
|
228
|
+
|
|
229
|
+
The type of the service.
|
|
230
|
+
|
|
231
|
+
`string` | `string`[]
|
|
232
|
+
|
|
233
|
+
##### serviceEndpoint
|
|
234
|
+
|
|
235
|
+
The endpoint for the service.
|
|
236
|
+
|
|
237
|
+
`string` | `string`[]
|
|
238
|
+
|
|
239
|
+
##### controller?
|
|
240
|
+
|
|
241
|
+
`string`
|
|
242
|
+
|
|
243
|
+
The controller of the identity who can make changes.
|
|
244
|
+
|
|
245
|
+
#### Returns
|
|
246
|
+
|
|
247
|
+
`Promise`\<`IDidService`\>
|
|
248
|
+
|
|
249
|
+
The service.
|
|
250
|
+
|
|
251
|
+
#### Throws
|
|
252
|
+
|
|
253
|
+
NotFoundError if the id can not be resolved.
|
|
254
|
+
|
|
255
|
+
#### Implementation of
|
|
256
|
+
|
|
257
|
+
`IIdentityComponent.serviceCreate`
|
|
258
|
+
|
|
259
|
+
***
|
|
260
|
+
|
|
261
|
+
### serviceRemove()
|
|
262
|
+
|
|
263
|
+
> **serviceRemove**(`serviceId`, `controller?`): `Promise`\<`void`\>
|
|
264
|
+
|
|
265
|
+
Remove a service from the document.
|
|
266
|
+
|
|
267
|
+
#### Parameters
|
|
268
|
+
|
|
269
|
+
##### serviceId
|
|
270
|
+
|
|
271
|
+
`string`
|
|
272
|
+
|
|
273
|
+
The id of the service.
|
|
274
|
+
|
|
275
|
+
##### controller?
|
|
276
|
+
|
|
277
|
+
`string`
|
|
278
|
+
|
|
279
|
+
The controller of the identity who can make changes.
|
|
280
|
+
|
|
281
|
+
#### Returns
|
|
282
|
+
|
|
283
|
+
`Promise`\<`void`\>
|
|
284
|
+
|
|
285
|
+
Nothing.
|
|
286
|
+
|
|
287
|
+
#### Throws
|
|
288
|
+
|
|
289
|
+
NotFoundError if the id can not be resolved.
|
|
290
|
+
|
|
291
|
+
#### Implementation of
|
|
292
|
+
|
|
293
|
+
`IIdentityComponent.serviceRemove`
|
|
294
|
+
|
|
295
|
+
***
|
|
296
|
+
|
|
297
|
+
### verifiableCredentialCreate()
|
|
298
|
+
|
|
299
|
+
> **verifiableCredentialCreate**(`verificationMethodId`, `id`, `subject`, `revocationIndex?`, `controller?`): `Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
300
|
+
|
|
301
|
+
Create a verifiable credential for a verification method.
|
|
302
|
+
|
|
303
|
+
#### Parameters
|
|
304
|
+
|
|
305
|
+
##### verificationMethodId
|
|
306
|
+
|
|
307
|
+
`string`
|
|
308
|
+
|
|
309
|
+
The verification method id to use.
|
|
310
|
+
|
|
311
|
+
##### id
|
|
312
|
+
|
|
313
|
+
The id of the credential.
|
|
314
|
+
|
|
315
|
+
`undefined` | `string`
|
|
316
|
+
|
|
317
|
+
##### subject
|
|
318
|
+
|
|
319
|
+
`IJsonLdNodeObject`
|
|
320
|
+
|
|
321
|
+
The credential subject to store in the verifiable credential.
|
|
322
|
+
|
|
323
|
+
##### revocationIndex?
|
|
324
|
+
|
|
325
|
+
`number`
|
|
326
|
+
|
|
327
|
+
The bitmap revocation index of the credential, if undefined will not have revocation status.
|
|
328
|
+
|
|
329
|
+
##### controller?
|
|
330
|
+
|
|
331
|
+
`string`
|
|
332
|
+
|
|
333
|
+
The controller of the identity who can make changes.
|
|
334
|
+
|
|
335
|
+
#### Returns
|
|
336
|
+
|
|
337
|
+
`Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
338
|
+
|
|
339
|
+
The created verifiable credential and its token.
|
|
340
|
+
|
|
341
|
+
#### Throws
|
|
342
|
+
|
|
343
|
+
NotFoundError if the id can not be resolved.
|
|
344
|
+
|
|
345
|
+
#### Implementation of
|
|
346
|
+
|
|
347
|
+
`IIdentityComponent.verifiableCredentialCreate`
|
|
348
|
+
|
|
349
|
+
***
|
|
350
|
+
|
|
351
|
+
### verifiableCredentialVerify()
|
|
352
|
+
|
|
353
|
+
> **verifiableCredentialVerify**(`credentialJwt`): `Promise`\<\{ `revoked`: `boolean`; `verifiableCredential?`: `IDidVerifiableCredential`; \}\>
|
|
354
|
+
|
|
355
|
+
Verify a verifiable credential is valid.
|
|
356
|
+
|
|
357
|
+
#### Parameters
|
|
358
|
+
|
|
359
|
+
##### credentialJwt
|
|
360
|
+
|
|
361
|
+
`string`
|
|
362
|
+
|
|
363
|
+
The credential to verify.
|
|
364
|
+
|
|
365
|
+
#### Returns
|
|
366
|
+
|
|
367
|
+
`Promise`\<\{ `revoked`: `boolean`; `verifiableCredential?`: `IDidVerifiableCredential`; \}\>
|
|
368
|
+
|
|
369
|
+
The credential stored in the jwt and the revocation status.
|
|
370
|
+
|
|
371
|
+
#### Implementation of
|
|
372
|
+
|
|
373
|
+
`IIdentityComponent.verifiableCredentialVerify`
|
|
374
|
+
|
|
375
|
+
***
|
|
376
|
+
|
|
377
|
+
### verifiableCredentialRevoke()
|
|
378
|
+
|
|
379
|
+
> **verifiableCredentialRevoke**(`issuerIdentity`, `credentialIndex`, `controller?`): `Promise`\<`void`\>
|
|
380
|
+
|
|
381
|
+
Revoke verifiable credential.
|
|
382
|
+
|
|
383
|
+
#### Parameters
|
|
384
|
+
|
|
385
|
+
##### issuerIdentity
|
|
386
|
+
|
|
387
|
+
`string`
|
|
388
|
+
|
|
389
|
+
The id of the document to update the revocation list for.
|
|
390
|
+
|
|
391
|
+
##### credentialIndex
|
|
392
|
+
|
|
393
|
+
`number`
|
|
394
|
+
|
|
395
|
+
The revocation bitmap index revoke.
|
|
396
|
+
|
|
397
|
+
##### controller?
|
|
398
|
+
|
|
399
|
+
`string`
|
|
400
|
+
|
|
401
|
+
The controller of the identity who can make changes.
|
|
402
|
+
|
|
403
|
+
#### Returns
|
|
404
|
+
|
|
405
|
+
`Promise`\<`void`\>
|
|
406
|
+
|
|
407
|
+
Nothing.
|
|
408
|
+
|
|
409
|
+
#### Implementation of
|
|
410
|
+
|
|
411
|
+
`IIdentityComponent.verifiableCredentialRevoke`
|
|
412
|
+
|
|
413
|
+
***
|
|
414
|
+
|
|
415
|
+
### verifiableCredentialUnrevoke()
|
|
416
|
+
|
|
417
|
+
> **verifiableCredentialUnrevoke**(`issuerIdentity`, `credentialIndex`, `controller?`): `Promise`\<`void`\>
|
|
418
|
+
|
|
419
|
+
Unrevoke verifiable credential.
|
|
420
|
+
|
|
421
|
+
#### Parameters
|
|
422
|
+
|
|
423
|
+
##### issuerIdentity
|
|
424
|
+
|
|
425
|
+
`string`
|
|
426
|
+
|
|
427
|
+
The id of the document to update the revocation list for.
|
|
428
|
+
|
|
429
|
+
##### credentialIndex
|
|
430
|
+
|
|
431
|
+
`number`
|
|
432
|
+
|
|
433
|
+
The revocation bitmap index to un revoke.
|
|
434
|
+
|
|
435
|
+
##### controller?
|
|
436
|
+
|
|
437
|
+
`string`
|
|
438
|
+
|
|
439
|
+
The controller of the identity who can make changes.
|
|
440
|
+
|
|
441
|
+
#### Returns
|
|
442
|
+
|
|
443
|
+
`Promise`\<`void`\>
|
|
444
|
+
|
|
445
|
+
Nothing.
|
|
446
|
+
|
|
447
|
+
#### Implementation of
|
|
448
|
+
|
|
449
|
+
`IIdentityComponent.verifiableCredentialUnrevoke`
|
|
450
|
+
|
|
451
|
+
***
|
|
452
|
+
|
|
453
|
+
### verifiablePresentationCreate()
|
|
454
|
+
|
|
455
|
+
> **verifiablePresentationCreate**(`verificationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `expiresInMinutes?`, `controller?`): `Promise`\<\{ `verifiablePresentation`: `IDidVerifiablePresentation`; `jwt`: `string`; \}\>
|
|
456
|
+
|
|
457
|
+
Create a verifiable presentation from the supplied verifiable credentials.
|
|
458
|
+
|
|
459
|
+
#### Parameters
|
|
460
|
+
|
|
461
|
+
##### verificationMethodId
|
|
462
|
+
|
|
463
|
+
`string`
|
|
464
|
+
|
|
465
|
+
The method to associate with the presentation.
|
|
466
|
+
|
|
467
|
+
##### presentationId
|
|
468
|
+
|
|
469
|
+
The id of the presentation.
|
|
470
|
+
|
|
471
|
+
`undefined` | `string`
|
|
472
|
+
|
|
473
|
+
##### contexts
|
|
474
|
+
|
|
475
|
+
The contexts for the data stored in the verifiable credential.
|
|
476
|
+
|
|
477
|
+
`undefined` | `IJsonLdContextDefinitionRoot`
|
|
478
|
+
|
|
479
|
+
##### types
|
|
480
|
+
|
|
481
|
+
The types for the data stored in the verifiable credential.
|
|
482
|
+
|
|
483
|
+
`undefined` | `string` | `string`[]
|
|
484
|
+
|
|
485
|
+
##### verifiableCredentials
|
|
486
|
+
|
|
487
|
+
(`string` \| `IDidVerifiableCredential`)[]
|
|
488
|
+
|
|
489
|
+
The credentials to use for creating the presentation in jwt format.
|
|
490
|
+
|
|
491
|
+
##### expiresInMinutes?
|
|
492
|
+
|
|
493
|
+
`number`
|
|
494
|
+
|
|
495
|
+
The time in minutes for the presentation to expire.
|
|
496
|
+
|
|
497
|
+
##### controller?
|
|
498
|
+
|
|
499
|
+
`string`
|
|
500
|
+
|
|
501
|
+
The controller of the identity who can make changes.
|
|
502
|
+
|
|
503
|
+
#### Returns
|
|
504
|
+
|
|
505
|
+
`Promise`\<\{ `verifiablePresentation`: `IDidVerifiablePresentation`; `jwt`: `string`; \}\>
|
|
506
|
+
|
|
507
|
+
The created verifiable presentation and its token.
|
|
508
|
+
|
|
509
|
+
#### Throws
|
|
510
|
+
|
|
511
|
+
NotFoundError if the id can not be resolved.
|
|
512
|
+
|
|
513
|
+
#### Implementation of
|
|
514
|
+
|
|
515
|
+
`IIdentityComponent.verifiablePresentationCreate`
|
|
516
|
+
|
|
517
|
+
***
|
|
518
|
+
|
|
519
|
+
### verifiablePresentationVerify()
|
|
520
|
+
|
|
521
|
+
> **verifiablePresentationVerify**(`presentationJwt`): `Promise`\<\{ `revoked`: `boolean`; `verifiablePresentation?`: `IDidVerifiablePresentation`; `issuers?`: `IDidDocument`[]; \}\>
|
|
522
|
+
|
|
523
|
+
Verify a verifiable presentation is valid.
|
|
524
|
+
|
|
525
|
+
#### Parameters
|
|
526
|
+
|
|
527
|
+
##### presentationJwt
|
|
528
|
+
|
|
529
|
+
`string`
|
|
530
|
+
|
|
531
|
+
The presentation to verify.
|
|
532
|
+
|
|
533
|
+
#### Returns
|
|
534
|
+
|
|
535
|
+
`Promise`\<\{ `revoked`: `boolean`; `verifiablePresentation?`: `IDidVerifiablePresentation`; `issuers?`: `IDidDocument`[]; \}\>
|
|
536
|
+
|
|
537
|
+
The presentation stored in the jwt and the revocation status.
|
|
538
|
+
|
|
539
|
+
#### Implementation of
|
|
540
|
+
|
|
541
|
+
`IIdentityComponent.verifiablePresentationVerify`
|
|
542
|
+
|
|
543
|
+
***
|
|
544
|
+
|
|
545
|
+
### proofCreate()
|
|
546
|
+
|
|
547
|
+
> **proofCreate**(`verificationMethodId`, `proofType`, `unsecureDocument`, `controller?`): `Promise`\<`IProof`\>
|
|
548
|
+
|
|
549
|
+
Create a proof for a document with the specified verification method.
|
|
550
|
+
|
|
551
|
+
#### Parameters
|
|
552
|
+
|
|
553
|
+
##### verificationMethodId
|
|
554
|
+
|
|
555
|
+
`string`
|
|
556
|
+
|
|
557
|
+
The verification method id to use.
|
|
558
|
+
|
|
559
|
+
##### proofType
|
|
560
|
+
|
|
561
|
+
`ProofTypes`
|
|
562
|
+
|
|
563
|
+
The type of proof to create.
|
|
564
|
+
|
|
565
|
+
##### unsecureDocument
|
|
566
|
+
|
|
567
|
+
`IJsonLdNodeObject`
|
|
568
|
+
|
|
569
|
+
The unsecure document to create the proof for.
|
|
570
|
+
|
|
571
|
+
##### controller?
|
|
572
|
+
|
|
573
|
+
`string`
|
|
574
|
+
|
|
575
|
+
The controller of the identity who can make changes.
|
|
576
|
+
|
|
577
|
+
#### Returns
|
|
578
|
+
|
|
579
|
+
`Promise`\<`IProof`\>
|
|
580
|
+
|
|
581
|
+
The proof.
|
|
582
|
+
|
|
583
|
+
#### Implementation of
|
|
584
|
+
|
|
585
|
+
`IIdentityComponent.proofCreate`
|
|
586
|
+
|
|
587
|
+
***
|
|
588
|
+
|
|
589
|
+
### proofVerify()
|
|
590
|
+
|
|
591
|
+
> **proofVerify**(`document`, `proof`): `Promise`\<`boolean`\>
|
|
592
|
+
|
|
593
|
+
Verify proof for a document with the specified verification method.
|
|
594
|
+
|
|
595
|
+
#### Parameters
|
|
596
|
+
|
|
597
|
+
##### document
|
|
598
|
+
|
|
599
|
+
`IJsonLdNodeObject`
|
|
600
|
+
|
|
601
|
+
The document to verify.
|
|
602
|
+
|
|
603
|
+
##### proof
|
|
604
|
+
|
|
605
|
+
`IProof`
|
|
606
|
+
|
|
607
|
+
The proof to verify.
|
|
608
|
+
|
|
609
|
+
#### Returns
|
|
610
|
+
|
|
611
|
+
`Promise`\<`boolean`\>
|
|
612
|
+
|
|
613
|
+
True if the proof is verified.
|
|
70
614
|
|
|
71
615
|
#### Implementation of
|
|
72
616
|
|
|
73
|
-
`IIdentityComponent.
|
|
617
|
+
`IIdentityComponent.proofVerify`
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
# Function: generateRestRoutesIdentity()
|
|
2
2
|
|
|
3
|
-
> **generateRestRoutesIdentity**(`baseRouteName`, `componentName`): `IRestRoute`[]
|
|
3
|
+
> **generateRestRoutesIdentity**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
|
|
4
4
|
|
|
5
5
|
The REST routes for identity.
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### baseRouteName
|
|
10
|
+
|
|
11
|
+
`string`
|
|
10
12
|
|
|
11
13
|
Prefix to prepend to the paths.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
14
18
|
|
|
15
19
|
The name of the component to use in the routes stored in the ComponentFactory.
|
|
16
20
|
|
|
17
21
|
## Returns
|
|
18
22
|
|
|
19
|
-
`IRestRoute`[]
|
|
23
|
+
`IRestRoute`\<`any`, `any`\>[]
|
|
20
24
|
|
|
21
25
|
The generated routes.
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
# Function: generateRestRoutesIdentityProfile()
|
|
2
2
|
|
|
3
|
-
> **generateRestRoutesIdentityProfile**(`baseRouteName`, `componentName`): `IRestRoute`[]
|
|
3
|
+
> **generateRestRoutesIdentityProfile**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
|
|
4
4
|
|
|
5
5
|
The REST routes for identity.
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### baseRouteName
|
|
10
|
+
|
|
11
|
+
`string`
|
|
10
12
|
|
|
11
13
|
Prefix to prepend to the paths.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
14
18
|
|
|
15
19
|
The name of the component to use in the routes stored in the ComponentFactory.
|
|
16
20
|
|
|
17
21
|
## Returns
|
|
18
22
|
|
|
19
|
-
`IRestRoute`[]
|
|
23
|
+
`IRestRoute`\<`any`, `any`\>[]
|
|
20
24
|
|
|
21
25
|
The generated routes.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Function: generateRestRoutesIdentityResolver()
|
|
2
|
+
|
|
3
|
+
> **generateRestRoutesIdentityResolver**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
|
|
4
|
+
|
|
5
|
+
The REST routes for identity.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### baseRouteName
|
|
10
|
+
|
|
11
|
+
`string`
|
|
12
|
+
|
|
13
|
+
Prefix to prepend to the paths.
|
|
14
|
+
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
18
|
+
|
|
19
|
+
The name of the component to use in the routes stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`IRestRoute`\<`any`, `any`\>[]
|
|
24
|
+
|
|
25
|
+
The generated routes.
|
|
@@ -6,15 +6,21 @@ Get the list of organizations.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### httpRequestContext
|
|
10
|
+
|
|
11
|
+
`IHttpRequestContext`
|
|
10
12
|
|
|
11
13
|
The request context for the API.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### componentName
|
|
16
|
+
|
|
17
|
+
`string`
|
|
14
18
|
|
|
15
19
|
The name of the component to use in the routes stored in the ComponentFactory.
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityProfileListRequest`
|
|
18
24
|
|
|
19
25
|
The request.
|
|
20
26
|
|