@sphereon/ssi-sdk-ext.identifier-resolution 0.24.1-unstable.75 → 0.24.1-unstable.76

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 (48) hide show
  1. package/README.md +380 -1
  2. package/dist/agent/IdentifierResolution.d.ts +9 -1
  3. package/dist/agent/IdentifierResolution.d.ts.map +1 -1
  4. package/dist/agent/IdentifierResolution.js +22 -3
  5. package/dist/agent/IdentifierResolution.js.map +1 -1
  6. package/dist/functions/externalIdentifierFunctions.d.ts +10 -0
  7. package/dist/functions/externalIdentifierFunctions.d.ts.map +1 -0
  8. package/dist/functions/externalIdentifierFunctions.js +167 -0
  9. package/dist/functions/externalIdentifierFunctions.js.map +1 -0
  10. package/dist/functions/index.d.ts +2 -12
  11. package/dist/functions/index.d.ts.map +1 -1
  12. package/dist/functions/index.js +15 -237
  13. package/dist/functions/index.js.map +1 -1
  14. package/dist/functions/managedIdentifierFunctions.d.ts +6 -0
  15. package/dist/functions/managedIdentifierFunctions.d.ts.map +1 -0
  16. package/dist/functions/managedIdentifierFunctions.js +96 -0
  17. package/dist/functions/managedIdentifierFunctions.js.map +1 -0
  18. package/dist/types/IIdentifierResolution.d.ts +18 -159
  19. package/dist/types/IIdentifierResolution.d.ts.map +1 -1
  20. package/dist/types/IIdentifierResolution.js +0 -95
  21. package/dist/types/IIdentifierResolution.js.map +1 -1
  22. package/dist/types/common.d.ts +16 -0
  23. package/dist/types/common.d.ts.map +1 -0
  24. package/dist/types/common.js +32 -0
  25. package/dist/types/common.js.map +1 -0
  26. package/dist/types/externalIdentifierTypes.d.ts +80 -0
  27. package/dist/types/externalIdentifierTypes.d.ts.map +1 -0
  28. package/dist/types/externalIdentifierTypes.js +35 -0
  29. package/dist/types/externalIdentifierTypes.js.map +1 -0
  30. package/dist/types/index.d.ts +5 -0
  31. package/dist/types/index.d.ts.map +1 -0
  32. package/dist/types/index.js +21 -0
  33. package/dist/types/index.js.map +1 -0
  34. package/dist/types/managedIdentifierTypes.d.ts +73 -0
  35. package/dist/types/managedIdentifierTypes.d.ts.map +1 -0
  36. package/dist/types/managedIdentifierTypes.js +41 -0
  37. package/dist/types/managedIdentifierTypes.js.map +1 -0
  38. package/package.json +13 -11
  39. package/plugin.schema.json +849 -100
  40. package/src/agent/IdentifierResolution.ts +31 -8
  41. package/src/functions/externalIdentifierFunctions.ts +183 -0
  42. package/src/functions/index.ts +2 -267
  43. package/src/functions/managedIdentifierFunctions.ts +105 -0
  44. package/src/types/IIdentifierResolution.ts +35 -278
  45. package/src/types/common.ts +37 -0
  46. package/src/types/externalIdentifierTypes.ts +119 -0
  47. package/src/types/index.ts +4 -0
  48. package/src/types/managedIdentifierTypes.ts +121 -0
@@ -44,8 +44,7 @@
44
44
  }
45
45
  },
46
46
  "required": [
47
- "identifier",
48
- "verify"
47
+ "identifier"
49
48
  ]
50
49
  },
51
50
  {
@@ -78,155 +77,887 @@
78
77
  "identifier"
79
78
  ]
80
79
  },
