@twin.org/identity-service 0.0.1-next.8 → 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.
Files changed (50) hide show
  1. package/dist/cjs/index.cjs +1417 -48
  2. package/dist/esm/index.mjs +1403 -51
  3. package/dist/types/identityProfileRoutes.d.ts +1 -1
  4. package/dist/types/identityProfileService.d.ts +6 -4
  5. package/dist/types/identityResolverRoutes.d.ts +21 -0
  6. package/dist/types/identityResolverService.d.ts +27 -0
  7. package/dist/types/identityRoutes.d.ts +108 -4
  8. package/dist/types/identityService.d.ts +136 -10
  9. package/dist/types/index.d.ts +6 -0
  10. package/dist/types/models/IIdentityProfileServiceConstructorOptions.d.ts +10 -0
  11. package/dist/types/models/IIdentityResolverServiceConfig.d.ts +9 -0
  12. package/dist/types/models/IIdentityResolverServiceConstructorOptions.d.ts +15 -0
  13. package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +10 -0
  14. package/docs/changelog.md +302 -1
  15. package/docs/open-api/spec.json +2948 -1360
  16. package/docs/reference/classes/IdentityProfileService.md +76 -58
  17. package/docs/reference/classes/IdentityResolverService.md +73 -0
  18. package/docs/reference/classes/IdentityService.md +560 -16
  19. package/docs/reference/functions/generateRestRoutesIdentity.md +8 -4
  20. package/docs/reference/functions/generateRestRoutesIdentityProfile.md +8 -4
  21. package/docs/reference/functions/generateRestRoutesIdentityResolver.md +25 -0
  22. package/docs/reference/functions/identitiesList.md +9 -3
  23. package/docs/reference/functions/identityCreate.md +31 -0
  24. package/docs/reference/functions/identityGet.md +9 -3
  25. package/docs/reference/functions/identityGetPublic.md +9 -3
  26. package/docs/reference/functions/identityProfileCreate.md +9 -3
  27. package/docs/reference/functions/identityProfileRemove.md +9 -3
  28. package/docs/reference/functions/identityProfileUpdate.md +9 -3
  29. package/docs/reference/functions/identityProofCreate.md +31 -0
  30. package/docs/reference/functions/identityProofVerify.md +31 -0
  31. package/docs/reference/functions/identityRemove.md +31 -0
  32. package/docs/reference/functions/identityResolve.md +9 -3
  33. package/docs/reference/functions/identityServiceCreate.md +31 -0
  34. package/docs/reference/functions/identityServiceRemove.md +31 -0
  35. package/docs/reference/functions/identityVerifiableCredentialCreate.md +31 -0
  36. package/docs/reference/functions/identityVerifiableCredentialRevoke.md +31 -0
  37. package/docs/reference/functions/identityVerifiableCredentialUnrevoke.md +31 -0
  38. package/docs/reference/functions/identityVerifiableCredentialVerify.md +31 -0
  39. package/docs/reference/functions/identityVerifiablePresentationCreate.md +31 -0
  40. package/docs/reference/functions/identityVerifiablePresentationVerify.md +31 -0
  41. package/docs/reference/functions/identityVerificationMethodCreate.md +31 -0
  42. package/docs/reference/functions/identityVerificationMethodRemove.md +31 -0
  43. package/docs/reference/index.md +22 -1
  44. package/docs/reference/interfaces/IIdentityProfileServiceConstructorOptions.md +17 -0
  45. package/docs/reference/interfaces/IIdentityResolverServiceConfig.md +11 -0
  46. package/docs/reference/interfaces/IIdentityResolverServiceConstructorOptions.md +25 -0
  47. package/docs/reference/interfaces/IIdentityServiceConstructorOptions.md +11 -0
  48. package/docs/reference/variables/tagsIdentityResolver.md +5 -0
  49. package/locales/en.json +23 -4
  50. package/package.json +18 -18
