@twin.org/identity-models 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 +3 -3
- package/dist/es/contextIdHandlers/didContextIdHandler.js +3 -3
- package/dist/es/contextIdHandlers/didContextIdHandler.js.map +1 -1
- package/dist/es/index.js +6 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IIdentityComponent.js.map +1 -1
- package/dist/es/models/IIdentityConnector.js.map +1 -1
- package/dist/es/models/IIdentityProfileComponent.js.map +1 -1
- package/dist/es/models/IIdentityProfileConnector.js.map +1 -1
- package/dist/es/models/api/identity/IIdentityAlsoKnownAsCreateRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityAlsoKnownAsCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityAlsoKnownAsRemoveRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityAlsoKnownAsRemoveRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialCreateRequest.js.map +1 -1
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialVerifyDocumentRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialVerifyDocumentRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationCreateRequest.js.map +1 -1
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationVerifyDocumentRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationVerifyDocumentRequest.js.map +1 -0
- package/dist/es/models/identityMetricIds.js +49 -0
- package/dist/es/models/identityMetricIds.js.map +1 -0
- package/dist/es/models/identityMetrics.js +61 -0
- package/dist/es/models/identityMetrics.js.map +1 -0
- package/dist/es/types/did.js +3 -3
- package/dist/es/types/did.js.map +1 -1
- package/dist/es/utils/verificationHelper.js +4 -4
- package/dist/es/utils/verificationHelper.js.map +1 -1
- package/dist/types/contextIdHandlers/didContextIdHandler.d.ts +3 -3
- package/dist/types/index.d.ts +6 -0
- package/dist/types/models/IIdentityComponent.d.ts +54 -13
- package/dist/types/models/IIdentityConnector.d.ts +53 -12
- package/dist/types/models/IIdentityProfileComponent.d.ts +3 -3
- package/dist/types/models/IIdentityProfileConnector.d.ts +3 -3
- package/dist/types/models/api/identity/IIdentityAlsoKnownAsCreateRequest.d.ts +23 -0
- package/dist/types/models/api/identity/IIdentityAlsoKnownAsRemoveRequest.d.ts +18 -0
- package/dist/types/models/api/identity/IIdentityVerifiableCredentialCreateRequest.d.ts +12 -0
- package/dist/types/models/api/identity/IIdentityVerifiableCredentialVerifyDocumentRequest.d.ts +10 -0
- package/dist/types/models/api/identity/IIdentityVerifiablePresentationCreateRequest.d.ts +14 -2
- package/dist/types/models/api/identity/IIdentityVerifiablePresentationVerifyDocumentRequest.d.ts +10 -0
- package/dist/types/models/identityMetricIds.d.ts +49 -0
- package/dist/types/models/identityMetrics.d.ts +5 -0
- package/dist/types/types/did.d.ts +3 -3
- package/dist/types/utils/verificationHelper.d.ts +4 -4
- package/docs/changelog.md +409 -99
- package/docs/examples.md +157 -1
- package/docs/reference/classes/Did.md +7 -7
- package/docs/reference/classes/DidContextIdHandler.md +7 -7
- package/docs/reference/classes/DocumentHelper.md +5 -5
- package/docs/reference/classes/VerificationHelper.md +7 -7
- package/docs/reference/index.md +10 -0
- package/docs/reference/interfaces/IIdentityAlsoKnownAsCreateRequest.md +31 -0
- package/docs/reference/interfaces/IIdentityAlsoKnownAsRemoveRequest.md +23 -0
- package/docs/reference/interfaces/IIdentityComponent.md +157 -43
- package/docs/reference/interfaces/IIdentityConnector.md +156 -42
- package/docs/reference/interfaces/IIdentityCreateRequest.md +3 -3
- package/docs/reference/interfaces/IIdentityCreateResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityProfileComponent.md +9 -9
- package/docs/reference/interfaces/IIdentityProfileConnector.md +8 -8
- package/docs/reference/interfaces/IIdentityProfileCreateRequest.md +3 -3
- package/docs/reference/interfaces/IIdentityProfileGetPublicRequest.md +4 -4
- package/docs/reference/interfaces/IIdentityProfileGetPublicResponse.md +2 -2
- package/docs/reference/interfaces/IIdentityProfileGetRequest.md +4 -4
- package/docs/reference/interfaces/IIdentityProfileGetResponse.md +3 -3
- package/docs/reference/interfaces/IIdentityProfileListRequest.md +6 -6
- package/docs/reference/interfaces/IIdentityProfileListResponse.md +2 -2
- package/docs/reference/interfaces/IIdentityProfileUpdateRequest.md +3 -3
- package/docs/reference/interfaces/IIdentityProofCreateRequest.md +2 -2
- package/docs/reference/interfaces/IIdentityProofCreateResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityProofVerifyRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityProofVerifyResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityRemoveRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityResolveRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityResolveResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityResolverComponent.md +1 -1
- package/docs/reference/interfaces/IIdentityResolverConnector.md +1 -1
- package/docs/reference/interfaces/IIdentityServiceCreateRequest.md +2 -2
- package/docs/reference/interfaces/IIdentityServiceCreateResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityServiceRemoveRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiableCredentialCreateRequest.md +25 -5
- package/docs/reference/interfaces/IIdentityVerifiableCredentialCreateResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiableCredentialRevokeRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiableCredentialUnrevokeRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiableCredentialVerifyDocumentRequest.md +11 -0
- package/docs/reference/interfaces/IIdentityVerifiableCredentialVerifyRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiableCredentialVerifyResponse.md +2 -2
- package/docs/reference/interfaces/IIdentityVerifiablePresentationCreateRequest.md +28 -8
- package/docs/reference/interfaces/IIdentityVerifiablePresentationCreateResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiablePresentationVerifyDocumentRequest.md +11 -0
- package/docs/reference/interfaces/IIdentityVerifiablePresentationVerifyRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityVerifiablePresentationVerifyResponse.md +3 -3
- package/docs/reference/interfaces/IIdentityVerificationMethodCreateRequest.md +3 -3
- package/docs/reference/interfaces/IIdentityVerificationMethodCreateResponse.md +1 -1
- package/docs/reference/interfaces/IIdentityVerificationMethodRemoveRequest.md +1 -1
- package/docs/reference/type-aliases/IdentityMetricIds.md +5 -0
- package/docs/reference/variables/IdentityMetricIds.md +67 -0
- package/docs/reference/variables/IdentityMetrics.md +5 -0
- package/package.json +12 -11
|
@@ -8,7 +8,7 @@ Interface describing an identity connector.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### createDocument()
|
|
11
|
+
### createDocument() {#createdocument}
|
|
12
12
|
|
|
13
13
|
> **createDocument**(`controller`): `Promise`\<`IDidDocument`\>
|
|
14
14
|
|
|
@@ -30,7 +30,7 @@ The created document.
|
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
33
|
-
### removeDocument()
|
|
33
|
+
### removeDocument() {#removedocument}
|
|
34
34
|
|
|
35
35
|
> **removeDocument**(`controller`, `documentId`): `Promise`\<`void`\>
|
|
36
36
|
|
|
@@ -54,11 +54,11 @@ The id of the document to remove.
|
|
|
54
54
|
|
|
55
55
|
`Promise`\<`void`\>
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
A promise that resolves when the document has been removed.
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
|
-
### addVerificationMethod()
|
|
61
|
+
### addVerificationMethod() {#addverificationmethod}
|
|
62
62
|
|
|
63
63
|
> **addVerificationMethod**(`controller`, `documentId`, `verificationMethodType`, `verificationMethodId?`): `Promise`\<`IDidDocumentVerificationMethod`\>
|
|
64
64
|
|
|
@@ -106,7 +106,7 @@ NotSupportedError if the platform does not support multiple keys.
|
|
|
106
106
|
|
|
107
107
|
***
|
|
108
108
|
|
|
109
|
-
### removeVerificationMethod()
|
|
109
|
+
### removeVerificationMethod() {#removeverificationmethod}
|
|
110
110
|
|
|
111
111
|
> **removeVerificationMethod**(`controller`, `verificationMethodId`): `Promise`\<`void`\>
|
|
112
112
|
|
|
@@ -130,7 +130,7 @@ The id of the verification method.
|
|
|
130
130
|
|
|
131
131
|
`Promise`\<`void`\>
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
A promise that resolves when the verification method has been removed.
|
|
134
134
|
|
|
135
135
|
#### Throws
|
|
136
136
|
|
|
@@ -142,7 +142,7 @@ NotSupportedError if the platform does not support multiple revocable keys.
|
|
|
142
142
|
|
|
143
143
|
***
|
|
144
144
|
|
|
145
|
-
### addService()
|
|
145
|
+
### addService() {#addservice}
|
|
146
146
|
|
|
147
147
|
> **addService**(`controller`, `documentId`, `serviceId`, `serviceType`, `serviceEndpoint`): `Promise`\<`IDidService`\>
|
|
148
148
|
|
|
@@ -170,15 +170,15 @@ The id of the service.
|
|
|
170
170
|
|
|
171
171
|
##### serviceType
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
`string` \| `string`[]
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
The type of the service.
|
|
176
176
|
|
|
177
177
|
##### serviceEndpoint
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
`string` \| `string`[]
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
The endpoint for the service.
|
|
182
182
|
|
|
183
183
|
#### Returns
|
|
184
184
|
|
|
@@ -192,7 +192,7 @@ NotFoundError if the id can not be resolved.
|
|
|
192
192
|
|
|
193
193
|
***
|
|
194
194
|
|
|
195
|
-
### removeService()
|
|
195
|
+
### removeService() {#removeservice}
|
|
196
196
|
|
|
197
197
|
> **removeService**(`controller`, `serviceId`): `Promise`\<`void`\>
|
|
198
198
|
|
|
@@ -216,7 +216,93 @@ The id of the service.
|
|
|
216
216
|
|
|
217
217
|
`Promise`\<`void`\>
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
A promise that resolves when the service has been removed.
|
|
220
|
+
|
|
221
|
+
#### Throws
|
|
222
|
+
|
|
223
|
+
NotFoundError if the id can not be resolved.
|
|
224
|
+
|
|
225
|
+
***
|
|
226
|
+
|
|
227
|
+
### addAlsoKnownAs() {#addalsoknownas}
|
|
228
|
+
|
|
229
|
+
> **addAlsoKnownAs**(`controller`, `documentId`, `alias`): `Promise`\<`void`\>
|
|
230
|
+
|
|
231
|
+
Add an alias to the alsoKnownAs property on the document.
|
|
232
|
+
If the alias is already present the operation is a no-op.
|
|
233
|
+
|
|
234
|
+
#### Parameters
|
|
235
|
+
|
|
236
|
+
##### controller
|
|
237
|
+
|
|
238
|
+
`string`
|
|
239
|
+
|
|
240
|
+
The controller of the identity who can make changes.
|
|
241
|
+
|
|
242
|
+
##### documentId
|
|
243
|
+
|
|
244
|
+
`string`
|
|
245
|
+
|
|
246
|
+
The id of the document to update.
|
|
247
|
+
|
|
248
|
+
##### alias
|
|
249
|
+
|
|
250
|
+
`string`
|
|
251
|
+
|
|
252
|
+
The alias to add. Must be a Url or Urn (typically another DID).
|
|
253
|
+
|
|
254
|
+
#### Returns
|
|
255
|
+
|
|
256
|
+
`Promise`\<`void`\>
|
|
257
|
+
|
|
258
|
+
A promise that resolves when the alias has been added.
|
|
259
|
+
|
|
260
|
+
#### Throws
|
|
261
|
+
|
|
262
|
+
GeneralError if the alias is not a Url or Urn.
|
|
263
|
+
|
|
264
|
+
#### Throws
|
|
265
|
+
|
|
266
|
+
NotFoundError if the id can not be resolved.
|
|
267
|
+
|
|
268
|
+
***
|
|
269
|
+
|
|
270
|
+
### removeAlsoKnownAs() {#removealsoknownas}
|
|
271
|
+
|
|
272
|
+
> **removeAlsoKnownAs**(`controller`, `documentId`, `alias`): `Promise`\<`void`\>
|
|
273
|
+
|
|
274
|
+
Remove an alias from the alsoKnownAs property on the document.
|
|
275
|
+
If the alias is not present the operation is a no-op.
|
|
276
|
+
|
|
277
|
+
#### Parameters
|
|
278
|
+
|
|
279
|
+
##### controller
|
|
280
|
+
|
|
281
|
+
`string`
|
|
282
|
+
|
|
283
|
+
The controller of the identity who can make changes.
|
|
284
|
+
|
|
285
|
+
##### documentId
|
|
286
|
+
|
|
287
|
+
`string`
|
|
288
|
+
|
|
289
|
+
The id of the document to update.
|
|
290
|
+
|
|
291
|
+
##### alias
|
|
292
|
+
|
|
293
|
+
`string`
|
|
294
|
+
|
|
295
|
+
The alias to remove. Must be a Url or Urn.
|
|
296
|
+
|
|
297
|
+
#### Returns
|
|
298
|
+
|
|
299
|
+
`Promise`\<`void`\>
|
|
300
|
+
|
|
301
|
+
A promise that resolves when the alias has been removed.
|
|
302
|
+
|
|
303
|
+
#### Throws
|
|
304
|
+
|
|
305
|
+
GeneralError if the alias is not a Url or Urn.
|
|
220
306
|
|
|
221
307
|
#### Throws
|
|
222
308
|
|
|
@@ -224,7 +310,7 @@ NotFoundError if the id can not be resolved.
|
|
|
224
310
|
|
|
225
311
|
***
|
|
226
312
|
|
|
227
|
-
### createVerifiableCredential()
|
|
313
|
+
### createVerifiableCredential() {#createverifiablecredential}
|
|
228
314
|
|
|
229
315
|
> **createVerifiableCredential**(`controller`, `verificationMethodId`, `id`, `subject`, `options?`): `Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
230
316
|
|
|
@@ -246,9 +332,9 @@ The verification method id to use.
|
|
|
246
332
|
|
|
247
333
|
##### id
|
|
248
334
|
|
|
249
|
-
|
|
335
|
+
`string` \| `undefined`
|
|
250
336
|
|
|
251
|
-
|
|
337
|
+
The id of the credential.
|
|
252
338
|
|
|
253
339
|
##### subject
|
|
254
340
|
|
|
@@ -272,6 +358,18 @@ The bitmap revocation index of the credential, if undefined will not have revoca
|
|
|
272
358
|
|
|
273
359
|
The date the verifiable credential is valid until.
|
|
274
360
|
|
|
361
|
+
###### jwtHeaderFields?
|
|
362
|
+
|
|
363
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
364
|
+
|
|
365
|
+
Additional fields to include in the JWT header when creating the verifiable credential in jwt format.
|
|
366
|
+
|
|
367
|
+
###### jwtPayloadFields?
|
|
368
|
+
|
|
369
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
370
|
+
|
|
371
|
+
Additional fields to include in the JWT payload when creating the verifiable credential in jwt format.
|
|
372
|
+
|
|
275
373
|
#### Returns
|
|
276
374
|
|
|
277
375
|
`Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
@@ -284,17 +382,17 @@ NotFoundError if the id can not be resolved.
|
|
|
284
382
|
|
|
285
383
|
***
|
|
286
384
|
|
|
287
|
-
### checkVerifiableCredential()
|
|
385
|
+
### checkVerifiableCredential() {#checkverifiablecredential}
|
|
288
386
|
|
|
289
|
-
> **checkVerifiableCredential**(`
|
|
387
|
+
> **checkVerifiableCredential**(`credential`): `Promise`\<\{ `revoked`: `boolean`; `verifiableCredential?`: `IDidVerifiableCredential`; \}\>
|
|
290
388
|
|
|
291
389
|
Check a verifiable credential is valid.
|
|
292
390
|
|
|
293
391
|
#### Parameters
|
|
294
392
|
|
|
295
|
-
#####
|
|
393
|
+
##### credential
|
|
296
394
|
|
|
297
|
-
`string`
|
|
395
|
+
`string` \| `IDidVerifiableCredential`
|
|
298
396
|
|
|
299
397
|
The credential to verify.
|
|
300
398
|
|
|
@@ -306,7 +404,7 @@ The credential stored in the jwt and the revocation status.
|
|
|
306
404
|
|
|
307
405
|
***
|
|
308
406
|
|
|
309
|
-
### revokeVerifiableCredentials()
|
|
407
|
+
### revokeVerifiableCredentials() {#revokeverifiablecredentials}
|
|
310
408
|
|
|
311
409
|
> **revokeVerifiableCredentials**(`controller`, `issuerDocumentId`, `credentialIndices`): `Promise`\<`void`\>
|
|
312
410
|
|
|
@@ -336,11 +434,11 @@ The revocation bitmap index or indices to revoke.
|
|
|
336
434
|
|
|
337
435
|
`Promise`\<`void`\>
|
|
338
436
|
|
|
339
|
-
|
|
437
|
+
A promise that resolves when the credentials have been revoked.
|
|
340
438
|
|
|
341
439
|
***
|
|
342
440
|
|
|
343
|
-
### unrevokeVerifiableCredentials()
|
|
441
|
+
### unrevokeVerifiableCredentials() {#unrevokeverifiablecredentials}
|
|
344
442
|
|
|
345
443
|
> **unrevokeVerifiableCredentials**(`controller`, `issuerDocumentId`, `credentialIndices`): `Promise`\<`void`\>
|
|
346
444
|
|
|
@@ -364,19 +462,19 @@ The id of the document to update the revocation list for.
|
|
|
364
462
|
|
|
365
463
|
`number`[]
|
|
366
464
|
|
|
367
|
-
The revocation bitmap index or indices to
|
|
465
|
+
The revocation bitmap index or indices to unrevoke.
|
|
368
466
|
|
|
369
467
|
#### Returns
|
|
370
468
|
|
|
371
469
|
`Promise`\<`void`\>
|
|
372
470
|
|
|
373
|
-
|
|
471
|
+
A promise that resolves when the credentials have been unrevoked.
|
|
374
472
|
|
|
375
473
|
***
|
|
376
474
|
|
|
377
|
-
### createVerifiablePresentation()
|
|
475
|
+
### createVerifiablePresentation() {#createverifiablepresentation}
|
|
378
476
|
|
|
379
|
-
> **createVerifiablePresentation**(`controller`, `verificationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `
|
|
477
|
+
> **createVerifiablePresentation**(`controller`, `verificationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `options?`): `Promise`\<\{ `verifiablePresentation`: `IDidVerifiablePresentation`; `jwt`: `string`; \}\>
|
|
380
478
|
|
|
381
479
|
Create a verifiable presentation from the supplied verifiable credentials.
|
|
382
480
|
|
|
@@ -396,21 +494,21 @@ The method to associate with the presentation.
|
|
|
396
494
|
|
|
397
495
|
##### presentationId
|
|
398
496
|
|
|
399
|
-
|
|
497
|
+
`string` \| `undefined`
|
|
400
498
|
|
|
401
|
-
|
|
499
|
+
The id of the presentation.
|
|
402
500
|
|
|
403
501
|
##### contexts
|
|
404
502
|
|
|
405
|
-
|
|
503
|
+
`IJsonLdContextDefinitionRoot` \| `undefined`
|
|
406
504
|
|
|
407
|
-
|
|
505
|
+
The contexts for the data stored in the verifiable credential.
|
|
408
506
|
|
|
409
507
|
##### types
|
|
410
508
|
|
|
411
|
-
|
|
509
|
+
`string` \| `string`[] \| `undefined`
|
|
412
510
|
|
|
413
|
-
|
|
511
|
+
The types for the data stored in the verifiable credential.
|
|
414
512
|
|
|
415
513
|
##### verifiableCredentials
|
|
416
514
|
|
|
@@ -418,11 +516,27 @@ The types for the data stored in the verifiable credential.
|
|
|
418
516
|
|
|
419
517
|
The credentials to use for creating the presentation in jwt format.
|
|
420
518
|
|
|
421
|
-
#####
|
|
519
|
+
##### options?
|
|
422
520
|
|
|
423
|
-
|
|
521
|
+
Additional options for creating the verifiable presentation.
|
|
522
|
+
|
|
523
|
+
###### expirationDate?
|
|
524
|
+
|
|
525
|
+
`Date`
|
|
526
|
+
|
|
527
|
+
The date the verifiable presentation is valid until.
|
|
424
528
|
|
|
425
|
-
|
|
529
|
+
###### jwtHeaderFields?
|
|
530
|
+
|
|
531
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
532
|
+
|
|
533
|
+
Additional fields to include in the JWT header when creating the verifiable presentation in jwt format.
|
|
534
|
+
|
|
535
|
+
###### jwtPayloadFields?
|
|
536
|
+
|
|
537
|
+
\{\[`id`: `string`\]: `string`; \}
|
|
538
|
+
|
|
539
|
+
Additional fields to include in the JWT payload when creating the verifiable presentation in jwt format.
|
|
426
540
|
|
|
427
541
|
#### Returns
|
|
428
542
|
|
|
@@ -436,17 +550,17 @@ NotFoundError if the id can not be resolved.
|
|
|
436
550
|
|
|
437
551
|
***
|
|
438
552
|
|
|
439
|
-
### checkVerifiablePresentation()
|
|
553
|
+
### checkVerifiablePresentation() {#checkverifiablepresentation}
|
|
440
554
|
|
|
441
|
-
> **checkVerifiablePresentation**(`
|
|
555
|
+
> **checkVerifiablePresentation**(`presentation`): `Promise`\<\{ `revoked`: `boolean`; `verifiablePresentation?`: `IDidVerifiablePresentation`; `issuers?`: `IDidDocument`[]; \}\>
|
|
442
556
|
|
|
443
557
|
Check a verifiable presentation is valid.
|
|
444
558
|
|
|
445
559
|
#### Parameters
|
|
446
560
|
|
|
447
|
-
#####
|
|
561
|
+
##### presentation
|
|
448
562
|
|
|
449
|
-
`string`
|
|
563
|
+
`string` \| `IDidVerifiablePresentation`
|
|
450
564
|
|
|
451
565
|
The presentation to verify.
|
|
452
566
|
|
|
@@ -458,7 +572,7 @@ The presentation stored in the jwt and the revocation status.
|
|
|
458
572
|
|
|
459
573
|
***
|
|
460
574
|
|
|
461
|
-
### createProof()
|
|
575
|
+
### createProof() {#createproof}
|
|
462
576
|
|
|
463
577
|
> **createProof**(`controller`, `verificationMethodId`, `proofType`, `unsecureDocument`): `Promise`\<`IProof`\>
|
|
464
578
|
|
|
@@ -498,7 +612,7 @@ The proof.
|
|
|
498
612
|
|
|
499
613
|
***
|
|
500
614
|
|
|
501
|
-
### verifyProof()
|
|
615
|
+
### verifyProof() {#verifyproof}
|
|
502
616
|
|
|
503
617
|
> **verifyProof**(`document`, `proof`): `Promise`\<`boolean`\>
|
|
504
618
|
|
|
@@ -4,14 +4,14 @@ Request to create an identity.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body?
|
|
7
|
+
### body? {#body}
|
|
8
8
|
|
|
9
|
-
> `optional` **body
|
|
9
|
+
> `optional` **body?**: `object`
|
|
10
10
|
|
|
11
11
|
The data for the request.
|
|
12
12
|
|
|
13
13
|
#### namespace?
|
|
14
14
|
|
|
15
|
-
> `optional` **namespace
|
|
15
|
+
> `optional` **namespace?**: `string`
|
|
16
16
|
|
|
17
17
|
The optional namespace to create the identity in.
|
|
@@ -18,7 +18,7 @@ Interface describing a contract which provides profile operations.
|
|
|
18
18
|
|
|
19
19
|
## Methods
|
|
20
20
|
|
|
21
|
-
### create()
|
|
21
|
+
### create() {#create}
|
|
22
22
|
|
|
23
23
|
> **create**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
24
24
|
|
|
@@ -48,11 +48,11 @@ The identity to perform the profile operation on.
|
|
|
48
48
|
|
|
49
49
|
`Promise`\<`void`\>
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
A promise that resolves when the profile has been created.
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### get()
|
|
55
|
+
### get() {#get}
|
|
56
56
|
|
|
57
57
|
> **get**(`publicPropertyNames?`, `privatePropertyNames?`, `identity?`): `Promise`\<\{ `identity`: `string`; `publicProfile?`: `Partial`\<`T`\>; `privateProfile?`: `Partial`\<`U`\>; \}\>
|
|
58
58
|
|
|
@@ -86,7 +86,7 @@ The items identity and the properties.
|
|
|
86
86
|
|
|
87
87
|
***
|
|
88
88
|
|
|
89
|
-
### getPublic()
|
|
89
|
+
### getPublic() {#getpublic}
|
|
90
90
|
|
|
91
91
|
> **getPublic**(`identity`, `propertyNames?`): `Promise`\<`Partial`\<`T`\>\>
|
|
92
92
|
|
|
@@ -114,7 +114,7 @@ The items properties.
|
|
|
114
114
|
|
|
115
115
|
***
|
|
116
116
|
|
|
117
|
-
### update()
|
|
117
|
+
### update() {#update}
|
|
118
118
|
|
|
119
119
|
> **update**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
120
120
|
|
|
@@ -144,11 +144,11 @@ The identity to perform the profile operation on.
|
|
|
144
144
|
|
|
145
145
|
`Promise`\<`void`\>
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
A promise that resolves when the profile has been updated.
|
|
148
148
|
|
|
149
149
|
***
|
|
150
150
|
|
|
151
|
-
### remove()
|
|
151
|
+
### remove() {#remove}
|
|
152
152
|
|
|
153
153
|
> **remove**(`identity?`): `Promise`\<`void`\>
|
|
154
154
|
|
|
@@ -166,11 +166,11 @@ The identity to perform the profile operation on.
|
|
|
166
166
|
|
|
167
167
|
`Promise`\<`void`\>
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
A promise that resolves when the profile has been removed.
|
|
170
170
|
|
|
171
171
|
***
|
|
172
172
|
|
|
173
|
-
### list()
|
|
173
|
+
### list() {#list}
|
|
174
174
|
|
|
175
175
|
> **list**(`publicFilters?`, `publicPropertyNames?`, `cursor?`, `limit?`): `Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
176
176
|
|
|
@@ -18,7 +18,7 @@ Interface describing a contract which provides profile operations.
|
|
|
18
18
|
|
|
19
19
|
## Methods
|
|
20
20
|
|
|
21
|
-
### create()
|
|
21
|
+
### create() {#create}
|
|
22
22
|
|
|
23
23
|
> **create**(`identity`, `publicProfile?`, `privateProfile?`): `Promise`\<`void`\>
|
|
24
24
|
|
|
@@ -48,11 +48,11 @@ The private profile data as JSON-LD.
|
|
|
48
48
|
|
|
49
49
|
`Promise`\<`void`\>
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
A promise that resolves when the profile has been created.
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### get()
|
|
55
|
+
### get() {#get}
|
|
56
56
|
|
|
57
57
|
> **get**(`identity`, `publicPropertyNames?`, `privatePropertyNames?`): `Promise`\<\{ `publicProfile`: `Partial`\<`T`\>; `privateProfile`: `Partial`\<`U`\>; \}\>
|
|
58
58
|
|
|
@@ -86,7 +86,7 @@ The identity profile, will only return private data if you have correct permissi
|
|
|
86
86
|
|
|
87
87
|
***
|
|
88
88
|
|
|
89
|
-
### update()
|
|
89
|
+
### update() {#update}
|
|
90
90
|
|
|
91
91
|
> **update**(`identity`, `publicProfile?`, `privateProfile?`): `Promise`\<`void`\>
|
|
92
92
|
|
|
@@ -116,11 +116,11 @@ The private profile data as JSON-LD.
|
|
|
116
116
|
|
|
117
117
|
`Promise`\<`void`\>
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
A promise that resolves when the profile has been updated.
|
|
120
120
|
|
|
121
121
|
***
|
|
122
122
|
|
|
123
|
-
### remove()
|
|
123
|
+
### remove() {#remove}
|
|
124
124
|
|
|
125
125
|
> **remove**(`identity`): `Promise`\<`void`\>
|
|
126
126
|
|
|
@@ -138,11 +138,11 @@ The identity to delete.
|
|
|
138
138
|
|
|
139
139
|
`Promise`\<`void`\>
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
A promise that resolves when the profile has been removed.
|
|
142
142
|
|
|
143
143
|
***
|
|
144
144
|
|
|
145
|
-
### list()
|
|
145
|
+
### list() {#list}
|
|
146
146
|
|
|
147
147
|
> **list**(`publicFilters?`, `privateFilters?`, `publicPropertyNames?`, `privatePropertyNames?`, `cursor?`, `limit?`): `Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
148
148
|
|
|
@@ -4,7 +4,7 @@ Request to create an identity profile.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
9
|
> **body**: `object`
|
|
10
10
|
|
|
@@ -12,12 +12,12 @@ The data for the request.
|
|
|
12
12
|
|
|
13
13
|
#### publicProfile?
|
|
14
14
|
|
|
15
|
-
> `optional` **publicProfile
|
|
15
|
+
> `optional` **publicProfile?**: `IJsonLdDocument`
|
|
16
16
|
|
|
17
17
|
The public profile data.
|
|
18
18
|
|
|
19
19
|
#### privateProfile?
|
|
20
20
|
|
|
21
|
-
> `optional` **privateProfile
|
|
21
|
+
> `optional` **privateProfile?**: `IJsonLdDocument`
|
|
22
22
|
|
|
23
23
|
The private profile data.
|
|
@@ -4,7 +4,7 @@ Get the public profile for an identity.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### pathParams
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
8
|
|
|
9
9
|
> **pathParams**: `object`
|
|
10
10
|
|
|
@@ -18,14 +18,14 @@ The identity to get the profile for.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### query?
|
|
21
|
+
### query? {#query}
|
|
22
22
|
|
|
23
|
-
> `optional` **query
|
|
23
|
+
> `optional` **query?**: `object`
|
|
24
24
|
|
|
25
25
|
The query parameters.
|
|
26
26
|
|
|
27
27
|
#### propertyNames?
|
|
28
28
|
|
|
29
|
-
> `optional` **propertyNames
|
|
29
|
+
> `optional` **propertyNames?**: `string`
|
|
30
30
|
|
|
31
31
|
The properties to get for the public profile, defaults to all, should be a comma separated list.
|
|
@@ -4,7 +4,7 @@ Response to get an identity public profile.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### headers
|
|
7
|
+
### headers {#headers}
|
|
8
8
|
|
|
9
9
|
> **headers**: `object`
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ The response headers.
|
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
19
|
-
### body
|
|
19
|
+
### body {#body}
|
|
20
20
|
|
|
21
21
|
> **body**: `Partial`\<`IJsonLdDocument`\>
|
|
22
22
|
|
|
@@ -4,20 +4,20 @@ Get the profile for an identity.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### query?
|
|
7
|
+
### query? {#query}
|
|
8
8
|
|
|
9
|
-
> `optional` **query
|
|
9
|
+
> `optional` **query?**: `object`
|
|
10
10
|
|
|
11
11
|
The query parameters.
|
|
12
12
|
|
|
13
13
|
#### publicPropertyNames?
|
|
14
14
|
|
|
15
|
-
> `optional` **publicPropertyNames
|
|
15
|
+
> `optional` **publicPropertyNames?**: `string`
|
|
16
16
|
|
|
17
17
|
The public properties to get for the profile, defaults to all, should be a comma separated list.
|
|
18
18
|
|
|
19
19
|
#### privatePropertyNames?
|
|
20
20
|
|
|
21
|
-
> `optional` **privatePropertyNames
|
|
21
|
+
> `optional` **privatePropertyNames?**: `string`
|
|
22
22
|
|
|
23
23
|
The private properties to get for the profile, defaults to all, should be a comma separated list.
|
|
@@ -4,7 +4,7 @@ Response to get an identity details.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
9
|
> **body**: `object`
|
|
10
10
|
|
|
@@ -18,12 +18,12 @@ The identity of the profile, this is the authenticated user identity.
|
|
|
18
18
|
|
|
19
19
|
#### publicProfile?
|
|
20
20
|
|
|
21
|
-
> `optional` **publicProfile
|
|
21
|
+
> `optional` **publicProfile?**: `Partial`\<`IJsonLdDocument`\>
|
|
22
22
|
|
|
23
23
|
The public profile data.
|
|
24
24
|
|
|
25
25
|
#### privateProfile?
|
|
26
26
|
|
|
27
|
-
> `optional` **privateProfile
|
|
27
|
+
> `optional` **privateProfile?**: `Partial`\<`IJsonLdDocument`\>
|
|
28
28
|
|
|
29
29
|
The private profile data.
|
|
@@ -4,32 +4,32 @@ Request to get a list of identities.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### query?
|
|
7
|
+
### query? {#query}
|
|
8
8
|
|
|
9
|
-
> `optional` **query
|
|
9
|
+
> `optional` **query?**: `object`
|
|
10
10
|
|
|
11
11
|
The query parameters.
|
|
12
12
|
|
|
13
13
|
#### publicFilters?
|
|
14
14
|
|
|
15
|
-
> `optional` **publicFilters
|
|
15
|
+
> `optional` **publicFilters?**: `string`
|
|
16
16
|
|
|
17
17
|
The public filters to apply to the list, comma separated list with color between key and value for each pair e.g. prop1:value1,prop2:value2.
|
|
18
18
|
|
|
19
19
|
#### publicPropertyNames?
|
|
20
20
|
|
|
21
|
-
> `optional` **publicPropertyNames
|
|
21
|
+
> `optional` **publicPropertyNames?**: `string`
|
|
22
22
|
|
|
23
23
|
The public properties to get for the profile, defaults to all, should be a comma separated list.
|
|
24
24
|
|
|
25
25
|
#### cursor?
|
|
26
26
|
|
|
27
|
-
> `optional` **cursor
|
|
27
|
+
> `optional` **cursor?**: `string`
|
|
28
28
|
|
|
29
29
|
The cursor for paged requests.
|
|
30
30
|
|
|
31
31
|
#### limit?
|
|
32
32
|
|
|
33
|
-
> `optional` **limit
|
|
33
|
+
> `optional` **limit?**: `string`
|
|
34
34
|
|
|
35
35
|
Number of items to return.
|