81
- {
82
- "type": "object",
83
- "properties": {
84
- "method": {
85
- "type": "string",
86
- "const": "kid"
87
- },
88
- "identifier": {
89
- "$ref": "#/components/schemas/ExternalIdentifierType"
90
- }
91
- },
92
- "required": [
93
- "identifier"
94
- ]
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "method": {
84
+ "type": "string",
85
+ "const": "kid"
86
+ },
87
+ "identifier": {
88
+ "$ref": "#/components/schemas/ExternalIdentifierType"
89
+ }
90
+ },
91
+ "required": [
92
+ "identifier"
93
+ ]
94
+ }
95
+ ]
96
+ },
97
+ "ExternalIdentifierType": {
98
+ "anyOf": [
99
+ {
100
+ "type": "string"
101
+ },
102
+ {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ }
107
+ },
108
+ {
109
+ "$ref": "#/components/schemas/JWK"
110
+ }
111
+ ],
112
+ "description": "Use whenever we need to resolve an external identifier. We can pass in kids, DIDs, and x5chains\n\nThe functions below can be used to check the type, and they also provide the proper runtime types"
113
+ },
114
+ "JWK": {
115
+ "type": "object",
116
+ "properties": {
117
+ "kty": {
118
+ "type": "string"
119
+ },
120
+ "alg": {
121
+ "type": "string"
122
+ },
123
+ "crv": {
124
+ "type": "string"
125
+ },
126
+ "d": {
127
+ "type": "string"
128
+ },
129
+ "dp": {
130
+ "type": "string"
131
+ },
132
+ "dq": {
133
+ "type": "string"
134
+ },
135
+ "e": {
136
+ "type": "string"
137
+ },
138
+ "ext": {
139
+ "type": "boolean"
140
+ },
141
+ "k": {
142
+ "type": "string"
143
+ },
144
+ "key_ops": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "string"
148
+ }
149
+ },
150
+ "kid": {
151
+ "type": "string"
152
+ },
153
+ "n": {
154
+ "type": "string"
155
+ },
156
+ "oth": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "object",
160
+ "properties": {
161
+ "d": {
162
+ "type": "string"
163
+ },
164
+ "r": {
165
+ "type": "string"
166
+ },
167
+ "t": {
168
+ "type": "string"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "p": {
174
+ "type": "string"
175
+ },
176
+ "q": {
177
+ "type": "string"
178
+ },
179
+ "qi": {
180
+ "type": "string"
181
+ },
182
+ "use": {
183
+ "type": "string"
184
+ },
185
+ "x": {
186
+ "type": "string"
187
+ },
188
+ "y": {
189
+ "type": "string"
190
+ },
191
+ "x5c": {
192
+ "type": "array",
193
+ "items": {
194
+ "type": "string"
195
+ },
196
+ "description": "JWK \"x5c\" (X.509 Certificate Chain) Parameter."
197
+ },
198
+ "x5t": {
199
+ "type": "string",
200
+ "description": "JWK \"x5t\" (X.509 Certificate SHA-1 Thumbprint) Parameter."
201
+ },
202
+ "x5t#S256": {
203
+ "type": "string",
204
+ "description": "\"x5t#S256\" (X.509 Certificate SHA-256 Thumbprint) Parameter."
205
+ },
206
+ "x5u": {
207
+ "type": "string",
208
+ "description": "JWK \"x5u\" (X.509 URL) Parameter."
209
+ }
210
+ },
211
+ "required": [
212
+ "kty"
213
+ ],
214
+ "additionalProperties": {}
215
+ },
216
+ "DIDDocumentSection": {
217
+ "type": "string",
218
+ "enum": [
219
+ "verificationMethod",
220
+ "publicKey",
221
+ "service",
222
+ "authentication",
223
+ "assertionMethod",
224
+ "keyAgreement",
225
+ "capabilityInvocation",
226
+ "capabilityDelegation"
227
+ ],
228
+ "description": "Refers to a section of a DID document. Either the list of verification methods or services or one of the verification relationships.\n\nSee {@link https://www.w3.org/TR/did-core/#verification-relationships | verification relationships }"
229
+ },
230
+ "ExternalIdentifierResult": {
231
+ "anyOf": [
232
+ {
233
+ "$ref": "#/components/schemas/ExternalIdentifierDidResult"
234
+ },
235
+ {
236
+ "$ref": "#/components/schemas/ExternalIdentifierX5cResult"
237
+ }
238
+ ]
239
+ },
240
+ "ExternalIdentifierDidResult": {
241
+ "type": "object",
242
+ "properties": {
243
+ "method": {
244
+ "type": "string",
245
+ "const": "did"
246
+ },
247
+ "jwks": {
248
+ "type": "array",
249
+ "items": {
250
+ "$ref": "#/components/schemas/ExternalJwkInfo"
251
+ }
252
+ },
253
+ "did": {
254
+ "type": "string"
255
+ },
256
+ "didDocument": {
257
+ "$ref": "#/components/schemas/DIDDocument"
258
+ },
259
+ "didJwks": {
260
+ "$ref": "#/components/schemas/DidDocumentJwks"
261
+ },
262
+ "didResolutionResult": {
263
+ "type": "object",
264
+ "properties": {
265
+ "@context": {
266
+ "anyOf": [
267
+ {
268
+ "type": "string",
269
+ "const": "https://w3id.org/did-resolution/v1"
270
+ },
271
+ {
272
+ "type": "string"
273
+ },
274
+ {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "string"
278
+ }
279
+ }
280
+ ]
281
+ },
282
+ "didResolutionMetadata": {
283
+ "$ref": "#/components/schemas/DIDResolutionMetadata"
284
+ },
285
+ "didDocumentMetadata": {
286
+ "$ref": "#/components/schemas/DIDDocumentMetadata"
287
+ }
288
+ },
289
+ "required": [
290
+ "didResolutionMetadata",
291
+ "didDocumentMetadata"
292
+ ]
293
+ },
294
+ "didParsed": {
295
+ "$ref": "#/components/schemas/IParsedDID"
296
+ }
297
+ },
298
+ "required": [
299
+ "did",
300
+ "didParsed",
301
+ "didResolutionResult",
302
+ "jwks",
303
+ "method"
304
+ ]
305
+ },
306
+ "ExternalJwkInfo": {
307
+ "type": "object",
308
+ "properties": {
309
+ "jwk": {
310
+ "$ref": "#/components/schemas/JWK"
311
+ },
312
+ "jwkThumbprint": {
313
+ "type": "string"
314
+ },
315
+ "kid": {
316
+ "type": "string"
317
+ }
318
+ },
319
+ "required": [
320
+ "jwk",
321
+ "jwkThumbprint"
322
+ ]
323
+ },
324
+ "DIDDocument": {
325
+ "type": "object",
326
+ "properties": {
327
+ "authentication": {
328
+ "type": "array",
329
+ "items": {
330
+ "anyOf": [
331
+ {
332
+ "type": "string"
333
+ },
334
+ {
335
+ "$ref": "#/components/schemas/VerificationMethod"
336
+ }
337
+ ]
338
+ }
339
+ },
340
+ "assertionMethod": {
341
+ "type": "array",
342
+ "items": {
343
+ "anyOf": [
344
+ {
345
+ "type": "string"
346
+ },
347
+ {
348
+ "$ref": "#/components/schemas/VerificationMethod"
349
+ }
350
+ ]
351
+ }
352
+ },
353
+ "keyAgreement": {
354
+ "type": "array",
355
+ "items": {
356
+ "anyOf": [
357
+ {
358
+ "type": "string"
359
+ },
360
+ {
361
+ "$ref": "#/components/schemas/VerificationMethod"
362
+ }
363
+ ]
364
+ }
365
+ },
366
+ "capabilityInvocation": {
367
+ "type": "array",
368
+ "items": {
369
+ "anyOf": [
370
+ {
371
+ "type": "string"
372
+ },
373
+ {
374
+ "$ref": "#/components/schemas/VerificationMethod"
375
+ }
376
+ ]
377
+ }
378
+ },
379
+ "capabilityDelegation": {
380
+ "type": "array",
381
+ "items": {
382
+ "anyOf": [
383
+ {
384
+ "type": "string"
385
+ },
386
+ {
387
+ "$ref": "#/components/schemas/VerificationMethod"
388
+ }
389
+ ]
390
+ }
391
+ },
392
+ "@context": {
393
+ "anyOf": [
394
+ {
395
+ "type": "string",
396
+ "const": "https://www.w3.org/ns/did/v1"
397
+ },
398
+ {
399
+ "type": "string"
400
+ },
401
+ {
402
+ "type": "array",
403
+ "items": {
404
+ "type": "string"
405
+ }
406
+ }
407
+ ]
408
+ },
409
+ "id": {
410
+ "type": "string"
411
+ },
412
+ "alsoKnownAs": {
413
+ "type": "array",
414
+ "items": {
415
+ "type": "string"
416
+ }
417
+ },
418
+ "controller": {
419
+ "anyOf": [
420
+ {
421
+ "type": "string"
422
+ },
423
+ {
424
+ "type": "array",
425
+ "items": {
426
+ "type": "string"
427
+ }
428
+ }
429
+ ]
430
+ },
431
+ "verificationMethod": {
432
+ "type": "array",
433
+ "items": {
434
+ "$ref": "#/components/schemas/VerificationMethod"
435
+ }
436
+ },
437
+ "service": {
438
+ "type": "array",
439
+ "items": {
440
+ "$ref": "#/components/schemas/Service"
441
+ }
442
+ },
443
+ "publicKey": {
444
+ "type": "array",
445
+ "items": {
446
+ "$ref": "#/components/schemas/VerificationMethod"
447
+ },
448
+ "deprecated": true
449
+ }
450
+ },
451
+ "required": [
452
+ "id"
453
+ ],
454
+ "description": "Represents a DID document."
455
+ },
456
+ "VerificationMethod": {
457
+ "type": "object",
458
+ "properties": {
459
+ "id": {
460
+ "type": "string"
461
+ },
462
+ "type": {
463
+ "type": "string"
464
+ },
465
+ "controller": {
466
+ "type": "string"
467
+ },
468
+ "publicKeyBase58": {
469
+ "type": "string"
470
+ },
471
+ "publicKeyBase64": {
472
+ "type": "string"
473
+ },
474
+ "publicKeyJwk": {
475
+ "$ref": "#/components/schemas/JsonWebKey"
476
+ },
477
+ "publicKeyHex": {
478
+ "type": "string"
479
+ },
480
+ "publicKeyMultibase": {
481
+ "type": "string"
482
+ },
483
+ "blockchainAccountId": {
484
+ "type": "string"
485
+ },
486
+ "ethereumAddress": {
487
+ "type": "string"
488
+ },
489
+ "conditionOr": {
490
+ "type": "array",
491
+ "items": {
492
+ "$ref": "#/components/schemas/VerificationMethod"
493
+ }
494
+ },
495
+ "conditionAnd": {
496
+ "type": "array",
497
+ "items": {
498
+ "$ref": "#/components/schemas/VerificationMethod"
499
+ }
500
+ },
501
+ "threshold": {
502
+ "type": "number"
503
+ },
504
+ "conditionThreshold": {
505
+ "type": "array",
506
+ "items": {
507
+ "$ref": "#/components/schemas/VerificationMethod"
508
+ }
509
+ },
510
+ "conditionWeightedThreshold": {
511
+ "type": "array",
512
+ "items": {
513
+ "$ref": "#/components/schemas/ConditionWeightedThreshold"
514
+ }
515
+ },
516
+ "conditionDelegated": {
517
+ "type": "string"
518
+ },
519
+ "relationshipParent": {
520
+ "type": "array",
521
+ "items": {
522
+ "type": "string"
523
+ }
524
+ },
525
+ "relationshipChild": {
526
+ "type": "array",
527
+ "items": {
528
+ "type": "string"
529
+ }
530
+ },
531
+ "relationshipSibling": {
532
+ "type": "array",
533
+ "items": {
534
+ "type": "string"
535
+ }
536
+ }
537
+ },
538
+ "required": [
539
+ "id",
540
+ "type",
541
+ "controller"
542
+ ],
543
+ "description": "Represents the properties of a Verification Method listed in a DID document.\n\nThis data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility."
544
+ },
545
+ "JsonWebKey": {
546
+ "type": "object",
547
+ "properties": {
548
+ "alg": {
549
+ "type": "string"
550
+ },
551
+ "crv": {
552
+ "type": "string"
553
+ },
554
+ "e": {
555
+ "type": "string"
556
+ },
557
+ "ext": {
558
+ "type": "boolean"
559
+ },
560
+ "key_ops": {
561
+ "type": "array",
562
+ "items": {
563
+ "type": "string"
564
+ }
565
+ },
566
+ "kid": {
567
+ "type": "string"
568
+ },
569
+ "kty": {
570
+ "type": "string"
571
+ },
572
+ "n": {
573
+ "type": "string"
574
+ },
575
+ "use": {
576
+ "type": "string"
577
+ },
578
+ "x": {
579
+ "type": "string"
580
+ },
581
+ "y": {
582
+ "type": "string"
583
+ }
584
+ },
585
+ "required": [
586
+ "kty"
587
+ ],
588
+ "description": "Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents.\n\nThe private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents."
589
+ },
590
+ "ConditionWeightedThreshold": {
591
+ "type": "object",
592
+ "properties": {
593
+ "condition": {
594
+ "$ref": "#/components/schemas/VerificationMethod"
595
+ },
596
+ "weight": {
597
+ "type": "number"
598
+ }
599
+ },
600
+ "required": [
601
+ "condition",
602
+ "weight"
603
+ ]
604
+ },
605
+ "Service": {
606
+ "type": "object",
607
+ "properties": {
608
+ "id": {
609
+ "type": "string"
610
+ },
611
+ "type": {
612
+ "type": "string"
613
+ },
614
+ "serviceEndpoint": {
615
+ "anyOf": [
616
+ {
617
+ "$ref": "#/components/schemas/ServiceEndpoint"
618
+ },
619
+ {
620
+ "type": "array",
621
+ "items": {
622
+ "$ref": "#/components/schemas/ServiceEndpoint"
623
+ }
624
+ }
625
+ ]
626
+ }
627
+ },
628
+ "required": [
629
+ "id",
630
+ "type",
631
+ "serviceEndpoint"
632
+ ],
633
+ "description": "Represents a Service entry in a {@link https://www.w3.org/TR/did-core/#did-document-properties | DID document } ."
634
+ },
635
+ "ServiceEndpoint": {
636
+ "anyOf": [
637
+ {
638
+ "type": "string"
639
+ },
640
+ {
641
+ "type": "object"
642
+ }
643
+ ],
644
+ "description": "Represents an endpoint of a Service entry in a DID document."
645
+ },
646
+ "DidDocumentJwks": {
647
+ "type": "object",
648
+ "properties": {
649
+ "verificationMethod": {
650
+ "type": "array",
651
+ "items": {
652
+ "$ref": "#/components/schemas/JWK"
653
+ }
654
+ },
655
+ "authentication": {
656
+ "type": "array",
657
+ "items": {
658
+ "$ref": "#/components/schemas/JWK"
659
+ }
660
+ },
661
+ "assertionMethod": {
662
+ "type": "array",
663
+ "items": {
664
+ "$ref": "#/components/schemas/JWK"
665
+ }
666
+ },
667
+ "keyAgreement": {
668
+ "type": "array",
669
+ "items": {
670
+ "$ref": "#/components/schemas/JWK"
671
+ }
672
+ },
673
+ "capabilityInvocation": {
674
+ "type": "array",
675
+ "items": {
676
+ "$ref": "#/components/schemas/JWK"
677
+ }
678
+ },
679
+ "capabilityDelegation": {
680
+ "type": "array",
681
+ "items": {
682
+ "$ref": "#/components/schemas/JWK"
683
+ }
95
684
  }
685
+ },
686
+ "required": [
687
+ "verificationMethod",
688
+ "authentication",
689
+ "assertionMethod",
690
+ "keyAgreement",
691
+ "capabilityInvocation",
692
+ "capabilityDelegation"
96
693
  ]
97
694
  },