@@ -1,1361 +1,2949 @@
1
1
  {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "title": "TWIN - Test Endpoints",
5
- "description": "REST API for TWIN - Test Endpoints.",
6
- "version": "1.0.0",
7
- "license": {
8
- "name": "Apache 2.0 License",
9
- "url": "https://opensource.org/licenses/Apache-2.0"
10
- }
11
- },
12
- "servers": [
13
- {
14
- "url": "https://localhost"
15
- }
16
- ],
17
- "tags": [
18
- {
19
- "name": "Identity",
20
- "description": "Service to provide all features related to digital identity."
21
- },
22
- {
23
- "name": "Identity Profile",
24
- "description": "Service to provide all features related to digital identity profiles."
25
- }
26
- ],
27
- "paths": {
28
- "/identity/{id}": {
29
- "get": {
30
- "operationId": "identityResolve",
31
- "summary": "Resolve an identity",
32
- "tags": [
33
- "Identity"
34
- ],
35
- "parameters": [
36
- {
37
- "name": "id",
38
- "description": "The identity to get the document for.",
39
- "in": "path",
40
- "required": true,
41
- "schema": {
42
- "type": "string"
43
- },
44
- "style": "simple",
45
- "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
46
- }
47
- ],
48
- "responses": {
49
- "200": {
50
- "description": "Response to resolving an identity.",
51
- "content": {
52
- "application/json": {
53
- "schema": {
54
- "$ref": "#/components/schemas/DidDocument"
55
- },
56
- "examples": {
57
- "identityResolveResponseExample": {
58
- "value": {
59
- "id": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a",
60
- "service": [
61
- {
62
- "id": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a#revocation",
63
- "type": "RevocationBitmap2022",
64
- "serviceEndpoint": "data:application/octet-stream;base64,eJyzMmAAAwABr"
65
- }
66
- ]
67
- }
68
- }
69
- }
70
- }
71
- }
72
- },
73
- "400": {
74
- "description": "The server cannot process the request, see the content for more details.",
75
- "content": {
76
- "application/json": {
77
- "schema": {
78
- "$ref": "#/components/schemas/Error"
79
- },
80
- "examples": {
81
- "exampleResponse": {
82
- "value": {
83
- "name": "GeneralError",
84
- "message": "component.error",
85
- "properties": {
86
- "foo": "bar"
87
- }
88
- }
89
- }
90
- }
91
- }
92
- }
93
- },
94
- "500": {
95
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
96
- "content": {
97
- "application/json": {
98
- "schema": {
99
- "$ref": "#/components/schemas/Error"
100
- },
101
- "examples": {
102
- "exampleResponse": {
103
- "value": {
104
- "name": "InternalServerError",
105
- "message": "component.error"
106
- }
107
- }
108
- }
109
- }
110
- }
111
- }
112
- }
113
- }
114
- },
115
- "/identity/profile": {
116
- "post": {
117
- "operationId": "identityProfileCreate",
118
- "summary": "Create an identity profile",
119
- "tags": [
120
- "Identity Profile"
121
- ],
122
- "security": [
123
- {
124
- "jwtBearerAuthScheme": []
125
- }
126
- ],
127
- "requestBody": {
128
- "description": "Request to create an identity profile.",
129
- "required": true,
130
- "content": {
131
- "application/json": {
132
- "schema": {
133
- "$ref": "#/components/schemas/IdentityProfileCreateRequest"
134
- },
135
- "examples": {
136
- "identityProfileCreateRequestExample": {
137
- "value": {
138
- "publicProfile": {
139
- "@context": "http://schema.org/",
140
- "@type": "Person",
141
- "jobTitle": "Professor",
142
- "name": "Jane Doe"
143
- },
144
- "privateProfile": {
145
- "@context": "http://schema.org/",
146
- "@type": "Person",
147
- "telephone": "(425) 123-4567",
148
- "url": "http://www.janedoe.com"
149
- }
150
- }
151
- }
152
- }
153
- }
154
- }
155
- },
156
- "responses": {
157
- "204": {
158
- "description": "The rest request ended in success with no data."
159
- },
160
- "400": {
161
- "description": "The server cannot process the request, see the content for more details.",
162
- "content": {
163
- "application/json": {
164
- "schema": {
165
- "$ref": "#/components/schemas/Error"
166
- },
167
- "examples": {
168
- "exampleResponse": {
169
- "value": {
170
- "name": "GeneralError",
171
- "message": "component.error",
172
- "properties": {
173
- "foo": "bar"
174
- }
175
- }
176
- }
177
- }
178
- }
179
- }
180
- },
181
- "401": {
182
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
183
- "content": {
184
- "application/json": {
185
- "schema": {
186
- "$ref": "#/components/schemas/Error"
187
- },
188
- "examples": {
189
- "exampleResponse": {
190
- "value": {
191
- "name": "UnauthorizedError",
192
- "message": "component.error"
193
- }
194
- }
195
- }
196
- }
197
- }
198
- },
199
- "409": {
200
- "description": "The request resulted in a conflicting operation, see the content for more details.",
201
- "content": {
202
- "application/json": {
203
- "schema": {
204
- "$ref": "#/components/schemas/ConflictResponse"
205
- },
206
- "examples": {
207
- "exampleResponse": {
208
- "value": {
209
- "name": "ConflictError",
210
- "message": "component.error",
211
- "properties": {
212
- "conflicts": [
213
- "1"
214
- ]
215
- }
216
- }
217
- }
218
- }
219
- }
220
- }
221
- },
222
- "500": {
223
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
224
- "content": {
225
- "application/json": {
226
- "schema": {
227
- "$ref": "#/components/schemas/Error"
228
- },
229
- "examples": {
230
- "exampleResponse": {
231
- "value": {
232
- "name": "InternalServerError",
233
- "message": "component.error"
234
- }
235
- }
236
- }
237
- }
238
- }
239
- }
240
- }
241
- },
242
- "get": {
243
- "operationId": "identityProfileGet",
244
- "summary": "Get the identity profile properties",
245
- "tags": [
246
- "Identity Profile"
247
- ],
248
- "parameters": [
249
- {
250
- "name": "publicPropertyNames",
251
- "description": "The public properties to get for the profile, defaults to all, should be a comma separated list.",
252
- "in": "query",
253
- "required": false,
254
- "schema": {
255
- "type": "string"
256
- },
257
- "example": "name,jobTitle"
258
- },
259
- {
260
- "name": "privatePropertyNames",
261
- "description": "The private properties to get for the profile, defaults to all, should be a comma separated list.",
262
- "in": "query",
263
- "required": false,
264
- "schema": {
265
- "type": "string"
266
- }
267
- }
268
- ],
269
- "security": [
270
- {
271
- "jwtBearerAuthScheme": []
272
- }
273
- ],
274
- "responses": {
275
- "200": {
276
- "description": "Response to get an identity details.",
277
- "content": {
278
- "application/json": {
279
- "schema": {
280
- "$ref": "#/components/schemas/IdentityProfileGetResponse"
281
- },
282
- "examples": {
283
- "identityGetResponseExample": {
284
- "value": {
285
- "identity": "did:iota:tst:0xc57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
286
- "publicProfile": {
287
- "@context": "http://schema.org/",
288
- "@type": "Person",
289
- "jobTitle": "Professor",
290
- "name": "Jane Doe"
291
- }
292
- }
293
- }
294
- }
295
- }
296
- }
297
- },
298
- "400": {
299
- "description": "The server cannot process the request, see the content for more details.",
300
- "content": {
301
- "application/json": {
302
- "schema": {
303
- "$ref": "#/components/schemas/Error"
304
- },
305
- "examples": {
306
- "exampleResponse": {
307
- "value": {
308
- "name": "GeneralError",
309
- "message": "component.error",
310
- "properties": {
311
- "foo": "bar"
312
- }
313
- }
314
- }
315
- }
316
- }
317
- }
318
- },
319
- "401": {
320
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
321
- "content": {
322
- "application/json": {
323
- "schema": {
324
- "$ref": "#/components/schemas/Error"
325
- },
326
- "examples": {
327
- "exampleResponse": {
328
- "value": {
329
- "name": "UnauthorizedError",
330
- "message": "component.error"
331
- }
332
- }
333
- }
334
- }
335
- }
336
- },
337
- "404": {
338
- "description": "The resource you tried to access does not exist, see the content for more details.",
339
- "content": {
340
- "application/json": {
341
- "schema": {
342
- "$ref": "#/components/schemas/NotFoundResponse"
343
- },
344
- "examples": {
345
- "exampleResponse": {
346
- "value": {
347
- "name": "NotFoundError",
348
- "message": "component.error",
349
- "properties": {
350
- "notFoundId": "1"
351
- }
352
- }
353
- }
354
- }
355
- }
356
- }
357
- },
358
- "500": {
359
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
360
- "content": {
361
- "application/json": {
362
- "schema": {
363
- "$ref": "#/components/schemas/Error"
364
- },
365
- "examples": {
366
- "exampleResponse": {
367
- "value": {
368
- "name": "InternalServerError",
369
- "message": "component.error"
370
- }
371
- }
372
- }
373
- }
374
- }
375
- }
376
- }
377
- },
378
- "put": {
379
- "operationId": "identityProfileUpdate",
380
- "summary": "Update an identity profile properties",
381
- "tags": [
382
- "Identity Profile"
383
- ],
384
- "security": [
385
- {
386
- "jwtBearerAuthScheme": []
387
- }
388
- ],
389
- "requestBody": {
390
- "description": "Request to update an identity profile.",
391
- "required": true,
392
- "content": {
393
- "application/json": {
394
- "schema": {
395
- "$ref": "#/components/schemas/IdentityProfileUpdateRequest"
396
- },
397
- "examples": {
398
- "identityProfileUpdateRequestExample": {
399
- "value": {
400
- "publicProfile": {
401
- "@context": "http://schema.org/",
402
- "@type": "Person",
403
- "jobTitle": "Professor",
404
- "name": "Jane Doe"
405
- },
406
- "privateProfile": {
407
- "@context": "http://schema.org/",
408
- "@type": "Person",
409
- "telephone": "(425) 123-4567",
410
- "url": "http://www.janedoe.com"
411
- }
412
- }
413
- }
414
- }
415
- }
416
- }
417
- },
418
- "responses": {
419
- "204": {
420
- "description": "The rest request ended in success with no data."
421
- },
422
- "400": {
423
- "description": "The server cannot process the request, see the content for more details.",
424
- "content": {
425
- "application/json": {
426
- "schema": {
427
- "$ref": "#/components/schemas/Error"
428
- },
429
- "examples": {
430
- "exampleResponse": {
431
- "value": {
432
- "name": "GeneralError",
433
- "message": "component.error",
434
- "properties": {
435
- "foo": "bar"
436
- }
437
- }
438
- }
439
- }
440
- }
441
- }
442
- },
443
- "401": {
444
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
445
- "content": {
446
- "application/json": {
447
- "schema": {
448
- "$ref": "#/components/schemas/Error"
449
- },
450
- "examples": {
451
- "exampleResponse": {
452
- "value": {
453
- "name": "UnauthorizedError",
454
- "message": "component.error"
455
- }
456
- }
457
- }
458
- }
459
- }
460
- },
461
- "404": {
462
- "description": "The resource you tried to access does not exist, see the content for more details.",
463
- "content": {
464
- "application/json": {
465
- "schema": {
466
- "$ref": "#/components/schemas/NotFoundResponse"
467
- },
468
- "examples": {
469
- "exampleResponse": {
470
- "value": {
471
- "name": "NotFoundError",
472
- "message": "component.error",
473
- "properties": {
474
- "notFoundId": "1"
475
- }
476
- }
477
- }
478
- }
479
- }
480
- }
481
- },
482
- "500": {
483
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
484
- "content": {
485
- "application/json": {
486
- "schema": {
487
- "$ref": "#/components/schemas/Error"
488
- },
489
- "examples": {
490
- "exampleResponse": {
491
- "value": {
492
- "name": "InternalServerError",
493
- "message": "component.error"
494
- }
495
- }
496
- }
497
- }
498
- }
499
- }
500
- }
501
- },
502
- "delete": {
503
- "operationId": "identityProfileRemove",
504
- "summary": "Remove an identity profile",
505
- "tags": [
506
- "Identity Profile"
507
- ],
508
- "security": [
509
- {
510
- "jwtBearerAuthScheme": []
511
- }
512
- ],
513
- "responses": {
514
- "204": {
515
- "description": "The rest request ended in success with no data."
516
- },
517
- "400": {
518
- "description": "The server cannot process the request, see the content for more details.",
519
- "content": {
520
- "application/json": {
521
- "schema": {
522
- "$ref": "#/components/schemas/Error"
523
- },
524
- "examples": {
525
- "exampleResponse": {
526
- "value": {
527
- "name": "GeneralError",
528
- "message": "component.error",
529
- "properties": {
530
- "foo": "bar"
531
- }
532
- }
533
- }
534
- }
535
- }
536
- }
537
- },
538
- "401": {
539
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
540
- "content": {
541
- "application/json": {
542
- "schema": {
543
- "$ref": "#/components/schemas/Error"
544
- },
545
- "examples": {
546
- "exampleResponse": {
547
- "value": {
548
- "name": "UnauthorizedError",
549
- "message": "component.error"
550
- }
551
- }
552
- }
553
- }
554
- }
555
- },
556
- "404": {
557
- "description": "The resource you tried to access does not exist, see the content for more details.",
558
- "content": {
559
- "application/json": {
560
- "schema": {
561
- "$ref": "#/components/schemas/NotFoundResponse"
562
- },
563
- "examples": {
564
- "exampleResponse": {
565
- "value": {
566
- "name": "NotFoundError",
567
- "message": "component.error",
568
- "properties": {
569
- "notFoundId": "1"
570
- }
571
- }
572
- }
573
- }
574
- }
575
- }
576
- },
577
- "500": {
578
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
579
- "content": {
580
- "application/json": {
581
- "schema": {
582
- "$ref": "#/components/schemas/Error"
583
- },
584
- "examples": {
585
- "exampleResponse": {
586
- "value": {
587
- "name": "InternalServerError",
588
- "message": "component.error"
589
- }
590
- }
591
- }
592
- }
593
- }
594
- }
595
- }
596
- }
597
- },
598
- "/identity/profile/{identity}/public": {
599
- "get": {
600
- "operationId": "identityProfileGetPublic",
601
- "summary": "Get the identity profile public properties",
602
- "tags": [
603
- "Identity Profile"
604
- ],
605
- "parameters": [
606
- {
607
- "name": "identity",
608
- "description": "The identity to get the profile for.",
609
- "in": "path",
610
- "required": true,
611
- "schema": {
612
- "type": "string"
613
- },
614
- "style": "simple",
615
- "example": "did:iota:tst:0xc57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
616
- },
617
- {
618
- "name": "propertyNames",
619
- "description": "The properties to get for the public profile, defaults to all, should be a comma separated list.",
620
- "in": "query",
621
- "required": false,
622
- "schema": {
623
- "type": "string"
624
- },
625
- "example": "role,email,name"
626
- }
627
- ],
628
- "responses": {
629
- "200": {
630
- "description": "Response to get an identity public profile.",
631
- "content": {
632
- "application/ld+json": {
633
- "schema": {
634
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
635
- },
636
- "examples": {
637
- "identityGetPublicResponseExample": {
638
- "value": {
639
- "@context": "http://schema.org/",
640
- "@type": "Person",
641
- "jobTitle": "Professor",
642
- "name": "Jane Doe"
643
- }
644
- }
645
- }
646
- }
647
- },
648
- "headers": {
649
- "Content-Type": {
650
- "schema": {
651
- "type": "string"
652
- },
653
- "description": "e.g. application/ld+json"
654
- }
655
- }
656
- },
657
- "400": {
658
- "description": "The server cannot process the request, see the content for more details.",
659
- "content": {
660
- "application/json": {
661
- "schema": {
662
- "$ref": "#/components/schemas/Error"
663
- },
664
- "examples": {
665
- "exampleResponse": {
666
- "value": {
667
- "name": "GeneralError",
668
- "message": "component.error",
669
- "properties": {
670
- "foo": "bar"
671
- }
672
- }
673
- }
674
- }
675
- }
676
- }
677
- },
678
- "404": {
679
- "description": "The resource you tried to access does not exist, see the content for more details.",
680
- "content": {
681
- "application/json": {
682
- "schema": {
683
- "$ref": "#/components/schemas/NotFoundResponse"
684
- },
685
- "examples": {
686
- "exampleResponse": {
687
- "value": {
688
- "name": "NotFoundError",
689
- "message": "component.error",
690
- "properties": {
691
- "notFoundId": "1"
692
- }
693
- }
694
- }
695
- }
696
- }
697
- }
698
- },
699
- "500": {
700
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
701
- "content": {
702
- "application/json": {
703
- "schema": {
704
- "$ref": "#/components/schemas/Error"
705
- },
706
- "examples": {
707
- "exampleResponse": {
708
- "value": {
709
- "name": "InternalServerError",
710
- "message": "component.error"
711
- }
712
- }
713
- }
714
- }
715
- }
716
- }
717
- }
718
- }
719
- },
720
- "/identity/profile/query": {
721
- "get": {
722
- "operationId": "identitiesProfileList",
723
- "summary": "Get the list of profile data for identities",
724
- "tags": [
725
- "Identity Profile"
726
- ],
727
- "parameters": [
728
- {
729
- "name": "publicFilters",
730
- "description": "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.",
731
- "in": "query",
732
- "required": false,
733
- "schema": {
734
- "type": "string"
735
- }
736
- },
737
- {
738
- "name": "publicPropertyNames",
739
- "description": "The public properties to get for the profile, defaults to all, should be a comma separated list.",
740
- "in": "query",
741
- "required": false,
742
- "schema": {
743
- "type": "string"
744
- }
745
- },
746
- {
747
- "name": "cursor",
748
- "description": "The cursor for paged requests.",
749
- "in": "query",
750
- "required": false,
751
- "schema": {
752
- "type": "string"
753
- }
754
- },
755
- {
756
- "name": "pageSize",
757
- "description": "Number of items to return.",
758
- "in": "query",
759
- "required": false,
760
- "schema": {
761
- "type": "number"
762
- }
763
- }
764
- ],
765
- "security": [
766
- {
767
- "jwtBearerAuthScheme": []
768
- }
769
- ],
770
- "responses": {
771
- "200": {
772
- "description": "Response to get a list of identities.",
773
- "content": {
774
- "application/json": {
775
- "schema": {
776
- "$ref": "#/components/schemas/IdentityProfileListResponse"
777
- },
778
- "examples": {
779
- "identitiesProfileListResponseExample": {
780
- "value": {
781
- "items": [
782
- {
783
- "identity": "did:iota:tst:0xc57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
784
- "publicProfile": {
785
- "@context": "http://schema.org/",
786
- "@type": "Person",
787
- "jobTitle": "Professor",
788
- "name": "Jane Doe"
789
- }
790
- }
791
- ],
792
- "cursor": "1"
793
- }
794
- }
795
- }
796
- }
797
- }
798
- },
799
- "400": {
800
- "description": "The server cannot process the request, see the content for more details.",
801
- "content": {
802
- "application/json": {
803
- "schema": {
804
- "$ref": "#/components/schemas/Error"
805
- },
806
- "examples": {
807
- "exampleResponse": {
808
- "value": {
809
- "name": "GeneralError",
810
- "message": "component.error",
811
- "properties": {
812
- "foo": "bar"
813
- }
814
- }
815
- }
816
- }
817
- }
818
- }
819
- },
820
- "401": {
821
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
822
- "content": {
823
- "application/json": {
824
- "schema": {
825
- "$ref": "#/components/schemas/Error"
826
- },
827
- "examples": {
828
- "exampleResponse": {
829
- "value": {
830
- "name": "UnauthorizedError",
831
- "message": "component.error"
832
- }
833
- }
834
- }
835
- }
836
- }
837
- },
838
- "500": {
839
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
840
- "content": {
841
- "application/json": {
842
- "schema": {
843
- "$ref": "#/components/schemas/Error"
844
- },
845
- "examples": {
846
- "exampleResponse": {
847
- "value": {
848
- "name": "InternalServerError",
849
- "message": "component.error"
850
- }
851
- }
852
- }
853
- }
854
- }
855
- }
856
- }
857
- }
858
- }
859
- },
860
- "components": {
861
- "schemas": {
862
- "ConflictResponse": {
863
- "type": "object",
864
- "additionalProperties": false,
865
- "properties": {
866
- "conflicts": {
867
- "type": "array",
868
- "items": {
869
- "type": "string"
870
- },
871
- "description": "The conflicting items."
872
- },
873
- "name": {
874
- "type": "string",
875
- "description": "The name for the error."
876
- },
877
- "message": {
878
- "type": "string",
879
- "description": "The message for the error."
880
- },
881
- "source": {
882
- "type": "string",
883
- "description": "The source of the error."
884
- },
885
- "properties": {
886
- "type": "object",
887
- "additionalProperties": {},
888
- "description": "Any additional information for the error."
889
- },
890
- "stack": {
891
- "type": "string",
892
- "description": "The stack trace for the error."
893
- },
894
- "inner": {
895
- "$ref": "#/components/schemas/Error"
896
- }
897
- },
898
- "required": [
899
- "conflicts",
900
- "message",
901
- "name"
902
- ],
903
- "description": "The body which contains the error."
904
- },
905
- "DidDocument": {
906
- "type": "object",
907
- "properties": {
908
- "id": {
909
- "type": "string",
910
- "description": "The id for the document."
911
- },
912
- "alsoKnownAs": {
913
- "anyOf": [
914
- {
915
- "type": "string"
916
- },
917
- {
918
- "type": "array",
919
- "items": {
920
- "type": "string"
921
- }
922
- }
923
- ],
924
- "description": "Aliases for the document."
925
- },
926
- "controller": {
927
- "anyOf": [
928
- {
929
- "type": "string"
930
- },
931
- {
932
- "type": "array",
933
- "items": {
934
- "type": "string"
935
- }
936
- }
937
- ],
938
- "description": "The controller for the document."
939
- },
940
- "verificationMethod": {
941
- "type": "array",
942
- "items": {
943
- "anyOf": [
944
- {
945
- "type": "string"
946
- },
947
- {
948
- "$ref": "#/components/schemas/DidDocumentVerificationMethod"
949
- }
950
- ]
951
- },
952
- "description": "The verification methods."
953
- },
954
- "authentication": {
955
- "type": "array",
956
- "items": {
957
- "anyOf": [
958
- {
959
- "type": "string"
960
- },
961
- {
962
- "$ref": "#/components/schemas/DidDocumentVerificationMethod"
963
- }
964
- ]
965
- },
966
- "description": "The authentication methods."
967
- },
968
- "assertionMethod": {
969
- "type": "array",
970
- "items": {
971
- "anyOf": [
972
- {
973
- "type": "string"
974
- },
975
- {
976
- "$ref": "#/components/schemas/DidDocumentVerificationMethod"
977
- }
978
- ]
979
- },
980
- "description": "The assertion methods."
981
- },
982
- "keyAgreement": {
983
- "type": "array",
984
- "items": {
985
- "anyOf": [
986
- {
987
- "type": "string"
988
- },
989
- {
990
- "$ref": "#/components/schemas/DidDocumentVerificationMethod"
991
- }
992
- ]
993
- },
994
- "description": "The key agreements."
995
- },
996
- "capabilityInvocation": {
997
- "type": "array",
998
- "items": {
999
- "anyOf": [
1000
- {
1001
- "type": "string"
1002
- },
1003
- {
1004
- "$ref": "#/components/schemas/DidDocumentVerificationMethod"
1005
- }
1006
- ]
1007
- },
1008
- "description": "The capability invocations."
1009
- },
1010
- "capabilityDelegation": {
1011
- "type": "array",
1012
- "items": {
1013
- "anyOf": [
1014
- {
1015
- "type": "string"
1016
- },
1017
- {
1018
- "$ref": "#/components/schemas/DidDocumentVerificationMethod"
1019
- }
1020
- ]
1021
- },
1022
- "description": "The capability delegations."
1023
- },
1024
- "service": {
1025
- "type": "array",
1026
- "items": {
1027
- "$ref": "#/components/schemas/DidService"
1028
- },
1029
- "description": "The services."
1030
- }
1031
- },
1032
- "required": [
1033
- "id"
1034
- ],
1035
- "additionalProperties": false,
1036
- "description": "Interface describing a DID Document. Spec https://www.w3.org/TR/did-core/#did-document-properties."
1037
- },
1038
- "DidDocumentVerificationMethod": {
1039
- "type": "object",
1040
- "properties": {
1041
- "id": {
1042
- "type": "string",
1043
- "description": "The id of the entry."
1044
- },
1045
- "controller": {
1046
- "type": "string",
1047
- "description": "The controller for the entry."
1048
- },
1049
- "type": {
1050
- "type": "string",
1051
- "description": "The type of the entry."
1052
- },
1053
- "publicKeyMultibase": {
1054
- "type": "string",
1055
- "description": "The public key for the entry. Spec https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03 ."
1056
- },
1057
- "publicKeyJwk": {
1058
- "$ref": "#/components/schemas/Jwk"
1059
- },
1060
- "revocation": {
1061
- "type": "string",
1062
- "description": "Multi key partial revocation."
1063
- }
1064
- },
1065
- "required": [
1066
- "id",
1067
- "controller",
1068
- "type"
1069
- ],
1070
- "additionalProperties": false,
1071
- "description": "Interface describing a DID document verification method."
1072
- },
1073
- "DidService": {
1074
- "type": "object",
1075
- "properties": {
1076
- "id": {
1077
- "type": "string",
1078
- "description": "The id of the service."
1079
- },
1080
- "type": {
1081
- "anyOf": [
1082
- {
1083
- "type": "string"
1084
- },
1085
- {
1086
- "type": "array",
1087
- "items": {
1088
- "type": "string"
1089
- }
1090
- }
1091
- ],
1092
- "description": "The type of the service."
1093
- },
1094
- "serviceEndpoint": {
1095
- "anyOf": [
1096
- {
1097
- "type": "string"
1098
- },
1099
- {
1100
- "type": "array",
1101
- "items": {
1102
- "type": "string"
1103
- }
1104
- }
1105
- ],
1106
- "description": "The endpoint for the service."
1107
- }
1108
- },
1109
- "required": [
1110
- "id",
1111
- "type",
1112
- "serviceEndpoint"
1113
- ],
1114
- "additionalProperties": false,
1115
- "description": "Interface describing a did document service."
1116
- },
1117
- "Error": {
1118
- "type": "object",
1119
- "properties": {
1120
- "name": {
1121
- "type": "string",
1122
- "description": "The name for the error."
1123
- },
1124
- "message": {
1125
- "type": "string",
1126
- "description": "The message for the error."
1127
- },
1128
- "source": {
1129
- "type": "string",
1130
- "description": "The source of the error."
1131
- },
1132
- "properties": {
1133
- "type": "object",
1134
- "additionalProperties": {},
1135
- "description": "Any additional information for the error."
1136
- },
1137
- "stack": {
1138
- "type": "string",
1139
- "description": "The stack trace for the error."
1140
- },
1141
- "inner": {
1142
- "$ref": "#/components/schemas/Error"
1143
- }
1144
- },
1145
- "required": [
1146
- "name",
1147
- "message"
1148
- ],
1149
- "additionalProperties": false,
1150
- "description": "Model to describe serialized error."
1151
- },
1152
- "IdentityProfileCreateRequest": {
1153
- "type": "object",
1154
- "properties": {
1155
- "publicProfile": {
1156
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1157
- },
1158
- "privateProfile": {
1159
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1160
- }
1161
- },
1162
- "additionalProperties": false,
1163
- "description": "The data for the request."
1164
- },
1165
- "IdentityProfileGetResponse": {
1166
- "type": "object",
1167
- "properties": {
1168
- "identity": {
1169
- "type": "string",
1170
- "description": "The identity of the profile, this is the authenticated user identity."
1171
- },
1172
- "publicProfile": {
1173
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1174
- },
1175
- "privateProfile": {
1176
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1177
- }
1178
- },
1179
- "required": [
1180
- "identity"
1181
- ],
1182
- "additionalProperties": false,
1183
- "description": "The response payload."
1184
- },
1185
- "IdentityProfileListResponse": {
1186
- "type": "object",
1187
- "properties": {
1188
- "items": {
1189
- "type": "array",
1190
- "items": {
1191
- "type": "object",
1192
- "properties": {
1193
- "identity": {
1194
- "type": "string",
1195
- "description": "The identity."
1196
- },
1197
- "publicProfile": {
1198
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1199
- }
1200
- },
1201
- "required": [
1202
- "identity"
1203
- ],
1204
- "additionalProperties": false
1205
- },
1206
- "description": "The identities."
1207
- },
1208
- "cursor": {
1209
- "type": "string",
1210
- "description": "An optional cursor, when defined can be used to call find to get more entities."
1211
- }
1212
- },
1213
- "required": [
1214
- "items"
1215
- ],
1216
- "additionalProperties": false,
1217
- "description": "The response payload."
1218
- },
1219
- "IdentityProfileUpdateRequest": {
1220
- "type": "object",
1221
- "properties": {
1222
- "publicProfile": {
1223
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1224
- },
1225
- "privateProfile": {
1226
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
1227
- }
1228
- },
1229
- "additionalProperties": false,
1230
- "description": "The data for the request."
1231
- },
1232
- "Jwk": {
1233
- "type": "object",
1234
- "properties": {
1235
- "alg": {
1236
- "$ref": "#/components/schemas/JwtAlgorithms"
1237
- },
1238
- "use": {
1239
- "type": "string",
1240
- "description": "The intended use for the key."
1241
- },
1242
- "key_ops": {
1243
- "type": "array",
1244
- "items": {
1245
- "type": "string"
1246
- },
1247
- "description": "The operation(s) that the key is intended to be used for."
1248
- },
1249
- "kty": {
1250
- "type": "string",
1251
- "description": "The key type parameter."
1252
- },
1253
- "n": {
1254
- "type": "string",
1255
- "description": "The public key parameters."
1256
- },
1257
- "e": {
1258
- "type": "string",
1259
- "description": "Exponent parameter."
1260
- },
1261
- "d": {
1262
- "type": "string",
1263
- "description": "The private key parameters."
1264
- },
1265
- "p": {
1266
- "type": "string",
1267
- "description": "The private key parameters."
1268
- },
1269
- "q": {
1270
- "type": "string",
1271
- "description": "The private key parameters."
1272
- },
1273
- "dp": {
1274
- "type": "string",
1275
- "description": "The private key parameters."
1276
- },
1277
- "dq": {
1278
- "type": "string",
1279
- "description": "The private key parameters."
1280
- },
1281
- "qi": {
1282
- "type": "string",
1283
- "description": "The private key parameters."
1284
- },
1285
- "kid": {
1286
- "type": "string",
1287
- "description": "The key ID."
1288
- }
1289
- },
1290
- "required": [
1291
- "kty"
1292
- ],
1293
- "additionalProperties": {
1294
- "description": "Additional fields in the key."
1295
- },
1296
- "description": "The fields in a JSON Web Key."
1297
- },
1298
- "JwtAlgorithms": {
1299
- "anyOf": [
1300
- {
1301
- "type": "string",
1302
- "const": "HS256",
1303
- "description": "HMAC using SHA-256."
1304
- },
1305
- {
1306
- "type": "string",
1307
- "const": "EdDSA",
1308
- "description": "EdDSA using Ed25519."
1309
- }
1310
- ],
1311
- "description": "The cryptographic algorithms supported for JSON Web Tokens and JSON Web Keys."
1312
- },
1313
- "NotFoundResponse": {
1314
- "type": "object",
1315
- "additionalProperties": false,
1316
- "properties": {
1317
- "notFoundId": {
1318
- "type": "string",
1319
- "description": "The id if the item that was not found."
1320
- },
1321
- "name": {
1322
- "type": "string",
1323
- "description": "The name for the error."
1324
- },
1325
- "message": {
1326
- "type": "string",
1327
- "description": "The message for the error."
1328
- },
1329
- "source": {
1330
- "type": "string",
1331
- "description": "The source of the error."
1332
- },
1333
- "properties": {
1334
- "type": "object",
1335
- "additionalProperties": {},
1336
- "description": "Any additional information for the error."
1337
- },
1338
- "stack": {
1339
- "type": "string",
1340
- "description": "The stack trace for the error."
1341
- },
1342
- "inner": {
1343
- "$ref": "#/components/schemas/Error"
1344
- }
1345
- },
1346
- "required": [
1347
- "message",
1348
- "name"
1349
- ],
1350
- "description": "The body which contains the error."
1351
- }
1352
- },
1353
- "securitySchemes": {
1354
- "jwtBearerAuthScheme": {
1355
- "type": "http",
1356
- "scheme": "bearer",
1357
- "bearerFormat": "JWT"
1358
- }
1359
- }
1360
- }
1361
- }
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "TWIN - Test Endpoints",
5
+ "description": "REST API for TWIN - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Identity",
20
+ "description": "Service to provide all features related to digital identity."
21
+ },
22
+ {
23
+ "name": "Identity Profile",
24
+ "description": "Service to provide all features related to digital identity profiles."
25
+ }
26
+ ],
27
+ "paths": {
28
+ "/identity/{identity}": {
29
+ "get": {
30
+ "operationId": "identityResolve",
31
+ "summary": "Resolve an identity",
32
+ "tags": [
33
+ "Identity"
34
+ ],
35
+ "parameters": [
36
+ {
37
+ "name": "identity",
38
+ "description": "The identity to resolve.",
39
+ "in": "path",
40
+ "required": true,
41
+ "schema": {
42
+ "type": "string"
43
+ },
44
+ "style": "simple",
45
+ "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
46
+ }
47
+ ],
48
+ "responses": {
49
+ "200": {
50
+ "description": "Response to resolving an identity.",
51
+ "content": {
52
+ "application/json": {
53
+ "schema": {
54
+ "$ref": "https://schema.twindev.org/did/DidDocument"
55
+ },
56
+ "examples": {
57
+ "identityResolveResponseExample": {
58
+ "value": {
59
+ "@context": "https://www.w3.org/ns/did/v1",
60
+ "id": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a",
61
+ "service": [
62
+ {
63
+ "id": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a#revocation",
64
+ "type": "RevocationBitmap2022",
65
+ "serviceEndpoint": "data:application/octet-stream;base64,eJyzMmAAAwABr"
66
+ }
67
+ ]
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "400": {
75
+ "description": "The server cannot process the request, see the content for more details.",
76
+ "content": {
77
+ "application/json": {
78
+ "schema": {
79
+ "$ref": "#/components/schemas/Error"
80
+ },
81
+ "examples": {
82
+ "exampleResponse": {
83
+ "value": {
84
+ "name": "GeneralError",
85
+ "message": "component.error",
86
+ "properties": {
87
+ "foo": "bar"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "500": {
96
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
97
+ "content": {
98
+ "application/json": {
99
+ "schema": {
100
+ "$ref": "#/components/schemas/Error"
101
+ },
102
+ "examples": {
103
+ "exampleResponse": {
104
+ "value": {
105
+ "name": "InternalServerError",
106
+ "message": "component.error"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "delete": {
116
+ "operationId": "identityRemove",
117
+ "summary": "Remove an identity",
118
+ "tags": [
119
+ "Identity"
120
+ ],
121
+ "parameters": [
122
+ {
123
+ "name": "identity",
124
+ "description": "The identity to remove.",
125
+ "in": "path",
126
+ "required": true,
127
+ "schema": {
128
+ "type": "string"
129
+ },
130
+ "style": "simple",
131
+ "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
132
+ }
133
+ ],
134
+ "security": [
135
+ {
136
+ "jwtBearerAuthScheme": []
137
+ }
138
+ ],
139
+ "responses": {
140
+ "204": {
141
+ "description": "The rest request ended in success with no data."
142
+ },
143
+ "400": {
144
+ "description": "The server cannot process the request, see the content for more details.",
145
+ "content": {
146
+ "application/json": {
147
+ "schema": {
148
+ "$ref": "#/components/schemas/Error"
149
+ },
150
+ "examples": {
151
+ "exampleResponse": {
152
+ "value": {
153
+ "name": "GeneralError",
154
+ "message": "component.error",
155
+ "properties": {
156
+ "foo": "bar"
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ },
164
+ "401": {
165
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
166
+ "content": {
167
+ "application/json": {
168
+ "schema": {
169
+ "$ref": "#/components/schemas/Error"
170
+ },
171
+ "examples": {
172
+ "exampleResponse": {
173
+ "value": {
174
+ "name": "UnauthorizedError",
175
+ "message": "component.error"
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+ "500": {
183
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
184
+ "content": {
185
+ "application/json": {
186
+ "schema": {
187
+ "$ref": "#/components/schemas/Error"
188
+ },
189
+ "examples": {
190
+ "exampleResponse": {
191
+ "value": {
192
+ "name": "InternalServerError",
193
+ "message": "component.error"
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ },
203
+ "/identity": {
204
+ "post": {
205
+ "operationId": "identityCreate",
206
+ "summary": "Create an identity",
207
+ "tags": [
208
+ "Identity"
209
+ ],
210
+ "security": [
211
+ {
212
+ "jwtBearerAuthScheme": []
213
+ }
214
+ ],
215
+ "requestBody": {
216
+ "description": "Request to create an identity.",
217
+ "required": true,
218
+ "content": {
219
+ "application/json": {
220
+ "schema": {
221
+ "$ref": "#/components/schemas/IdentityCreateRequest"
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "responses": {
227
+ "200": {
228
+ "description": "Response to creating an identity.",
229
+ "content": {
230
+ "application/json": {
231
+ "schema": {
232
+ "$ref": "https://schema.twindev.org/did/DidDocument"
233
+ },
234
+ "examples": {
235
+ "identityCreateResponseExample": {
236
+ "value": {
237
+ "@context": "https://www.w3.org/ns/did/v1",
238
+ "id": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a",
239
+ "service": [
240
+ {
241
+ "id": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a#revocation",
242
+ "type": "RevocationBitmap2022",
243
+ "serviceEndpoint": "data:application/octet-stream;base64,eJyzMmAAAwABr"
244
+ }
245
+ ]
246
+ }
247
+ }
248
+ }
249
+ }
250
+ }
251
+ },
252
+ "400": {
253
+ "description": "The server cannot process the request, see the content for more details.",
254
+ "content": {
255
+ "application/json": {
256
+ "schema": {
257
+ "$ref": "#/components/schemas/Error"
258
+ },
259
+ "examples": {
260
+ "exampleResponse": {
261
+ "value": {
262
+ "name": "GeneralError",
263
+ "message": "component.error",
264
+ "properties": {
265
+ "foo": "bar"
266
+ }
267
+ }
268
+ }
269
+ }
270
+ }
271
+ }
272
+ },
273
+ "401": {
274
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
275
+ "content": {
276
+ "application/json": {
277
+ "schema": {
278
+ "$ref": "#/components/schemas/Error"
279
+ },
280
+ "examples": {
281
+ "exampleResponse": {
282
+ "value": {
283
+ "name": "UnauthorizedError",
284
+ "message": "component.error"
285
+ }
286
+ }
287
+ }
288
+ }
289
+ }
290
+ },
291
+ "500": {
292
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
293
+ "content": {
294
+ "application/json": {
295
+ "schema": {
296
+ "$ref": "#/components/schemas/Error"
297
+ },
298
+ "examples": {
299
+ "exampleResponse": {
300
+ "value": {
301
+ "name": "InternalServerError",
302
+ "message": "component.error"
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ },
312
+ "/identity/{identity}/verification-method": {
313
+ "post": {
314
+ "operationId": "identityVerificationMethodCreate",
315
+ "summary": "Create an identity verification method",
316
+ "tags": [
317
+ "Identity"
318
+ ],
319
+ "parameters": [
320
+ {
321
+ "name": "identity",
322
+ "description": "The identity to create the verification method for.",
323
+ "in": "path",
324
+ "required": true,
325
+ "schema": {
326
+ "type": "string"
327
+ },
328
+ "style": "simple",
329
+ "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
330
+ }
331
+ ],
332
+ "security": [
333
+ {
334
+ "jwtBearerAuthScheme": []
335
+ }
336
+ ],
337
+ "requestBody": {
338
+ "description": "Request to create a verification method.",
339
+ "required": true,
340
+ "content": {
341
+ "application/json": {
342
+ "schema": {
343
+ "$ref": "#/components/schemas/IdentityVerificationMethodCreateRequest"
344
+ },
345
+ "examples": {
346
+ "identityVerificationMethodCreateRequestExample": {
347
+ "value": {
348
+ "verificationMethodType": "assertionMethod",
349
+ "verificationMethodId": "my-assertion"
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ },
356
+ "responses": {
357
+ "200": {
358
+ "description": "Response to creating a verification method.",
359
+ "content": {
360
+ "application/json": {
361
+ "schema": {
362
+ "$ref": "https://schema.twindev.org/did/DidDocumentVerificationMethod"
363
+ },
364
+ "examples": {
365
+ "identityVerificationMethodCreateResponseExample": {
366
+ "value": {
367
+ "id": "did:iota:tst:0x70ce5abe69e7c56dd69684dd6da65812b9758b03a0081331ca560b34d73d5ff0#my-assertion",
368
+ "controller": "did:iota:tst:0x70ce5abe69e7c56dd69684dd6da65812b9758b03a0081331ca560b34d73d5ff0",
369
+ "type": "JsonWebKey2020",
370
+ "publicKeyJwk": {
371
+ "kty": "OKP",
372
+ "alg": "EdDSA",
373
+ "kid": "f_fj3rGsZFSYvnS_xv5MgyIBlExq-lgDciu0YQ--S3s",
374
+ "crv": "Ed25519",
375
+ "x": "SFm32z7y9C17olpaTeocG25WV2CNTUl5MhM679Z4bok"
376
+ }
377
+ }
378
+ }
379
+ }
380
+ }
381
+ }
382
+ },
383
+ "400": {
384
+ "description": "The server cannot process the request, see the content for more details.",
385
+ "content": {
386
+ "application/json": {
387
+ "schema": {
388
+ "$ref": "#/components/schemas/Error"
389
+ },
390
+ "examples": {
391
+ "exampleResponse": {
392
+ "value": {
393
+ "name": "GeneralError",
394
+ "message": "component.error",
395
+ "properties": {
396
+ "foo": "bar"
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "401": {
405
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
406
+ "content": {
407
+ "application/json": {
408
+ "schema": {
409
+ "$ref": "#/components/schemas/Error"
410
+ },
411
+ "examples": {
412
+ "exampleResponse": {
413
+ "value": {
414
+ "name": "UnauthorizedError",
415
+ "message": "component.error"
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ },
422
+ "500": {
423
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
424
+ "content": {
425
+ "application/json": {
426
+ "schema": {
427
+ "$ref": "#/components/schemas/Error"
428
+ },
429
+ "examples": {
430
+ "exampleResponse": {
431
+ "value": {
432
+ "name": "InternalServerError",
433
+ "message": "component.error"
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "/identity/{identity}/verification-method/{verificationMethodId}": {
444
+ "delete": {
445
+ "operationId": "identityVerificationMethodRemove",
446
+ "summary": "Remove an identity verification method",
447
+ "tags": [
448
+ "Identity"
449
+ ],
450
+ "parameters": [
451
+ {
452
+ "name": "identity",
453
+ "description": "The identity to remove the verification method from.",
454
+ "in": "path",
455
+ "required": true,
456
+ "schema": {
457
+ "type": "string"
458
+ },
459
+ "style": "simple",
460
+ "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
461
+ },
462
+ {
463
+ "name": "verificationMethodId",
464
+ "description": "The verification method to remove.",
465
+ "in": "path",
466
+ "required": true,
467
+ "schema": {
468
+ "type": "string"
469
+ },
470
+ "style": "simple",
471
+ "example": "my-assertion"
472
+ }
473
+ ],
474
+ "security": [
475
+ {
476
+ "jwtBearerAuthScheme": []
477
+ }
478
+ ],
479
+ "responses": {
480
+ "204": {
481
+ "description": "The rest request ended in success with no data."
482
+ },
483
+ "400": {
484
+ "description": "The server cannot process the request, see the content for more details.",
485
+ "content": {
486
+ "application/json": {
487
+ "schema": {
488
+ "$ref": "#/components/schemas/Error"
489
+ },
490
+ "examples": {
491
+ "exampleResponse": {
492
+ "value": {
493
+ "name": "GeneralError",
494
+ "message": "component.error",
495
+ "properties": {
496
+ "foo": "bar"
497
+ }
498
+ }
499
+ }
500
+ }
501
+ }
502
+ }
503
+ },
504
+ "401": {
505
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
506
+ "content": {
507
+ "application/json": {
508
+ "schema": {
509
+ "$ref": "#/components/schemas/Error"
510
+ },
511
+ "examples": {
512
+ "exampleResponse": {
513
+ "value": {
514
+ "name": "UnauthorizedError",
515
+ "message": "component.error"
516
+ }
517
+ }
518
+ }
519
+ }
520
+ }
521
+ },
522
+ "500": {
523
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
524
+ "content": {
525
+ "application/json": {
526
+ "schema": {
527
+ "$ref": "#/components/schemas/Error"
528
+ },
529
+ "examples": {
530
+ "exampleResponse": {
531
+ "value": {
532
+ "name": "InternalServerError",
533
+ "message": "component.error"
534
+ }
535
+ }
536
+ }
537
+ }
538
+ }
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "/identity/{identity}/service": {
544
+ "post": {
545
+ "operationId": "identityServiceCreate",
546
+ "summary": "Create an identity service",
547
+ "tags": [
548
+ "Identity"
549
+ ],
550
+ "parameters": [
551
+ {
552
+ "name": "identity",
553
+ "description": "The identity to create the service for.",
554
+ "in": "path",
555
+ "required": true,
556
+ "schema": {
557
+ "type": "string"
558
+ },
559
+ "style": "simple",
560
+ "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
561
+ }
562
+ ],
563
+ "security": [
564
+ {
565
+ "jwtBearerAuthScheme": []
566
+ }
567
+ ],
568
+ "requestBody": {
569
+ "description": "Request to create a service.",
570
+ "required": true,
571
+ "content": {
572
+ "application/json": {
573
+ "schema": {
574
+ "$ref": "#/components/schemas/IdentityServiceCreateRequest"
575
+ },
576
+ "examples": {
577
+ "identityServiceCreateRequestExample": {
578
+ "value": {
579
+ "serviceId": "did:example:123#linked-domain",
580
+ "type": "LinkedDomains",
581
+ "endpoint": "https://bar.example.com"
582
+ }
583
+ }
584
+ }
585
+ }
586
+ }
587
+ },
588
+ "responses": {
589
+ "200": {
590
+ "description": "Response to creating a service.",
591
+ "content": {
592
+ "application/json": {
593
+ "schema": {
594
+ "$ref": "https://schema.twindev.org/did/DidService"
595
+ },
596
+ "examples": {
597
+ "identityServiceCreateResponseExample": {
598
+ "value": {
599
+ "id": "did:example:123#linked-domain",
600
+ "type": "LinkedDomains",
601
+ "serviceEndpoint": "https://bar.example.com"
602
+ }
603
+ }
604
+ }
605
+ }
606
+ }
607
+ },
608
+ "400": {
609
+ "description": "The server cannot process the request, see the content for more details.",
610
+ "content": {
611
+ "application/json": {
612
+ "schema": {
613
+ "$ref": "#/components/schemas/Error"
614
+ },
615
+ "examples": {
616
+ "exampleResponse": {
617
+ "value": {
618
+ "name": "GeneralError",
619
+ "message": "component.error",
620
+ "properties": {
621
+ "foo": "bar"
622
+ }
623
+ }
624
+ }
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "401": {
630
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
631
+ "content": {
632
+ "application/json": {
633
+ "schema": {
634
+ "$ref": "#/components/schemas/Error"
635
+ },
636
+ "examples": {
637
+ "exampleResponse": {
638
+ "value": {
639
+ "name": "UnauthorizedError",
640
+ "message": "component.error"
641
+ }
642
+ }
643
+ }
644
+ }
645
+ }
646
+ },
647
+ "500": {
648
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
649
+ "content": {
650
+ "application/json": {
651
+ "schema": {
652
+ "$ref": "#/components/schemas/Error"
653
+ },
654
+ "examples": {
655
+ "exampleResponse": {
656
+ "value": {
657
+ "name": "InternalServerError",
658
+ "message": "component.error"
659
+ }
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ }
666
+ }
667
+ },
668
+ "/identity/{identity}/service/{serviceId}": {
669
+ "delete": {
670
+ "operationId": "identityServiceRemove",
671
+ "summary": "Remove an identity service",
672
+ "tags": [
673
+ "Identity"
674
+ ],
675
+ "parameters": [
676
+ {
677
+ "name": "identity",
678
+ "description": "The identity to remove the service from.",
679
+ "in": "path",
680
+ "required": true,
681
+ "schema": {
682
+ "type": "string"
683
+ },
684
+ "style": "simple",
685
+ "example": "did:iota:tst:0xe3088ba9aa8c28e1d139708a14e8c0fdff11ee8223baac4aa5bcf3321e4bfc6a"
686
+ },
687
+ {
688
+ "name": "serviceId",
689
+ "description": "The service to remove.",
690
+ "in": "path",
691
+ "required": true,
692
+ "schema": {
693
+ "type": "string"
694
+ },
695
+ "style": "simple",
696
+ "example": "did:example:123#linked-domain"
697
+ }
698
+ ],
699
+ "security": [
700
+ {
701
+ "jwtBearerAuthScheme": []
702
+ }
703
+ ],
704
+ "responses": {
705
+ "204": {
706
+ "description": "The rest request ended in success with no data."
707
+ },
708
+ "400": {
709
+ "description": "The server cannot process the request, see the content for more details.",
710
+ "content": {
711
+ "application/json": {
712
+ "schema": {
713
+ "$ref": "#/components/schemas/Error"
714
+ },
715
+ "examples": {
716
+ "exampleResponse": {
717
+ "value": {
718
+ "name": "GeneralError",
719
+ "message": "component.error",
720
+ "properties": {
721
+ "foo": "bar"
722
+ }
723
+ }
724
+ }
725
+ }
726
+ }
727
+ }
728
+ },
729
+ "401": {
730
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
731
+ "content": {
732
+ "application/json": {
733
+ "schema": {
734
+ "$ref": "#/components/schemas/Error"
735
+ },
736
+ "examples": {
737
+ "exampleResponse": {
738
+ "value": {
739
+ "name": "UnauthorizedError",
740
+ "message": "component.error"
741
+ }
742
+ }
743
+ }
744
+ }
745
+ }
746
+ },
747
+ "500": {
748
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
749
+ "content": {
750
+ "application/json": {
751
+ "schema": {
752
+ "$ref": "#/components/schemas/Error"
753
+ },
754
+ "examples": {
755
+ "exampleResponse": {
756
+ "value": {
757
+ "name": "InternalServerError",
758
+ "message": "component.error"
759
+ }
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+ }
766
+ }
767
+ },
768
+ "/identity/{identity}/verifiable-credential": {
769
+ "post": {
770
+ "operationId": "identityVerifiableCredentialCreate",
771
+ "summary": "Create an identity verifiable credential",
772
+ "tags": [
773
+ "Identity"
774
+ ],
775
+ "parameters": [
776
+ {
777
+ "name": "identity",
778
+ "description": "The identity to create the verification credential for.",
779
+ "in": "path",
780
+ "required": true,
781
+ "schema": {
782
+ "type": "string"
783
+ },
784
+ "style": "simple",
785
+ "example": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a"
786
+ }
787
+ ],
788
+ "security": [
789
+ {
790
+ "jwtBearerAuthScheme": []
791
+ }
792
+ ],
793
+ "requestBody": {
794
+ "description": "Request to create a verifiable credential.",
795
+ "required": true,
796
+ "content": {
797
+ "application/json": {
798
+ "schema": {
799
+ "$ref": "#/components/schemas/IdentityVerifiableCredentialCreateRequest"
800
+ },
801
+ "examples": {
802
+ "identityVerifiableCredentialCreateRequestExample": {
803
+ "value": {
804
+ "credentialId": "https://example.com/credentials/3732",
805
+ "subject": {
806
+ "@context": "https://schema.org",
807
+ "@type": "Person",
808
+ "id": "did:entity-storage:0x4757993355b921a8229bd780f30921b6a0216a72e6c3f37a09d13b8426a17def",
809
+ "name": "Jane Doe"
810
+ },
811
+ "revocationIndex": 5
812
+ }
813
+ }
814
+ }
815
+ }
816
+ }
817
+ },
818
+ "responses": {
819
+ "200": {
820
+ "description": "Response to creating a verifiable credential.",
821
+ "content": {
822
+ "application/json": {
823
+ "schema": {
824
+ "$ref": "#/components/schemas/IdentityVerifiableCredentialCreateResponse"
825
+ },
826
+ "examples": {
827
+ "identityVerifiableCredentialCreateResponseExample": {
828
+ "value": {
829
+ "verifiableCredential": {
830
+ "@context": [
831
+ "https://www.w3.org/ns/credentials/v2",
832
+ "https://schema.org"
833
+ ],
834
+ "id": "https://example.com/credentials/3732",
835
+ "type": [
836
+ "VerifiableCredential",
837
+ "Person"
838
+ ],
839
+ "credentialSubject": {
840
+ "id": "did:entity-storage:0x4757993355b921a8229bd780f30921b6a0216a72e6c3f37a09d13b8426a17def",
841
+ "name": "Jane Doe"
842
+ },
843
+ "issuer": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a",
844
+ "issuanceDate": "2025-01-24T09:21:51.500Z",
845
+ "credentialStatus": {
846
+ "id": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a#revocation",
847
+ "type": "BitstringStatusList",
848
+ "revocationBitmapIndex": "5"
849
+ }
850
+ },
851
+ "jwt": "eyJraWQiOi...D1Z3AQ"
852
+ }
853
+ }
854
+ }
855
+ }
856
+ }
857
+ },
858
+ "400": {
859
+ "description": "The server cannot process the request, see the content for more details.",
860
+ "content": {
861
+ "application/json": {
862
+ "schema": {
863
+ "$ref": "#/components/schemas/Error"
864
+ },
865
+ "examples": {
866
+ "exampleResponse": {
867
+ "value": {
868
+ "name": "GeneralError",
869
+ "message": "component.error",
870
+ "properties": {
871
+ "foo": "bar"
872
+ }
873
+ }
874
+ }
875
+ }
876
+ }
877
+ }
878
+ },
879
+ "401": {
880
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
881
+ "content": {
882
+ "application/json": {
883
+ "schema": {
884
+ "$ref": "#/components/schemas/Error"
885
+ },
886
+ "examples": {
887
+ "exampleResponse": {
888
+ "value": {
889
+ "name": "UnauthorizedError",
890
+ "message": "component.error"
891
+ }
892
+ }
893
+ }
894
+ }
895
+ }
896
+ },
897
+ "500": {
898
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
899
+ "content": {
900
+ "application/json": {
901
+ "schema": {
902
+ "$ref": "#/components/schemas/Error"
903
+ },
904
+ "examples": {
905
+ "exampleResponse": {
906
+ "value": {
907
+ "name": "InternalServerError",
908
+ "message": "component.error"
909
+ }
910
+ }
911
+ }
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+ },
918
+ "/identity/verifiable-credential/verify": {
919
+ "get": {
920
+ "operationId": "identityVerifiableCredentialVerify",
921
+ "summary": "Verify an identity verifiable credential",
922
+ "tags": [
923
+ "Identity"
924
+ ],
925
+ "parameters": [
926
+ {
927
+ "name": "jwt",
928
+ "description": "The jwt to verify.",
929
+ "in": "query",
930
+ "required": false,
931
+ "schema": {
932
+ "type": "string"
933
+ },
934
+ "example": "eyJraWQiOi...D1Z3AQ"
935
+ }
936
+ ],
937
+ "responses": {
938
+ "200": {
939
+ "description": "Response to verifying a verifiable credential.",
940
+ "content": {
941
+ "application/json": {
942
+ "schema": {
943
+ "$ref": "#/components/schemas/IdentityVerifiableCredentialVerifyResponse"
944
+ },
945
+ "examples": {
946
+ "identityVerifiableCredentialVerifyResponseExample": {
947
+ "value": {
948
+ "revoked": false,
949
+ "verifiableCredential": {
950
+ "@context": [
951
+ "https://www.w3.org/ns/credentials/v2",
952
+ "https://schema.org"
953
+ ],
954
+ "id": "https://example.com/credentials/3732",
955
+ "type": [
956
+ "VerifiableCredential",
957
+ "Person"
958
+ ],
959
+ "credentialSubject": {
960
+ "id": "did:entity-storage:0x4757993355b921a8229bd780f30921b6a0216a72e6c3f37a09d13b8426a17def",
961
+ "name": "Jane Doe"
962
+ },
963
+ "issuer": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a",
964
+ "issuanceDate": "2025-01-24T09:21:51.500Z",
965
+ "credentialStatus": {
966
+ "id": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a#revocation",
967
+ "type": "BitstringStatusList",
968
+ "revocationBitmapIndex": "5"
969
+ }
970
+ }
971
+ }
972
+ }
973
+ }
974
+ }
975
+ }
976
+ },
977
+ "400": {
978
+ "description": "The server cannot process the request, see the content for more details.",
979
+ "content": {
980
+ "application/json": {
981
+ "schema": {
982
+ "$ref": "#/components/schemas/Error"
983
+ },
984
+ "examples": {
985
+ "exampleResponse": {
986
+ "value": {
987
+ "name": "GeneralError",
988
+ "message": "component.error",
989
+ "properties": {
990
+ "foo": "bar"
991
+ }
992
+ }
993
+ }
994
+ }
995
+ }
996
+ }
997
+ },
998
+ "500": {
999
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1000
+ "content": {
1001
+ "application/json": {
1002
+ "schema": {
1003
+ "$ref": "#/components/schemas/Error"
1004
+ },
1005
+ "examples": {
1006
+ "exampleResponse": {
1007
+ "value": {
1008
+ "name": "InternalServerError",
1009
+ "message": "component.error"
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+ }
1018
+ },
1019
+ "/identity/{identity}/verifiable-credential/revoke/{revocationIndex}": {
1020
+ "get": {
1021
+ "operationId": "identityVerifiableCredentialRevoke",
1022
+ "summary": "Revoke an identity verifiable credential",
1023
+ "tags": [
1024
+ "Identity"
1025
+ ],
1026
+ "parameters": [
1027
+ {
1028
+ "name": "identity",
1029
+ "description": "The identity to revoke the verification credential for.",
1030
+ "in": "path",
1031
+ "required": true,
1032
+ "schema": {
1033
+ "type": "string"
1034
+ },
1035
+ "style": "simple",
1036
+ "example": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a"
1037
+ },
1038
+ {
1039
+ "name": "revocationIndex",
1040
+ "description": "The revocation index to revoke.",
1041
+ "in": "path",
1042
+ "required": true,
1043
+ "schema": {
1044
+ "type": "number"
1045
+ },
1046
+ "style": "simple",
1047
+ "example": 5
1048
+ }
1049
+ ],
1050
+ "security": [
1051
+ {
1052
+ "jwtBearerAuthScheme": []
1053
+ }
1054
+ ],
1055
+ "responses": {
1056
+ "204": {
1057
+ "description": "The rest request ended in success with no data."
1058
+ },
1059
+ "400": {
1060
+ "description": "The server cannot process the request, see the content for more details.",
1061
+ "content": {
1062
+ "application/json": {
1063
+ "schema": {
1064
+ "$ref": "#/components/schemas/Error"
1065
+ },
1066
+ "examples": {
1067
+ "exampleResponse": {
1068
+ "value": {
1069
+ "name": "GeneralError",
1070
+ "message": "component.error",
1071
+ "properties": {
1072
+ "foo": "bar"
1073
+ }
1074
+ }
1075
+ }
1076
+ }
1077
+ }
1078
+ }
1079
+ },
1080
+ "401": {
1081
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1082
+ "content": {
1083
+ "application/json": {
1084
+ "schema": {
1085
+ "$ref": "#/components/schemas/Error"
1086
+ },
1087
+ "examples": {
1088
+ "exampleResponse": {
1089
+ "value": {
1090
+ "name": "UnauthorizedError",
1091
+ "message": "component.error"
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ },
1098
+ "500": {
1099
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1100
+ "content": {
1101
+ "application/json": {
1102
+ "schema": {
1103
+ "$ref": "#/components/schemas/Error"
1104
+ },
1105
+ "examples": {
1106
+ "exampleResponse": {
1107
+ "value": {
1108
+ "name": "InternalServerError",
1109
+ "message": "component.error"
1110
+ }
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+ }
1117
+ }
1118
+ },
1119
+ "/identity/{identity}/verifiable-credential/unrevoke/{revocationIndex}": {
1120
+ "get": {
1121
+ "operationId": "identityVerifiableCredentialUnrevoke",
1122
+ "summary": "Unrevoke an identity verifiable credential",
1123
+ "tags": [
1124
+ "Identity"
1125
+ ],
1126
+ "parameters": [
1127
+ {
1128
+ "name": "identity",
1129
+ "description": "The identity to unrevoke the verification credential for.",
1130
+ "in": "path",
1131
+ "required": true,
1132
+ "schema": {
1133
+ "type": "string"
1134
+ },
1135
+ "style": "simple",
1136
+ "example": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a"
1137
+ },
1138
+ {
1139
+ "name": "revocationIndex",
1140
+ "description": "The revocation index to unrevoke.",
1141
+ "in": "path",
1142
+ "required": true,
1143
+ "schema": {
1144
+ "type": "number"
1145
+ },
1146
+ "style": "simple",
1147
+ "example": 5
1148
+ }
1149
+ ],
1150
+ "security": [
1151
+ {
1152
+ "jwtBearerAuthScheme": []
1153
+ }
1154
+ ],
1155
+ "responses": {
1156
+ "204": {
1157
+ "description": "The rest request ended in success with no data."
1158
+ },
1159
+ "400": {
1160
+ "description": "The server cannot process the request, see the content for more details.",
1161
+ "content": {
1162
+ "application/json": {
1163
+ "schema": {
1164
+ "$ref": "#/components/schemas/Error"
1165
+ },
1166
+ "examples": {
1167
+ "exampleResponse": {
1168
+ "value": {
1169
+ "name": "GeneralError",
1170
+ "message": "component.error",
1171
+ "properties": {
1172
+ "foo": "bar"
1173
+ }
1174
+ }
1175
+ }
1176
+ }
1177
+ }
1178
+ }
1179
+ },
1180
+ "401": {
1181
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1182
+ "content": {
1183
+ "application/json": {
1184
+ "schema": {
1185
+ "$ref": "#/components/schemas/Error"
1186
+ },
1187
+ "examples": {
1188
+ "exampleResponse": {
1189
+ "value": {
1190
+ "name": "UnauthorizedError",
1191
+ "message": "component.error"
1192
+ }
1193
+ }
1194
+ }
1195
+ }
1196
+ }
1197
+ },
1198
+ "500": {
1199
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1200
+ "content": {
1201
+ "application/json": {
1202
+ "schema": {
1203
+ "$ref": "#/components/schemas/Error"
1204
+ },
1205
+ "examples": {
1206
+ "exampleResponse": {
1207
+ "value": {
1208
+ "name": "InternalServerError",
1209
+ "message": "component.error"
1210
+ }
1211
+ }
1212
+ }
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+ }
1218
+ },
1219
+ "/identity/{identity}/verifiable-presentation": {
1220
+ "post": {
1221
+ "operationId": "identityVerifiablePresentationCreate",
1222
+ "summary": "Create an identity verifiable presentation",
1223
+ "tags": [
1224
+ "Identity"
1225
+ ],
1226
+ "parameters": [
1227
+ {
1228
+ "name": "identity",
1229
+ "description": "The identity to create the verification presentation for.",
1230
+ "in": "path",
1231
+ "required": true,
1232
+ "schema": {
1233
+ "type": "string"
1234
+ },
1235
+ "style": "simple",
1236
+ "example": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a"
1237
+ }
1238
+ ],
1239
+ "security": [
1240
+ {
1241
+ "jwtBearerAuthScheme": []
1242
+ }
1243
+ ],
1244
+ "requestBody": {
1245
+ "description": "Request to create a verifiable presentation.",
1246
+ "required": true,
1247
+ "content": {
1248
+ "application/json": {
1249
+ "schema": {
1250
+ "$ref": "#/components/schemas/IdentityVerifiablePresentationCreateRequest"
1251
+ },
1252
+ "examples": {
1253
+ "identityVerifiablePresentationCreateRequestExample": {
1254
+ "value": {
1255
+ "presentationId": "https://example.com/presentation/3732",
1256
+ "verifiableCredentials": [
1257
+ "eyJraWQiOi...D1Z3AQ"
1258
+ ]
1259
+ }
1260
+ }
1261
+ }
1262
+ }
1263
+ }
1264
+ },
1265
+ "responses": {
1266
+ "200": {
1267
+ "description": "Response to creating a verifiable presentation.",
1268
+ "content": {
1269
+ "application/json": {
1270
+ "schema": {
1271
+ "$ref": "#/components/schemas/IdentityVerifiablePresentationCreateResponse"
1272
+ },
1273
+ "examples": {
1274
+ "IIdentityVerifiablePresentationCreateResponseExample": {
1275
+ "value": {
1276
+ "verifiablePresentation": {
1277
+ "@context": [
1278
+ "https://www.w3.org/ns/credentials/v2",
1279
+ "https://schema.org"
1280
+ ],
1281
+ "id": "presentationId",
1282
+ "type": [
1283
+ "VerifiablePresentation",
1284
+ "Person"
1285
+ ],
1286
+ "verifiableCredential": [
1287
+ "eyJraWQiOi...D1Z3AQ"
1288
+ ],
1289
+ "holder": "did:entity-storage:0xcea318e06e89f3fb4048160770effd84d0cfa5801fee13dfa6f9413a00429cec"
1290
+ },
1291
+ "jwt": "eyJraWQiOi...D1Z3AQ"
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ }
1297
+ },
1298
+ "400": {
1299
+ "description": "The server cannot process the request, see the content for more details.",
1300
+ "content": {
1301
+ "application/json": {
1302
+ "schema": {
1303
+ "$ref": "#/components/schemas/Error"
1304
+ },
1305
+ "examples": {
1306
+ "exampleResponse": {
1307
+ "value": {
1308
+ "name": "GeneralError",
1309
+ "message": "component.error",
1310
+ "properties": {
1311
+ "foo": "bar"
1312
+ }
1313
+ }
1314
+ }
1315
+ }
1316
+ }
1317
+ }
1318
+ },
1319
+ "401": {
1320
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1321
+ "content": {
1322
+ "application/json": {
1323
+ "schema": {
1324
+ "$ref": "#/components/schemas/Error"
1325
+ },
1326
+ "examples": {
1327
+ "exampleResponse": {
1328
+ "value": {
1329
+ "name": "UnauthorizedError",
1330
+ "message": "component.error"
1331
+ }
1332
+ }
1333
+ }
1334
+ }
1335
+ }
1336
+ },
1337
+ "500": {
1338
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1339
+ "content": {
1340
+ "application/json": {
1341
+ "schema": {
1342
+ "$ref": "#/components/schemas/Error"
1343
+ },
1344
+ "examples": {
1345
+ "exampleResponse": {
1346
+ "value": {
1347
+ "name": "InternalServerError",
1348
+ "message": "component.error"
1349
+ }
1350
+ }
1351
+ }
1352
+ }
1353
+ }
1354
+ }
1355
+ }
1356
+ }
1357
+ },
1358
+ "/identity/verifiable-presentation/verify": {
1359
+ "get": {
1360
+ "operationId": "identityVerifiablePresentationVerify",
1361
+ "summary": "Verify an identity verifiable presentation",
1362
+ "tags": [
1363
+ "Identity"
1364
+ ],
1365
+ "parameters": [
1366
+ {
1367
+ "name": "jwt",
1368
+ "description": "The jwt to verify.",
1369
+ "in": "query",
1370
+ "required": false,
1371
+ "schema": {
1372
+ "type": "string"
1373
+ },
1374
+ "example": "eyJraWQiOi...D1Z3AQ"
1375
+ }
1376
+ ],
1377
+ "responses": {
1378
+ "200": {
1379
+ "description": "Response to verifying a verifiable presentation.",
1380
+ "content": {
1381
+ "application/json": {
1382
+ "schema": {
1383
+ "$ref": "#/components/schemas/IdentityVerifiablePresentationVerifyResponse"
1384
+ },
1385
+ "examples": {
1386
+ "identityVerifiablePresentationVerifyResponseExample": {
1387
+ "value": {
1388
+ "revoked": false,
1389
+ "verifiablePresentation": {
1390
+ "@context": [
1391
+ "https://www.w3.org/ns/credentials/v2",
1392
+ "https://schema.org"
1393
+ ],
1394
+ "id": "presentationId",
1395
+ "type": [
1396
+ "VerifiablePresentation",
1397
+ "Person"
1398
+ ],
1399
+ "verifiableCredential": [
1400
+ "eyJraWQiOi...D1Z3AQ"
1401
+ ],
1402
+ "holder": "did:entity-storage:0xcea318e06e89f3fb4048160770effd84d0cfa5801fee13dfa6f9413a00429cec"
1403
+ }
1404
+ }
1405
+ }
1406
+ }
1407
+ }
1408
+ }
1409
+ },
1410
+ "400": {
1411
+ "description": "The server cannot process the request, see the content for more details.",
1412
+ "content": {
1413
+ "application/json": {
1414
+ "schema": {
1415
+ "$ref": "#/components/schemas/Error"
1416
+ },
1417
+ "examples": {
1418
+ "exampleResponse": {
1419
+ "value": {
1420
+ "name": "GeneralError",
1421
+ "message": "component.error",
1422
+ "properties": {
1423
+ "foo": "bar"
1424
+ }
1425
+ }
1426
+ }
1427
+ }
1428
+ }
1429
+ }
1430
+ },
1431
+ "500": {
1432
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1433
+ "content": {
1434
+ "application/json": {
1435
+ "schema": {
1436
+ "$ref": "#/components/schemas/Error"
1437
+ },
1438
+ "examples": {
1439
+ "exampleResponse": {
1440
+ "value": {
1441
+ "name": "InternalServerError",
1442
+ "message": "component.error"
1443
+ }
1444
+ }
1445
+ }
1446
+ }
1447
+ }
1448
+ }
1449
+ }
1450
+ }
1451
+ },
1452
+ "/identity/{identity}/proof": {
1453
+ "post": {
1454
+ "operationId": "identityProofCreate",
1455
+ "summary": "Create an identity proof",
1456
+ "tags": [
1457
+ "Identity"
1458
+ ],
1459
+ "parameters": [
1460
+ {
1461
+ "name": "identity",
1462
+ "description": "The identity to create the proof for.",
1463
+ "in": "path",
1464
+ "required": true,
1465
+ "schema": {
1466
+ "type": "string"
1467
+ },
1468
+ "style": "simple",
1469
+ "example": "did:entity-storage:0xda2df3ebc91ee0d5229d6532ffd0f4426952a94f34988b0ca906694dfd366a6a"
1470
+ }
1471
+ ],
1472
+ "security": [
1473
+ {
1474
+ "jwtBearerAuthScheme": []
1475
+ }
1476
+ ],
1477
+ "requestBody": {
1478
+ "description": "Request to create a proof.",
1479
+ "required": true,
1480
+ "content": {
1481
+ "application/json": {
1482
+ "schema": {
1483
+ "$ref": "#/components/schemas/IdentityProofCreateRequest"
1484
+ },
1485
+ "examples": {
1486
+ "identityProofCreateRequestExample": {
1487
+ "value": {
1488
+ "proofType": "DataIntegrityProof",
1489
+ "document": {
1490
+ "@context": [
1491
+ "https://www.w3.org/ns/credentials/v2",
1492
+ "https://www.w3.org/ns/credentials/examples/v2"
1493
+ ],
1494
+ "id": "urn:uuid:58172aac-d8ba-11ed-83dd-0b3aef56cc33",
1495
+ "type": [
1496
+ "VerifiableCredential",
1497
+ "AlumniCredential"
1498
+ ],
1499
+ "name": "Alumni Credential",
1500
+ "description": "A minimum viable example of an Alumni Credential.",
1501
+ "issuer": "https://vc.example/issuers/5678",
1502
+ "validFrom": "2023-01-01T00:00:00Z",
1503
+ "credentialSubject": {
1504
+ "id": "did:example:abcdefgh",
1505
+ "alumniOf": "The School of Examples"
1506
+ }
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ }
1512
+ }
1513
+ },
1514
+ "responses": {
1515
+ "200": {
1516
+ "description": "Response to creating a proof.",
1517
+ "content": {
1518
+ "application/json": {
1519
+ "schema": {
1520
+ "$ref": "https://schema.twindev.org/did/Proof"
1521
+ },
1522
+ "examples": {
1523
+ "identityProofCreateResponseExample": {
1524
+ "value": {
1525
+ "@context": [
1526
+ "https://www.w3.org/ns/credentials/v2",
1527
+ "https://www.w3.org/ns/credentials/examples/v2"
1528
+ ],
1529
+ "type": "DataIntegrityProof",
1530
+ "cryptosuite": "eddsa-jcs-2022",
1531
+ "created": "2024-01-31T16:00:45.490Z",
1532
+ "verificationMethod": "did:entity-storage:0x0101010101010101010101010101010101010101010101010101010101010101#my-verification-id",
1533
+ "proofPurpose": "assertionMethod",
1534
+ "proofValue": "z2zGoejwpX6HH2T11BZaniEVZrqRKDpwbQSvPcL7eL9M7hV5P9zQQZxs85n6qyDzkkXCL8aFUWfwQD5bxVGqDK1fa"
1535
+ }
1536
+ }
1537
+ }
1538
+ }
1539
+ }
1540
+ },
1541
+ "400": {
1542
+ "description": "The server cannot process the request, see the content for more details.",
1543
+ "content": {
1544
+ "application/json": {
1545
+ "schema": {
1546
+ "$ref": "#/components/schemas/Error"
1547
+ },
1548
+ "examples": {
1549
+ "exampleResponse": {
1550
+ "value": {
1551
+ "name": "GeneralError",
1552
+ "message": "component.error",
1553
+ "properties": {
1554
+ "foo": "bar"
1555
+ }
1556
+ }
1557
+ }
1558
+ }
1559
+ }
1560
+ }
1561
+ },
1562
+ "401": {
1563
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1564
+ "content": {
1565
+ "application/json": {
1566
+ "schema": {
1567
+ "$ref": "#/components/schemas/Error"
1568
+ },
1569
+ "examples": {
1570
+ "exampleResponse": {
1571
+ "value": {
1572
+ "name": "UnauthorizedError",
1573
+ "message": "component.error"
1574
+ }
1575
+ }
1576
+ }
1577
+ }
1578
+ }
1579
+ },
1580
+ "500": {
1581
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1582
+ "content": {
1583
+ "application/json": {
1584
+ "schema": {
1585
+ "$ref": "#/components/schemas/Error"
1586
+ },
1587
+ "examples": {
1588
+ "exampleResponse": {
1589
+ "value": {
1590
+ "name": "InternalServerError",
1591
+ "message": "component.error"
1592
+ }
1593
+ }
1594
+ }
1595
+ }
1596
+ }
1597
+ }
1598
+ }
1599
+ }
1600
+ },
1601
+ "/identity/proof/verify": {
1602
+ "post": {
1603
+ "operationId": "identityProofVerify",
1604
+ "summary": "Verify an identity proof",
1605
+ "tags": [
1606
+ "Identity"
1607
+ ],
1608
+ "requestBody": {
1609
+ "description": "Request to verify a proof.",
1610
+ "required": true,
1611
+ "content": {
1612
+ "application/json": {
1613
+ "schema": {
1614
+ "$ref": "#/components/schemas/IdentityProofVerifyRequest"
1615
+ },
1616
+ "examples": {
1617
+ "identityProofVerifyRequestExample": {
1618
+ "value": {
1619
+ "document": {
1620
+ "@context": [
1621
+ "https://www.w3.org/ns/credentials/v2",
1622
+ "https://www.w3.org/ns/credentials/examples/v2"
1623
+ ],
1624
+ "id": "urn:uuid:58172aac-d8ba-11ed-83dd-0b3aef56cc33",
1625
+ "type": [
1626
+ "VerifiableCredential",
1627
+ "AlumniCredential"
1628
+ ],
1629
+ "name": "Alumni Credential",
1630
+ "description": "A minimum viable example of an Alumni Credential.",
1631
+ "issuer": "https://vc.example/issuers/5678",
1632
+ "validFrom": "2023-01-01T00:00:00Z",
1633
+ "credentialSubject": {
1634
+ "id": "did:example:abcdefgh",
1635
+ "alumniOf": "The School of Examples"
1636
+ }
1637
+ },
1638
+ "proof": {
1639
+ "@context": "https://www.w3.org/ns/credentials/v2",
1640
+ "type": "DataIntegrityProof",
1641
+ "cryptosuite": "eddsa-jcs-2022",
1642
+ "created": "2025-01-24T11:32:13.106Z",
1643
+ "verificationMethod": "did:entity-storage:0xda2df3ebc91ee0d5229d6532ffd0f4426952a94f34988b0ca906694dfd366a6a#my-verification-id",
1644
+ "proofPurpose": "assertionMethod",
1645
+ "proofValue": "2fVLgANruCBoRPBCJavi54mZtkQdyMz6T2N4XVyB96asawiriKrVWoktcSQ7dMGrBTiemBBDpcLE2HfiTBCGuBmq"
1646
+ }
1647
+ }
1648
+ }
1649
+ }
1650
+ }
1651
+ }
1652
+ },
1653
+ "responses": {
1654
+ "200": {
1655
+ "description": "Response to verifying a proof.",
1656
+ "content": {
1657
+ "application/json": {
1658
+ "schema": {
1659
+ "$ref": "#/components/schemas/IdentityProofVerifyResponse"
1660
+ },
1661
+ "examples": {
1662
+ "identityProofVerifyResponseExample": {
1663
+ "value": {
1664
+ "verified": true
1665
+ }
1666
+ }
1667
+ }
1668
+ }
1669
+ }
1670
+ },
1671
+ "400": {
1672
+ "description": "The server cannot process the request, see the content for more details.",
1673
+ "content": {
1674
+ "application/json": {
1675
+ "schema": {
1676
+ "$ref": "#/components/schemas/Error"
1677
+ },
1678
+ "examples": {
1679
+ "exampleResponse": {
1680
+ "value": {
1681
+ "name": "GeneralError",
1682
+ "message": "component.error",
1683
+ "properties": {
1684
+ "foo": "bar"
1685
+ }
1686
+ }
1687
+ }
1688
+ }
1689
+ }
1690
+ }
1691
+ },
1692
+ "500": {
1693
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1694
+ "content": {
1695
+ "application/json": {
1696
+ "schema": {
1697
+ "$ref": "#/components/schemas/Error"
1698
+ },
1699
+ "examples": {
1700
+ "exampleResponse": {
1701
+ "value": {
1702
+ "name": "InternalServerError",
1703
+ "message": "component.error"
1704
+ }
1705
+ }
1706
+ }
1707
+ }
1708
+ }
1709
+ }
1710
+ }
1711
+ }
1712
+ },
1713
+ "/identity/profile": {
1714
+ "post": {
1715
+ "operationId": "identityProfileCreate",
1716
+ "summary": "Create an identity profile",
1717
+ "tags": [
1718
+ "Identity Profile"
1719
+ ],
1720
+ "security": [
1721
+ {
1722
+ "jwtBearerAuthScheme": []
1723
+ }
1724
+ ],
1725
+ "requestBody": {
1726
+ "description": "Request to create an identity profile.",
1727
+ "required": true,
1728
+ "content": {
1729
+ "application/json": {
1730
+ "schema": {
1731
+ "$ref": "#/components/schemas/IdentityProfileCreateRequest"
1732
+ },
1733
+ "examples": {
1734
+ "identityProfileCreateRequestExample": {
1735
+ "value": {
1736
+ "publicProfile": {
1737
+ "@context": "https://schema.org",
1738
+ "@type": "Person",
1739
+ "jobTitle": "Professor",
1740
+ "name": "Jane Doe"
1741
+ },
1742
+ "privateProfile": {
1743
+ "@context": "https://schema.org",
1744
+ "@type": "Person",
1745
+ "telephone": "(425) 123-4567",
1746
+ "url": "http://www.janedoe.com"
1747
+ }
1748
+ }
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1753
+ },
1754
+ "responses": {
1755
+ "204": {
1756
+ "description": "The rest request ended in success with no data."
1757
+ },
1758
+ "400": {
1759
+ "description": "The server cannot process the request, see the content for more details.",
1760
+ "content": {
1761
+ "application/json": {
1762
+ "schema": {
1763
+ "$ref": "#/components/schemas/Error"
1764
+ },
1765
+ "examples": {
1766
+ "exampleResponse": {
1767
+ "value": {
1768
+ "name": "GeneralError",
1769
+ "message": "component.error",
1770
+ "properties": {
1771
+ "foo": "bar"
1772
+ }
1773
+ }
1774
+ }
1775
+ }
1776
+ }
1777
+ }
1778
+ },
1779
+ "401": {
1780
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1781
+ "content": {
1782
+ "application/json": {
1783
+ "schema": {
1784
+ "$ref": "#/components/schemas/Error"
1785
+ },
1786
+ "examples": {
1787
+ "exampleResponse": {
1788
+ "value": {
1789
+ "name": "UnauthorizedError",
1790
+ "message": "component.error"
1791
+ }
1792
+ }
1793
+ }
1794
+ }
1795
+ }
1796
+ },
1797
+ "409": {
1798
+ "description": "The request resulted in a conflicting operation, see the content for more details.",
1799
+ "content": {
1800
+ "application/json": {
1801
+ "schema": {
1802
+ "$ref": "#/components/schemas/ConflictResponse"
1803
+ },
1804
+ "examples": {
1805
+ "exampleResponse": {
1806
+ "value": {
1807
+ "name": "ConflictError",
1808
+ "message": "component.error",
1809
+ "properties": {
1810
+ "conflicts": [
1811
+ "1"
1812
+ ]
1813
+ }
1814
+ }
1815
+ }
1816
+ }
1817
+ }
1818
+ }
1819
+ },
1820
+ "500": {
1821
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1822
+ "content": {
1823
+ "application/json": {
1824
+ "schema": {
1825
+ "$ref": "#/components/schemas/Error"
1826
+ },
1827
+ "examples": {
1828
+ "exampleResponse": {
1829
+ "value": {
1830
+ "name": "InternalServerError",
1831
+ "message": "component.error"
1832
+ }
1833
+ }
1834
+ }
1835
+ }
1836
+ }
1837
+ }
1838
+ }
1839
+ },
1840
+ "get": {
1841
+ "operationId": "identityProfileGet",
1842
+ "summary": "Get the identity profile properties",
1843
+ "tags": [
1844
+ "Identity Profile"
1845
+ ],
1846
+ "parameters": [
1847
+ {
1848
+ "name": "publicPropertyNames",
1849
+ "description": "The public properties to get for the profile, defaults to all, should be a comma separated list.",
1850
+ "in": "query",
1851
+ "required": false,
1852
+ "schema": {
1853
+ "type": "string"
1854
+ },
1855
+ "example": "name,jobTitle"
1856
+ },
1857
+ {
1858
+ "name": "privatePropertyNames",
1859
+ "description": "The private properties to get for the profile, defaults to all, should be a comma separated list.",
1860
+ "in": "query",
1861
+ "required": false,
1862
+ "schema": {
1863
+ "type": "string"
1864
+ }
1865
+ }
1866
+ ],
1867
+ "security": [
1868
+ {
1869
+ "jwtBearerAuthScheme": []
1870
+ }
1871
+ ],
1872
+ "responses": {
1873
+ "200": {
1874
+ "description": "Response to get an identity details.",
1875
+ "content": {
1876
+ "application/json": {
1877
+ "schema": {
1878
+ "$ref": "#/components/schemas/IdentityProfileGetResponse"
1879
+ },
1880
+ "examples": {
1881
+ "identityGetResponseExample": {
1882
+ "value": {
1883
+ "identity": "did:iota:tst:0xc57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
1884
+ "publicProfile": {
1885
+ "@context": "https://schema.org",
1886
+ "@type": "Person",
1887
+ "jobTitle": "Professor",
1888
+ "name": "Jane Doe"
1889
+ }
1890
+ }
1891
+ }
1892
+ }
1893
+ }
1894
+ }
1895
+ },
1896
+ "400": {
1897
+ "description": "The server cannot process the request, see the content for more details.",
1898
+ "content": {
1899
+ "application/json": {
1900
+ "schema": {
1901
+ "$ref": "#/components/schemas/Error"
1902
+ },
1903
+ "examples": {
1904
+ "exampleResponse": {
1905
+ "value": {
1906
+ "name": "GeneralError",
1907
+ "message": "component.error",
1908
+ "properties": {
1909
+ "foo": "bar"
1910
+ }
1911
+ }
1912
+ }
1913
+ }
1914
+ }
1915
+ }
1916
+ },
1917
+ "401": {
1918
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1919
+ "content": {
1920
+ "application/json": {
1921
+ "schema": {
1922
+ "$ref": "#/components/schemas/Error"
1923
+ },
1924
+ "examples": {
1925
+ "exampleResponse": {
1926
+ "value": {
1927
+ "name": "UnauthorizedError",
1928
+ "message": "component.error"
1929
+ }
1930
+ }
1931
+ }
1932
+ }
1933
+ }
1934
+ },
1935
+ "404": {
1936
+ "description": "The resource you tried to access does not exist, see the content for more details.",
1937
+ "content": {
1938
+ "application/json": {
1939
+ "schema": {
1940
+ "$ref": "#/components/schemas/NotFoundResponse"
1941
+ },
1942
+ "examples": {
1943
+ "exampleResponse": {
1944
+ "value": {
1945
+ "name": "NotFoundError",
1946
+ "message": "component.error",
1947
+ "properties": {
1948
+ "notFoundId": "1"
1949
+ }
1950
+ }
1951
+ }
1952
+ }
1953
+ }
1954
+ }
1955
+ },
1956
+ "500": {
1957
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1958
+ "content": {
1959
+ "application/json": {
1960
+ "schema": {
1961
+ "$ref": "#/components/schemas/Error"
1962
+ },
1963
+ "examples": {
1964
+ "exampleResponse": {
1965
+ "value": {
1966
+ "name": "InternalServerError",
1967
+ "message": "component.error"
1968
+ }
1969
+ }
1970
+ }
1971
+ }
1972
+ }
1973
+ }
1974
+ }
1975
+ },
1976
+ "put": {
1977
+ "operationId": "identityProfileUpdate",
1978
+ "summary": "Update an identity profile properties",
1979
+ "tags": [
1980
+ "Identity Profile"
1981
+ ],
1982
+ "security": [
1983
+ {
1984
+ "jwtBearerAuthScheme": []
1985
+ }
1986
+ ],
1987
+ "requestBody": {
1988
+ "description": "Request to update an identity profile.",
1989
+ "required": true,
1990
+ "content": {
1991
+ "application/json": {
1992
+ "schema": {
1993
+ "$ref": "#/components/schemas/IdentityProfileUpdateRequest"
1994
+ },
1995
+ "examples": {
1996
+ "identityProfileUpdateRequestExample": {
1997
+ "value": {
1998
+ "publicProfile": {
1999
+ "@context": "https://schema.org",
2000
+ "@type": "Person",
2001
+ "jobTitle": "Professor",
2002
+ "name": "Jane Doe"
2003
+ },
2004
+ "privateProfile": {
2005
+ "@context": "https://schema.org",
2006
+ "@type": "Person",
2007
+ "telephone": "(425) 123-4567",
2008
+ "url": "http://www.janedoe.com"
2009
+ }
2010
+ }
2011
+ }
2012
+ }
2013
+ }
2014
+ }
2015
+ },
2016
+ "responses": {
2017
+ "204": {
2018
+ "description": "The rest request ended in success with no data."
2019
+ },
2020
+ "400": {
2021
+ "description": "The server cannot process the request, see the content for more details.",
2022
+ "content": {
2023
+ "application/json": {
2024
+ "schema": {
2025
+ "$ref": "#/components/schemas/Error"
2026
+ },
2027
+ "examples": {
2028
+ "exampleResponse": {
2029
+ "value": {
2030
+ "name": "GeneralError",
2031
+ "message": "component.error",
2032
+ "properties": {
2033
+ "foo": "bar"
2034
+ }
2035
+ }
2036
+ }
2037
+ }
2038
+ }
2039
+ }
2040
+ },
2041
+ "401": {
2042
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
2043
+ "content": {
2044
+ "application/json": {
2045
+ "schema": {
2046
+ "$ref": "#/components/schemas/Error"
2047
+ },
2048
+ "examples": {
2049
+ "exampleResponse": {
2050
+ "value": {
2051
+ "name": "UnauthorizedError",
2052
+ "message": "component.error"
2053
+ }
2054
+ }
2055
+ }
2056
+ }
2057
+ }
2058
+ },
2059
+ "404": {
2060
+ "description": "The resource you tried to access does not exist, see the content for more details.",
2061
+ "content": {
2062
+ "application/json": {
2063
+ "schema": {
2064
+ "$ref": "#/components/schemas/NotFoundResponse"
2065
+ },
2066
+ "examples": {
2067
+ "exampleResponse": {
2068
+ "value": {
2069
+ "name": "NotFoundError",
2070
+ "message": "component.error",
2071
+ "properties": {
2072
+ "notFoundId": "1"
2073
+ }
2074
+ }
2075
+ }
2076
+ }
2077
+ }
2078
+ }
2079
+ },
2080
+ "500": {
2081
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
2082
+ "content": {
2083
+ "application/json": {
2084
+ "schema": {
2085
+ "$ref": "#/components/schemas/Error"
2086
+ },
2087
+ "examples": {
2088
+ "exampleResponse": {
2089
+ "value": {
2090
+ "name": "InternalServerError",
2091
+ "message": "component.error"
2092
+ }
2093
+ }
2094
+ }
2095
+ }
2096
+ }
2097
+ }
2098
+ }
2099
+ },
2100
+ "delete": {
2101
+ "operationId": "identityProfileRemove",
2102
+ "summary": "Remove an identity profile",
2103
+ "tags": [
2104
+ "Identity Profile"
2105
+ ],
2106
+ "security": [
2107
+ {
2108
+ "jwtBearerAuthScheme": []
2109
+ }
2110
+ ],
2111
+ "responses": {
2112
+ "204": {
2113
+ "description": "The rest request ended in success with no data."
2114
+ },
2115
+ "400": {
2116
+ "description": "The server cannot process the request, see the content for more details.",
2117
+ "content": {
2118
+ "application/json": {
2119
+ "schema": {
2120
+ "$ref": "#/components/schemas/Error"
2121
+ },
2122
+ "examples": {
2123
+ "exampleResponse": {
2124
+ "value": {
2125
+ "name": "GeneralError",
2126
+ "message": "component.error",
2127
+ "properties": {
2128
+ "foo": "bar"
2129
+ }
2130
+ }
2131
+ }
2132
+ }
2133
+ }
2134
+ }
2135
+ },
2136
+ "401": {
2137
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
2138
+ "content": {
2139
+ "application/json": {
2140
+ "schema": {
2141
+ "$ref": "#/components/schemas/Error"
2142
+ },
2143
+ "examples": {
2144
+ "exampleResponse": {
2145
+ "value": {
2146
+ "name": "UnauthorizedError",
2147
+ "message": "component.error"
2148
+ }
2149
+ }
2150
+ }
2151
+ }
2152
+ }
2153
+ },
2154
+ "404": {
2155
+ "description": "The resource you tried to access does not exist, see the content for more details.",
2156
+ "content": {
2157
+ "application/json": {
2158
+ "schema": {
2159
+ "$ref": "#/components/schemas/NotFoundResponse"
2160
+ },
2161
+ "examples": {
2162
+ "exampleResponse": {
2163
+ "value": {
2164
+ "name": "NotFoundError",
2165
+ "message": "component.error",
2166
+ "properties": {
2167
+ "notFoundId": "1"
2168
+ }
2169
+ }
2170
+ }
2171
+ }
2172
+ }
2173
+ }
2174
+ },
2175
+ "500": {
2176
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
2177
+ "content": {
2178
+ "application/json": {
2179
+ "schema": {
2180
+ "$ref": "#/components/schemas/Error"
2181
+ },
2182
+ "examples": {
2183
+ "exampleResponse": {
2184
+ "value": {
2185
+ "name": "InternalServerError",
2186
+ "message": "component.error"
2187
+ }
2188
+ }
2189
+ }
2190
+ }
2191
+ }
2192
+ }
2193
+ }
2194
+ }
2195
+ },
2196
+ "/identity/profile/{identity}/public": {
2197
+ "get": {
2198
+ "operationId": "identityProfileGetPublic",
2199
+ "summary": "Get the identity profile public properties",
2200
+ "tags": [
2201
+ "Identity Profile"
2202
+ ],
2203
+ "parameters": [
2204
+ {
2205
+ "name": "identity",
2206
+ "description": "The identity to get the profile for.",
2207
+ "in": "path",
2208
+ "required": true,
2209
+ "schema": {
2210
+ "type": "string"
2211
+ },
2212
+ "style": "simple",
2213
+ "example": "did:iota:tst:0xc57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
2214
+ },
2215
+ {
2216
+ "name": "propertyNames",
2217
+ "description": "The properties to get for the public profile, defaults to all, should be a comma separated list.",
2218
+ "in": "query",
2219
+ "required": false,
2220
+ "schema": {
2221
+ "type": "string"
2222
+ },
2223
+ "example": "role,email,name"
2224
+ }
2225
+ ],
2226
+ "responses": {
2227
+ "200": {
2228
+ "description": "Response to get an identity public profile.",
2229
+ "content": {
2230
+ "application/ld+json": {
2231
+ "schema": {
2232
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2233
+ },
2234
+ "examples": {
2235
+ "identityGetPublicResponseExample": {
2236
+ "value": {
2237
+ "@context": "https://schema.org",
2238
+ "@type": "Person",
2239
+ "jobTitle": "Professor",
2240
+ "name": "Jane Doe"
2241
+ }
2242
+ }
2243
+ }
2244
+ }
2245
+ },
2246
+ "headers": {
2247
+ "content-type": {
2248
+ "schema": {
2249
+ "type": "string"
2250
+ },
2251
+ "description": "e.g. application/ld+json"
2252
+ }
2253
+ }
2254
+ },
2255
+ "400": {
2256
+ "description": "The server cannot process the request, see the content for more details.",
2257
+ "content": {
2258
+ "application/json": {
2259
+ "schema": {
2260
+ "$ref": "#/components/schemas/Error"
2261
+ },
2262
+ "examples": {
2263
+ "exampleResponse": {
2264
+ "value": {
2265
+ "name": "GeneralError",
2266
+ "message": "component.error",
2267
+ "properties": {
2268
+ "foo": "bar"
2269
+ }
2270
+ }
2271
+ }
2272
+ }
2273
+ }
2274
+ }
2275
+ },
2276
+ "404": {
2277
+ "description": "The resource you tried to access does not exist, see the content for more details.",
2278
+ "content": {
2279
+ "application/json": {
2280
+ "schema": {
2281
+ "$ref": "#/components/schemas/NotFoundResponse"
2282
+ },
2283
+ "examples": {
2284
+ "exampleResponse": {
2285
+ "value": {
2286
+ "name": "NotFoundError",
2287
+ "message": "component.error",
2288
+ "properties": {
2289
+ "notFoundId": "1"
2290
+ }
2291
+ }
2292
+ }
2293
+ }
2294
+ }
2295
+ }
2296
+ },
2297
+ "500": {
2298
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
2299
+ "content": {
2300
+ "application/json": {
2301
+ "schema": {
2302
+ "$ref": "#/components/schemas/Error"
2303
+ },
2304
+ "examples": {
2305
+ "exampleResponse": {
2306
+ "value": {
2307
+ "name": "InternalServerError",
2308
+ "message": "component.error"
2309
+ }
2310
+ }
2311
+ }
2312
+ }
2313
+ }
2314
+ }
2315
+ }
2316
+ }
2317
+ },
2318
+ "/identity/profile/query": {
2319
+ "get": {
2320
+ "operationId": "identitiesProfileList",
2321
+ "summary": "Get the list of profile data for identities",
2322
+ "tags": [
2323
+ "Identity Profile"
2324
+ ],
2325
+ "parameters": [
2326
+ {
2327
+ "name": "publicFilters",
2328
+ "description": "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.",
2329
+ "in": "query",
2330
+ "required": false,
2331
+ "schema": {
2332
+ "type": "string"
2333
+ }
2334
+ },
2335
+ {
2336
+ "name": "publicPropertyNames",
2337
+ "description": "The public properties to get for the profile, defaults to all, should be a comma separated list.",
2338
+ "in": "query",
2339
+ "required": false,
2340
+ "schema": {
2341
+ "type": "string"
2342
+ }
2343
+ },
2344
+ {
2345
+ "name": "cursor",
2346
+ "description": "The cursor for paged requests.",
2347
+ "in": "query",
2348
+ "required": false,
2349
+ "schema": {
2350
+ "type": "string"
2351
+ }
2352
+ },
2353
+ {
2354
+ "name": "pageSize",
2355
+ "description": "Number of items to return.",
2356
+ "in": "query",
2357
+ "required": false,
2358
+ "schema": {
2359
+ "type": [
2360
+ "number",
2361
+ "string"
2362
+ ]
2363
+ }
2364
+ }
2365
+ ],
2366
+ "security": [
2367
+ {
2368
+ "jwtBearerAuthScheme": []
2369
+ }
2370
+ ],
2371
+ "responses": {
2372
+ "200": {
2373
+ "description": "Response to get a list of identities.",
2374
+ "content": {
2375
+ "application/json": {
2376
+ "schema": {
2377
+ "$ref": "#/components/schemas/IdentityProfileListResponse"
2378
+ },
2379
+ "examples": {
2380
+ "identitiesProfileListResponseExample": {
2381
+ "value": {
2382
+ "items": [
2383
+ {
2384
+ "identity": "did:iota:tst:0xc57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
2385
+ "publicProfile": {
2386
+ "@context": "https://schema.org",
2387
+ "@type": "Person",
2388
+ "jobTitle": "Professor",
2389
+ "name": "Jane Doe"
2390
+ }
2391
+ }
2392
+ ],
2393
+ "cursor": "1"
2394
+ }
2395
+ }
2396
+ }
2397
+ }
2398
+ }
2399
+ },
2400
+ "400": {
2401
+ "description": "The server cannot process the request, see the content for more details.",
2402
+ "content": {
2403
+ "application/json": {
2404
+ "schema": {
2405
+ "$ref": "#/components/schemas/Error"
2406
+ },
2407
+ "examples": {
2408
+ "exampleResponse": {
2409
+ "value": {
2410
+ "name": "GeneralError",
2411
+ "message": "component.error",
2412
+ "properties": {
2413
+ "foo": "bar"
2414
+ }
2415
+ }
2416
+ }
2417
+ }
2418
+ }
2419
+ }
2420
+ },
2421
+ "401": {
2422
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
2423
+ "content": {
2424
+ "application/json": {
2425
+ "schema": {
2426
+ "$ref": "#/components/schemas/Error"
2427
+ },
2428
+ "examples": {
2429
+ "exampleResponse": {
2430
+ "value": {
2431
+ "name": "UnauthorizedError",
2432
+ "message": "component.error"
2433
+ }
2434
+ }
2435
+ }
2436
+ }
2437
+ }
2438
+ },
2439
+ "500": {
2440
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
2441
+ "content": {
2442
+ "application/json": {
2443
+ "schema": {
2444
+ "$ref": "#/components/schemas/Error"
2445
+ },
2446
+ "examples": {
2447
+ "exampleResponse": {
2448
+ "value": {
2449
+ "name": "InternalServerError",
2450
+ "message": "component.error"
2451
+ }
2452
+ }
2453
+ }
2454
+ }
2455
+ }
2456
+ }
2457
+ }
2458
+ }
2459
+ }
2460
+ },
2461
+ "components": {
2462
+ "schemas": {
2463
+ "ConflictResponse": {
2464
+ "type": "object",
2465
+ "additionalProperties": false,
2466
+ "properties": {
2467
+ "conflicts": {
2468
+ "type": "array",
2469
+ "description": "The conflicting items.",
2470
+ "prefixItems": [
2471
+ {
2472
+ "type": "string"
2473
+ }
2474
+ ]
2475
+ },
2476
+ "name": {
2477
+ "type": "string",
2478
+ "description": "The name for the error."
2479
+ },
2480
+ "message": {
2481
+ "type": "string",
2482
+ "description": "The message for the error."
2483
+ },
2484
+ "source": {
2485
+ "type": "string",
2486
+ "description": "The source of the error."
2487
+ },
2488
+ "properties": {
2489
+ "type": "object",
2490
+ "additionalProperties": {},
2491
+ "description": "Any additional information for the error."
2492
+ },
2493
+ "stack": {
2494
+ "type": "string",
2495
+ "description": "The stack trace for the error."
2496
+ },
2497
+ "inner": {
2498
+ "$ref": "#/components/schemas/Error"
2499
+ }
2500
+ },
2501
+ "required": [
2502
+ "conflicts",
2503
+ "message",
2504
+ "name"
2505
+ ],
2506
+ "description": "The body which contains the error."
2507
+ },
2508
+ "Error": {
2509
+ "type": "object",
2510
+ "properties": {
2511
+ "name": {
2512
+ "type": "string",
2513
+ "description": "The name for the error."
2514
+ },
2515
+ "message": {
2516
+ "type": "string",
2517
+ "description": "The message for the error."
2518
+ },
2519
+ "source": {
2520
+ "type": "string",
2521
+ "description": "The source of the error."
2522
+ },
2523
+ "properties": {
2524
+ "type": "object",
2525
+ "additionalProperties": {},
2526
+ "description": "Any additional information for the error."
2527
+ },
2528
+ "stack": {
2529
+ "type": "string",
2530
+ "description": "The stack trace for the error."
2531
+ },
2532
+ "inner": {
2533
+ "$ref": "#/components/schemas/Error"
2534
+ }
2535
+ },
2536
+ "required": [
2537
+ "name",
2538
+ "message"
2539
+ ],
2540
+ "additionalProperties": false,
2541
+ "description": "Model to describe serialized error."
2542
+ },
2543
+ "IdentityCreateRequest": {
2544
+ "type": "object",
2545
+ "properties": {
2546
+ "namespace": {
2547
+ "type": "string",
2548
+ "description": "The optional namespace to create the identity in."
2549
+ }
2550
+ },
2551
+ "additionalProperties": false,
2552
+ "description": "The data for the request."
2553
+ },
2554
+ "IdentityProfileCreateRequest": {
2555
+ "type": "object",
2556
+ "properties": {
2557
+ "publicProfile": {
2558
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2559
+ },
2560
+ "privateProfile": {
2561
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2562
+ }
2563
+ },
2564
+ "additionalProperties": false,
2565
+ "description": "The data for the request."
2566
+ },
2567
+ "IdentityProfileGetResponse": {
2568
+ "type": "object",
2569
+ "properties": {
2570
+ "identity": {
2571
+ "type": "string",
2572
+ "description": "The identity of the profile, this is the authenticated user identity."
2573
+ },
2574
+ "publicProfile": {
2575
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2576
+ },
2577
+ "privateProfile": {
2578
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2579
+ }
2580
+ },
2581
+ "required": [
2582
+ "identity"
2583
+ ],
2584
+ "additionalProperties": false,
2585
+ "description": "The response payload."
2586
+ },
2587
+ "IdentityProfileListResponse": {
2588
+ "type": "object",
2589
+ "properties": {
2590
+ "items": {
2591
+ "type": "array",
2592
+ "description": "The identities.",
2593
+ "prefixItems": [
2594
+ {
2595
+ "type": "object",
2596
+ "properties": {
2597
+ "identity": {
2598
+ "type": "string",
2599
+ "description": "The identity."
2600
+ },
2601
+ "publicProfile": {
2602
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2603
+ }
2604
+ },
2605
+ "required": [
2606
+ "identity"
2607
+ ],
2608
+ "additionalProperties": false
2609
+ }
2610
+ ]
2611
+ },
2612
+ "cursor": {
2613
+ "type": "string",
2614
+ "description": "An optional cursor, when defined can be used to call find to get more entities."
2615
+ }
2616
+ },
2617
+ "required": [
2618
+ "items"
2619
+ ],
2620
+ "additionalProperties": false,
2621
+ "description": "The response payload."
2622
+ },
2623
+ "IdentityProfileUpdateRequest": {
2624
+ "type": "object",
2625
+ "properties": {
2626
+ "publicProfile": {
2627
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2628
+ },
2629
+ "privateProfile": {
2630
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2631
+ }
2632
+ },
2633
+ "additionalProperties": false,
2634
+ "description": "The data for the request."
2635
+ },
2636
+ "IdentityProofCreateRequest": {
2637
+ "type": "object",
2638
+ "properties": {
2639
+ "proofType": {
2640
+ "$ref": "https://schema.twindev.org/did/ProofTypes"
2641
+ },
2642
+ "document": {
2643
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
2644
+ }
2645
+ },
2646
+ "required": [
2647
+ "proofType",
2648
+ "document"
2649
+ ],
2650
+ "additionalProperties": false,
2651
+ "description": "The data for the request."
2652
+ },
2653
+ "IdentityProofVerifyRequest": {
2654
+ "type": "object",
2655
+ "properties": {
2656
+ "document": {
2657
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
2658
+ },
2659
+ "proof": {
2660
+ "$ref": "https://schema.twindev.org/did/Proof"
2661
+ }
2662
+ },
2663
+ "required": [
2664
+ "document",
2665
+ "proof"
2666
+ ],
2667
+ "additionalProperties": false,
2668
+ "description": "The data for the request."
2669
+ },
2670
+ "IdentityProofVerifyResponse": {
2671
+ "type": "object",
2672
+ "properties": {
2673
+ "verified": {
2674
+ "type": "boolean"
2675
+ }
2676
+ },
2677
+ "required": [
2678
+ "verified"
2679
+ ],
2680
+ "additionalProperties": false,
2681
+ "description": "The response payload."
2682
+ },
2683
+ "IdentityServiceCreateRequest": {
2684
+ "type": "object",
2685
+ "properties": {
2686
+ "serviceId": {
2687
+ "type": "string",
2688
+ "description": "The id of the service."
2689
+ },
2690
+ "type": {
2691
+ "anyOf": [
2692
+ {
2693
+ "type": "string"
2694
+ },
2695
+ {
2696
+ "type": "array",
2697
+ "prefixItems": [
2698
+ {
2699
+ "type": "string"
2700
+ }
2701
+ ]
2702
+ }
2703
+ ],
2704
+ "description": "The type of the service."
2705
+ },
2706
+ "endpoint": {
2707
+ "anyOf": [
2708
+ {
2709
+ "type": "string"
2710
+ },
2711
+ {
2712
+ "type": "array",
2713
+ "prefixItems": [
2714
+ {
2715
+ "type": "string"
2716
+ }
2717
+ ]
2718
+ }
2719
+ ],
2720
+ "description": "The endpoint for the service."
2721
+ }
2722
+ },
2723
+ "required": [
2724
+ "serviceId",
2725
+ "type",
2726
+ "endpoint"
2727
+ ],
2728
+ "additionalProperties": false,
2729
+ "description": "The data for the request."
2730
+ },
2731
+ "IdentityVerifiableCredentialCreateRequest": {
2732
+ "type": "object",
2733
+ "properties": {
2734
+ "credentialId": {
2735
+ "type": "string",
2736
+ "description": "The id of the credential."
2737
+ },
2738
+ "subject": {
2739
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
2740
+ },
2741
+ "revocationIndex": {
2742
+ "type": "number",
2743
+ "description": "The bitmap revocation index of the credential, if undefined will not have revocation status."
2744
+ }
2745
+ },
2746
+ "required": [
2747
+ "subject"
2748
+ ],
2749
+ "additionalProperties": false,
2750
+ "description": "The data for the request."
2751
+ },
2752
+ "IdentityVerifiableCredentialCreateResponse": {
2753
+ "type": "object",
2754
+ "properties": {
2755
+ "verifiableCredential": {
2756
+ "$ref": "https://schema.twindev.org/did/DidVerifiableCredential"
2757
+ },
2758
+ "jwt": {
2759
+ "type": "string",
2760
+ "description": "The JWT token for the verifiable credential."
2761
+ }
2762
+ },
2763
+ "required": [
2764
+ "verifiableCredential",
2765
+ "jwt"
2766
+ ],
2767
+ "additionalProperties": false,
2768
+ "description": "The response payload."
2769
+ },
2770
+ "IdentityVerifiableCredentialVerifyResponse": {
2771
+ "type": "object",
2772
+ "properties": {
2773
+ "revoked": {
2774
+ "type": "boolean",
2775
+ "description": "Has the credential been revoked."
2776
+ },
2777
+ "verifiableCredential": {
2778
+ "$ref": "https://schema.twindev.org/did/DidVerifiableCredential"
2779
+ }
2780
+ },
2781
+ "required": [
2782
+ "revoked"
2783
+ ],
2784
+ "additionalProperties": false,
2785
+ "description": "The response payload."
2786
+ },
2787
+ "IdentityVerifiablePresentationCreateRequest": {
2788
+ "type": "object",
2789
+ "properties": {
2790
+ "presentationId": {
2791
+ "type": "string",
2792
+ "description": "The id of the presentation."
2793
+ },
2794
+ "contexts": {
2795
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
2796
+ },
2797
+ "types": {
2798
+ "anyOf": [
2799
+ {
2800
+ "type": "string"
2801
+ },
2802
+ {
2803
+ "type": "array",
2804
+ "prefixItems": [
2805
+ {
2806
+ "type": "string"
2807
+ }
2808
+ ]
2809
+ }
2810
+ ],
2811
+ "description": "The types of the presentation."
2812
+ },
2813
+ "verifiableCredentials": {
2814
+ "type": "array",
2815
+ "description": "The verifiable credentials to include in the presentation.",
2816
+ "prefixItems": [
2817
+ {
2818
+ "anyOf": [
2819
+ {
2820
+ "type": "string"
2821
+ },
2822
+ {
2823
+ "$ref": "https://schema.twindev.org/did/DidVerifiableCredential"
2824
+ }
2825
+ ]
2826
+ }
2827
+ ]
2828
+ },
2829
+ "expiresInMinutes": {
2830
+ "type": "number",
2831
+ "description": "The expiration time for the presentation."
2832
+ }
2833
+ },
2834
+ "required": [
2835
+ "verifiableCredentials"
2836
+ ],
2837
+ "additionalProperties": false,
2838
+ "description": "The data for the request."
2839
+ },
2840
+ "IdentityVerifiablePresentationCreateResponse": {
2841
+ "type": "object",
2842
+ "properties": {
2843
+ "verifiablePresentation": {
2844
+ "$ref": "https://schema.twindev.org/did/DidVerifiablePresentation"
2845
+ },
2846
+ "jwt": {
2847
+ "type": "string",
2848
+ "description": "The JWT token for the verifiable presentation."
2849
+ }
2850
+ },
2851
+ "required": [
2852
+ "verifiablePresentation",
2853
+ "jwt"
2854
+ ],
2855
+ "additionalProperties": false,
2856
+ "description": "The response payload."
2857
+ },
2858
+ "IdentityVerifiablePresentationVerifyResponse": {
2859
+ "type": "object",
2860
+ "properties": {
2861
+ "revoked": {
2862
+ "type": "boolean",
2863
+ "description": "Has the presentation been revoked."
2864
+ },
2865
+ "verifiablePresentation": {
2866
+ "$ref": "https://schema.twindev.org/did/DidVerifiablePresentation"
2867
+ },
2868
+ "issuers": {
2869
+ "type": "array",
2870
+ "description": "The issuers of the presentation.",
2871
+ "prefixItems": [
2872
+ {
2873
+ "$ref": "https://schema.twindev.org/did/DidDocument"
2874
+ }
2875
+ ]
2876
+ }
2877
+ },
2878
+ "required": [
2879
+ "revoked"
2880
+ ],
2881
+ "additionalProperties": false,
2882
+ "description": "The response payload."
2883
+ },
2884
+ "IdentityVerificationMethodCreateRequest": {
2885
+ "type": "object",
2886
+ "properties": {
2887
+ "verificationMethodType": {
2888
+ "$ref": "https://schema.twindev.org/did/DidVerificationMethodType"
2889
+ },
2890
+ "verificationMethodId": {
2891
+ "type": "string",
2892
+ "description": "The optional id for the verification method, will be allocated if not supplied."
2893
+ }
2894
+ },
2895
+ "required": [
2896
+ "verificationMethodType"
2897
+ ],
2898
+ "additionalProperties": false,
2899
+ "description": "The data for the request."
2900
+ },
2901
+ "NotFoundResponse": {
2902
+ "type": "object",
2903
+ "additionalProperties": false,
2904
+ "properties": {
2905
+ "notFoundId": {
2906
+ "type": "string",
2907
+ "description": "The id if the item that was not found."
2908
+ },
2909
+ "name": {
2910
+ "type": "string",
2911
+ "description": "The name for the error."
2912
+ },
2913
+ "message": {
2914
+ "type": "string",
2915
+ "description": "The message for the error."
2916
+ },
2917
+ "source": {
2918
+ "type": "string",
2919
+ "description": "The source of the error."
2920
+ },
2921
+ "properties": {
2922
+ "type": "object",
2923
+ "additionalProperties": {},
2924
+ "description": "Any additional information for the error."
2925
+ },
2926
+ "stack": {
2927
+ "type": "string",
2928
+ "description": "The stack trace for the error."
2929
+ },
2930
+ "inner": {
2931
+ "$ref": "#/components/schemas/Error"
2932
+ }
2933
+ },
2934
+ "required": [
2935
+ "message",
2936
+ "name"
2937
+ ],
2938
+ "description": "The body which contains the error."
2939
+ }
2940
+ },
2941
+ "securitySchemes": {
2942
+ "jwtBearerAuthScheme": {
2943
+ "type": "http",
2944
+ "scheme": "bearer",
2945
+ "bearerFormat": "JWT"
2946
+ }
2947
+ }
2948
+ }
2949
+ }