98
- "ExternalIdentifierType": {
99
- "anyOf": [
100
- {
695
+ "DIDResolutionMetadata": {
696
+ "type": "object",
697
+ "properties": {
698
+ "contentType": {
101
699
  "type": "string"
102
700
  },
103
- {
104
- "type": "array",
105
- "items": {
106
- "type": "string"
107
- }
108
- },
109
- {
110
- "$ref": "#/components/schemas/JWK"
701
+ "error": {
702
+ "type": "string"
111
703
  }
112
- ],
113
- "description": "Use whenever we need to resolve an external identifier. We can pass in kids, DIDs, and x5chains\n\nThe functions below can be used to check the type, and they also provide the proper runtime types"
704
+ },
705
+ "description": "Encapsulates the resolution metadata resulting from a {@link Resolvable.resolve } operation."
114
706
  },
115
- "JWK": {
707
+ "DIDDocumentMetadata": {
116
708
  "type": "object",
117
709
  "properties": {
118
- "kty": {
710
+ "created": {
119
711
  "type": "string"
120
712
  },
121
- "alg": {
713
+ "updated": {
122
714
  "type": "string"
123
715
  },
124
- "crv": {
716
+ "deactivated": {
717
+ "type": "boolean"
718
+ },
719
+ "versionId": {
125
720
  "type": "string"
126
721
  },
127
- "d": {
722
+ "nextUpdate": {
128
723
  "type": "string"
129
724
  },
130
- "dp": {
725
+ "nextVersionId": {
131
726
  "type": "string"
132
727
  },
133
- "dq": {
728
+ "equivalentId": {
134
729
  "type": "string"
135
730
  },
136
- "e": {
731
+ "canonicalId": {
732
+ "type": "string"
733
+ }
734
+ },
735
+ "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve } operation."
736
+ },
737
+ "IParsedDID": {
738
+ "type": "object",
739
+ "properties": {
740
+ "did": {
137
741
  "type": "string"
138
742
  },
139
- "ext": {
140
- "type": "boolean"
743
+ "didUrl": {
744
+ "type": "string"
141
745
  },
142
- "k": {
746
+ "method": {
143
747
  "type": "string"
144
748
  },
145
- "key_ops": {
146
- "type": "array",
147
- "items": {
148
- "type": "string"
149
- }
749
+ "id": {
750
+ "type": "string"
150
751
  },
151
- "kid": {
752
+ "path": {
152
753
  "type": "string"
153
754
  },
154
- "n": {
755
+ "fragment": {
155
756
  "type": "string"
156
757
  },
157
- "oth": {
758
+ "query": {
759
+ "type": "string"
760
+ },
761
+ "params": {
762
+ "type": "object",
763
+ "additionalProperties": {
764
+ "type": "string"
765
+ }
766
+ }
767
+ },
768
+ "required": [
769
+ "did",
770
+ "didUrl",
771
+ "method",
772
+ "id"
773
+ ]
774
+ },
775
+ "ExternalIdentifierX5cResult": {
776
+ "type": "object",
777
+ "properties": {
778
+ "method": {
779
+ "type": "string",
780
+ "const": "x5c"
781
+ },
782
+ "jwks": {
158
783
  "type": "array",
159
784
  "items": {
160
- "type": "object",
161
- "properties": {
162
- "d": {
163
- "type": "string"
164
- },
165
- "r": {
166
- "type": "string"
167
- },
168
- "t": {
169
- "type": "string"
170
- }
171
- }
785
+ "$ref": "#/components/schemas/ExternalJwkInfo"
172
786
  }
173
787
  },
174
- "p": {
175
- "type": "string"
788
+ "x5c": {
789
+ "type": "array",
790
+ "items": {
791
+ "type": "string"
792
+ }
176
793
  },
177
- "q": {
178
- "type": "string"
794
+ "issuerJWK": {
795
+ "$ref": "#/components/schemas/JWK"
179
796
  },
180
- "qi": {
181
- "type": "string"
797
+ "verificationResult": {
798
+ "$ref": "#/components/schemas/X509ValidationResult"
182
799
  },
183
- "use": {
184
- "type": "string"
800
+ "certificates": {
801
+ "type": "array",
802
+ "items": {}
803
+ }
804
+ },
805
+ "required": [
806
+ "certificates",
807
+ "issuerJWK",
808
+ "jwks",
809
+ "method",
810
+ "x5c"
811
+ ]
812
+ },
813
+ "X509ValidationResult": {
814
+ "type": "object",
815
+ "properties": {
816
+ "error": {
817
+ "type": "boolean"
185
818
  },
186
- "x": {
187
- "type": "string"
819
+ "critical": {
820
+ "type": "boolean"
188
821
  },
189
- "y": {
822
+ "message": {
190
823
  "type": "string"
191
824
  },
192
- "x5c": {
825
+ "verificationTime": {
826
+ "type": "string",
827
+ "format": "date-time"
828
+ },
829
+ "certificateChain": {
193
830
  "type": "array",
194
831
  "items": {
195
- "type": "string"
832
+ "$ref": "#/components/schemas/CertInfo"
833
+ }
834
+ }
835
+ },
836
+ "required": [
837
+ "error",
838
+ "critical",
839
+ "message",
840
+ "verificationTime"
841
+ ]
842
+ },
843
+ "CertInfo": {
844
+ "type": "object",
845
+ "properties": {
846
+ "certificate": {},
847
+ "notBefore": {
848
+ "type": "string",
849
+ "format": "date-time"
850
+ },
851
+ "notAfter": {
852
+ "type": "string",
853
+ "format": "date-time"
854
+ },
855
+ "publicKeyJWK": {},
856
+ "issuer": {
857
+ "type": "object",
858
+ "properties": {
859
+ "dn": {
860
+ "$ref": "#/components/schemas/DNInfo"
861
+ }
196
862
  },
197
- "description": "JWK \"x5c\" (X.509 Certificate Chain) Parameter."
863
+ "required": [
864
+ "dn"
865
+ ]
198
866
  },
199
- "x5t": {
867
+ "subject": {
868
+ "type": "object",
869
+ "properties": {
870
+ "dn": {
871
+ "$ref": "#/components/schemas/DNInfo"
872
+ }
873
+ },
874
+ "required": [
875
+ "dn"
876
+ ]
877
+ }
878
+ },
879
+ "required": [
880
+ "notBefore",
881
+ "notAfter",
882
+ "issuer",
883
+ "subject"
884
+ ]
885
+ },
886
+ "DNInfo": {
887
+ "type": "object",
888
+ "properties": {
889
+ "DN": {
890
+ "type": "string"
891
+ },
892
+ "attributes": {
893
+ "type": "object",
894
+ "additionalProperties": {
895
+ "type": "string"
896
+ }
897
+ }
898
+ },
899
+ "required": [
900
+ "DN",
901
+ "attributes"
902
+ ]
903
+ },
904
+ "ExternalIdentifierDidOpts": {
905
+ "type": "object",
906
+ "properties": {
907
+ "method": {
200
908
  "type": "string",
201
- "description": "JWK \"x5t\" (X.509 Certificate SHA-1 Thumbprint) Parameter."
909
+ "const": "did"
202
910
  },
203
- "x5t#S256": {
911
+ "identifier": {
912
+ "$ref": "#/components/schemas/ExternalIdentifierType"
913
+ },
914
+ "noVerificationMethodFallback": {
915
+ "type": "boolean"
916
+ },
917
+ "vmRelationship": {
918
+ "$ref": "#/components/schemas/DIDDocumentSection"
919
+ },
920
+ "localResolution": {
921
+ "type": "boolean"
922
+ },
923
+ "uniresolverResolution": {
924
+ "type": "boolean"
925
+ },
926
+ "resolverResolution": {
927
+ "type": "boolean"
928
+ }
929
+ },
930
+ "required": [
931
+ "identifier"
932
+ ]
933
+ },
934
+ "ExternalIdentifierX5cOpts": {
935
+ "type": "object",
936
+ "properties": {
937
+ "method": {
204
938
  "type": "string",
205
- "description": "\"x5t#S256\" (X.509 Certificate SHA-256 Thumbprint) Parameter."
939
+ "const": "x5c"
206
940
  },
207
- "x5u": {
941
+ "identifier": {
942
+ "$ref": "#/components/schemas/ExternalIdentifierType"
943
+ },
944
+ "verify": {
945
+ "type": "boolean"
946
+ },
947
+ "verificationTime": {
208
948
  "type": "string",
209
- "description": "JWK \"x5u\" (X.509 URL) Parameter."
949
+ "format": "date-time"
950
+ },
951
+ "trustAnchors": {
952
+ "type": "array",
953
+ "items": {
954
+ "type": "string"
955
+ }
210
956
  }
211
957
  },
212
958
  "required": [
213
- "kty"
214
- ],
215
- "additionalProperties": {}
216
- },
217
- "DIDDocumentSection": {
218
- "type": "string",
219
- "enum": [
220
- "verificationMethod",
221
- "publicKey",
222
- "service",
223
- "authentication",
224
- "assertionMethod",
225
- "keyAgreement",
226
- "capabilityInvocation",
227
- "capabilityDelegation"
228
- ],
229
- "description": "Refers to a section of a DID document. Either the list of verification methods or services or one of the verification relationships.\n\nSee {@link https://www.w3.org/TR/did-core/#verification-relationships | verification relationships }"
959
+ "identifier"
960
+ ]
230
961
  },
231
962
  "ManagedIdentifierOpts": {
232
963
  "anyOf": [
@@ -746,16 +1477,34 @@
746
1477
  },
747
1478
  "methods": {
748
1479
  "identifierExternalResolve": {
749
- "description": "",
1480
+ "description": "Main method for external identifiers. We always go through this method (also the others) as we want to integrate a plugin for anomaly detection. Having a single method helps",
750
1481
  "arguments": {
751
1482
  "$ref": "#/components/schemas/ExternalIdentifierOpts"
752
1483
  },
753
1484
  "returnType": {
754
- "type": "object"
1485
+ "$ref": "#/components/schemas/ExternalIdentifierResult"
755
1486
  }
756
1487
  },
757
- "identifierManagedGet": {
1488
+ "identifierExternalResolveByDid": {
1489
+ "description": "",
1490
+ "arguments": {
1491
+ "$ref": "#/components/schemas/ExternalIdentifierDidOpts"
1492
+ },
1493
+ "returnType": {
1494
+ "$ref": "#/components/schemas/ExternalIdentifierDidResult"
1495
+ }
1496
+ },
1497
+ "identifierExternalResolveByX5c": {
758
1498
  "description": "",
1499
+ "arguments": {
1500
+ "$ref": "#/components/schemas/ExternalIdentifierX5cOpts"
1501
+ },
1502
+ "returnType": {
1503
+ "$ref": "#/components/schemas/ExternalIdentifierX5cResult"
1504
+ }
1505
+ },
1506
+ "identifierManagedGet": {
1507
+ "description": "Main method for managed identifiers. We always go through this method (also the others) as we want to integrate a plugin for anomaly detection. Having a single method helps",
759
1508
  "arguments": {
760
1509
  "$ref": "#/components/schemas/ManagedIdentifierOpts"
761
1510
  },