@twin.org/immutable-proof-service 0.0.3-next.9 → 0.9.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/es/entities/immutableProof.js +3 -3
- package/dist/es/entities/immutableProof.js.map +1 -1
- package/dist/es/immutableProofRoutes.js +98 -14
- package/dist/es/immutableProofRoutes.js.map +1 -1
- package/dist/es/immutableProofService.js +77 -42
- package/dist/es/immutableProofService.js.map +1 -1
- package/dist/es/models/IImmutableProofServiceConstructorOptions.js.map +1 -1
- package/dist/es/restEntryPoints.js +3 -0
- package/dist/es/restEntryPoints.js.map +1 -1
- package/dist/types/entities/immutableProof.d.ts +2 -2
- package/dist/types/immutableProofRoutes.d.ts +20 -4
- package/dist/types/immutableProofService.d.ts +20 -10
- package/dist/types/models/IImmutableProofServiceConstructorOptions.d.ts +3 -4
- package/dist/types/restEntryPoints.d.ts +3 -0
- package/docs/changelog.md +234 -47
- package/docs/examples.md +127 -1
- package/docs/open-api/spec.json +216 -692
- package/docs/reference/classes/ImmutableProof.md +11 -11
- package/docs/reference/classes/ImmutableProofService.md +57 -17
- package/docs/reference/functions/immutableProofGet.md +1 -1
- package/docs/reference/functions/immutableProofRemove.md +31 -0
- package/docs/reference/functions/immutableProofRemoveNotarization.md +31 -0
- package/docs/reference/functions/immutableProofVerify.md +1 -1
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IImmutableProofServiceConfig.md +2 -2
- package/docs/reference/interfaces/IImmutableProofServiceConstructorOptions.md +16 -22
- package/docs/reference/variables/restEntryPoints.md +2 -0
- package/locales/en.json +2 -1
- package/package.json +22 -22
package/docs/open-api/spec.json
CHANGED
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"content": {
|
|
190
190
|
"application/json": {
|
|
191
191
|
"schema": {
|
|
192
|
-
"$ref": "
|
|
192
|
+
"$ref": "https://schema.twindev.org/immutable-proof/ImmutableProofCredential"
|
|
193
193
|
},
|
|
194
194
|
"examples": {
|
|
195
195
|
"immutableProofGetResponseExample": {
|
|
@@ -215,11 +215,7 @@
|
|
|
215
215
|
"proofPurpose": "assertionMethod",
|
|
216
216
|
"proofValue": "7DdiPPYtxLjCD3wA1po2rv...",
|
|
217
217
|
"verificationMethod": "did:iota:testnet:0xcb07cabaa2f23b7e53d8cdc4228efb351ebb270554d13bc382e4f94ca8d3136b#immutable-proof-assertion",
|
|
218
|
-
"
|
|
219
|
-
"immutableReceipt": {
|
|
220
|
-
"id": "immutable-receipt:1234567890",
|
|
221
|
-
"type": "ImmutableReceipt"
|
|
222
|
-
}
|
|
218
|
+
"notarizationId": "notarization:iota:0xabcdef1234567890"
|
|
223
219
|
}
|
|
224
220
|
}
|
|
225
221
|
}
|
|
@@ -227,7 +223,7 @@
|
|
|
227
223
|
},
|
|
228
224
|
"application/ld+json": {
|
|
229
225
|
"schema": {
|
|
230
|
-
"$ref": "
|
|
226
|
+
"$ref": "https://schema.twindev.org/immutable-proof/ImmutableProofCredential"
|
|
231
227
|
},
|
|
232
228
|
"examples": {
|
|
233
229
|
"immutableProofJsonLdGetResponseExample": {
|
|
@@ -253,11 +249,7 @@
|
|
|
253
249
|
"proofPurpose": "assertionMethod",
|
|
254
250
|
"proofValue": "7DdiPPYtxLjCD3wA1po2rv...",
|
|
255
251
|
"verificationMethod": "did:iota:testnet:0xcb07cabaa2f23b7e53d8cdc4228efb351ebb270554d13bc382e4f94ca8d3136b#immutable-proof-assertion",
|
|
256
|
-
"
|
|
257
|
-
"immutableReceipt": {
|
|
258
|
-
"id": "immutable-receipt:1234567890",
|
|
259
|
-
"type": "ImmutableReceipt"
|
|
260
|
-
}
|
|
252
|
+
"notarizationId": "notarization:iota:0xabcdef1234567890"
|
|
261
253
|
}
|
|
262
254
|
}
|
|
263
255
|
}
|
|
@@ -352,6 +344,114 @@
|
|
|
352
344
|
}
|
|
353
345
|
}
|
|
354
346
|
}
|
|
347
|
+
},
|
|
348
|
+
"delete": {
|
|
349
|
+
"operationId": "immutableProofRemove",
|
|
350
|
+
"summary": "Remove a proof",
|
|
351
|
+
"tags": [
|
|
352
|
+
"Immutable Proof"
|
|
353
|
+
],
|
|
354
|
+
"parameters": [
|
|
355
|
+
{
|
|
356
|
+
"name": "id",
|
|
357
|
+
"description": "The id of the immutable proof to remove.",
|
|
358
|
+
"in": "path",
|
|
359
|
+
"required": true,
|
|
360
|
+
"schema": {
|
|
361
|
+
"type": "string"
|
|
362
|
+
},
|
|
363
|
+
"style": "simple",
|
|
364
|
+
"example": "immutable-proof:1234567890"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"security": [
|
|
368
|
+
{
|
|
369
|
+
"jwtBearerAuthScheme": []
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"responses": {
|
|
373
|
+
"204": {
|
|
374
|
+
"description": "The rest request ended in success with no data."
|
|
375
|
+
},
|
|
376
|
+
"400": {
|
|
377
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
378
|
+
"content": {
|
|
379
|
+
"application/json": {
|
|
380
|
+
"schema": {
|
|
381
|
+
"$ref": "#/components/schemas/Error"
|
|
382
|
+
},
|
|
383
|
+
"examples": {
|
|
384
|
+
"exampleResponse": {
|
|
385
|
+
"value": {
|
|
386
|
+
"name": "GeneralError",
|
|
387
|
+
"message": "errorMessage",
|
|
388
|
+
"properties": {
|
|
389
|
+
"foo": "bar"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"401": {
|
|
398
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
399
|
+
"content": {
|
|
400
|
+
"application/json": {
|
|
401
|
+
"schema": {
|
|
402
|
+
"$ref": "#/components/schemas/Error"
|
|
403
|
+
},
|
|
404
|
+
"examples": {
|
|
405
|
+
"exampleResponse": {
|
|
406
|
+
"value": {
|
|
407
|
+
"name": "UnauthorizedError",
|
|
408
|
+
"message": "errorMessage"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"404": {
|
|
416
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
417
|
+
"content": {
|
|
418
|
+
"application/json": {
|
|
419
|
+
"schema": {
|
|
420
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
421
|
+
},
|
|
422
|
+
"examples": {
|
|
423
|
+
"exampleResponse": {
|
|
424
|
+
"value": {
|
|
425
|
+
"name": "NotFoundError",
|
|
426
|
+
"message": "errorMessage",
|
|
427
|
+
"properties": {
|
|
428
|
+
"notFoundId": "1"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"500": {
|
|
437
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
438
|
+
"content": {
|
|
439
|
+
"application/json": {
|
|
440
|
+
"schema": {
|
|
441
|
+
"$ref": "#/components/schemas/Error"
|
|
442
|
+
},
|
|
443
|
+
"examples": {
|
|
444
|
+
"exampleResponse": {
|
|
445
|
+
"value": {
|
|
446
|
+
"name": "InternalServerError",
|
|
447
|
+
"message": "errorMessage"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
355
455
|
}
|
|
356
456
|
},
|
|
357
457
|
"/immutable-proof/{id}/verify": {
|
|
@@ -496,616 +596,122 @@
|
|
|
496
596
|
}
|
|
497
597
|
}
|
|
498
598
|
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
"
|
|
505
|
-
|
|
506
|
-
"@context": {
|
|
507
|
-
"anyOf": [
|
|
508
|
-
{
|
|
509
|
-
"type": "string",
|
|
510
|
-
"const": "https://w3id.org/security/data-integrity/v2"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
"type": "array",
|
|
514
|
-
"minItems": 1,
|
|
515
|
-
"prefixItems": [
|
|
516
|
-
{
|
|
517
|
-
"type": "string",
|
|
518
|
-
"const": "https://w3id.org/security/data-integrity/v2"
|
|
519
|
-
}
|
|
520
|
-
],
|
|
521
|
-
"items": {
|
|
522
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
],
|
|
526
|
-
"description": "JSON-LD Context."
|
|
527
|
-
},
|
|
528
|
-
"type": {
|
|
529
|
-
"type": "string",
|
|
530
|
-
"const": "DataIntegrityProof",
|
|
531
|
-
"description": "JSON-LD Type."
|
|
532
|
-
},
|
|
533
|
-
"cryptosuite": {
|
|
534
|
-
"anyOf": [
|
|
535
|
-
{
|
|
536
|
-
"$ref": "#/components/schemas/DidCryptoSuites"
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
"type": "string"
|
|
540
|
-
}
|
|
541
|
-
],
|
|
542
|
-
"description": "An identifier for the cryptographic suite that can be used to verify the proof."
|
|
543
|
-
},
|
|
544
|
-
"id": {
|
|
545
|
-
"type": "string",
|
|
546
|
-
"description": "The id of the proof."
|
|
547
|
-
},
|
|
548
|
-
"proofPurpose": {
|
|
549
|
-
"type": "string",
|
|
550
|
-
"description": "The reason the proof was created."
|
|
551
|
-
},
|
|
552
|
-
"proofValue": {
|
|
553
|
-
"type": "string",
|
|
554
|
-
"description": "Contains the base-encoded binary data necessary to verify the digital proof using the verificationMethod specified."
|
|
555
|
-
},
|
|
556
|
-
"verificationMethod": {
|
|
557
|
-
"type": "string",
|
|
558
|
-
"description": "The verification method of the proof."
|
|
559
|
-
},
|
|
560
|
-
"created": {
|
|
561
|
-
"type": "string",
|
|
562
|
-
"description": "The iso date of when the proof was created."
|
|
563
|
-
},
|
|
564
|
-
"expires": {
|
|
565
|
-
"type": "string",
|
|
566
|
-
"description": "The iso date of when the proof expires."
|
|
567
|
-
},
|
|
568
|
-
"domain": {
|
|
569
|
-
"anyOf": [
|
|
570
|
-
{
|
|
571
|
-
"type": "string"
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
"type": "array",
|
|
575
|
-
"items": {
|
|
576
|
-
"type": "string"
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
],
|
|
580
|
-
"description": "One or more security domains in which the proof is meant to be used."
|
|
581
|
-
},
|
|
582
|
-
"challenge": {
|
|
583
|
-
"anyOf": [
|
|
584
|
-
{
|
|
585
|
-
"type": "string"
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
"type": "array",
|
|
589
|
-
"items": {
|
|
590
|
-
"type": "string"
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
],
|
|
594
|
-
"description": "Provided to mitigate replay attacks on domains."
|
|
595
|
-
},
|
|
596
|
-
"previousProof": {
|
|
597
|
-
"type": "string",
|
|
598
|
-
"description": "Identifies another data integrity proof that MUST verify before the current proof is processed"
|
|
599
|
-
},
|
|
600
|
-
"nonce": {
|
|
601
|
-
"type": "string",
|
|
602
|
-
"description": "Use of this field is to increase privacy by decreasing linkability that is the result of deterministically generated signatures."
|
|
603
|
-
}
|
|
604
|
-
},
|
|
605
|
-
"required": [
|
|
606
|
-
"type",
|
|
607
|
-
"cryptosuite",
|
|
608
|
-
"proofPurpose"
|
|
609
|
-
],
|
|
610
|
-
"additionalProperties": false,
|
|
611
|
-
"description": "Interface describing a did proof. https://www.w3.org/TR/vc-data-integrity/"
|
|
612
|
-
},
|
|
613
|
-
"DidCredentialSchema": {
|
|
614
|
-
"type": "object",
|
|
615
|
-
"properties": {
|
|
616
|
-
"id": {
|
|
617
|
-
"type": "string",
|
|
618
|
-
"description": "The URI id."
|
|
619
|
-
},
|
|
620
|
-
"type": {
|
|
621
|
-
"type": "string",
|
|
622
|
-
"description": "The credential schema type."
|
|
623
|
-
}
|
|
624
|
-
},
|
|
625
|
-
"required": [
|
|
626
|
-
"id",
|
|
627
|
-
"type"
|
|
628
|
-
],
|
|
629
|
-
"additionalProperties": false,
|
|
630
|
-
"description": "Interface describing a DID credential schema."
|
|
631
|
-
},
|
|
632
|
-
"DidCredentialStatus": {
|
|
633
|
-
"type": "object",
|
|
634
|
-
"properties": {
|
|
635
|
-
"id": {
|
|
636
|
-
"type": "string",
|
|
637
|
-
"description": "The URI id."
|
|
638
|
-
},
|
|
639
|
-
"type": {
|
|
640
|
-
"type": "string",
|
|
641
|
-
"description": "The credential status type."
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
"required": [
|
|
645
|
-
"id",
|
|
646
|
-
"type"
|
|
599
|
+
},
|
|
600
|
+
"/immutable-proof/{id}/notarization": {
|
|
601
|
+
"delete": {
|
|
602
|
+
"operationId": "immutableProofRemoveNotarization",
|
|
603
|
+
"summary": "Remove the notarization for a proof",
|
|
604
|
+
"tags": [
|
|
605
|
+
"Immutable Proof"
|
|
647
606
|
],
|
|
648
|
-
"
|
|
649
|
-
"description": "Additional properties."
|
|
650
|
-
},
|
|
651
|
-
"description": "Interface describing a DID credential status."
|
|
652
|
-
},
|
|
653
|
-
"DidCryptoSuites": {
|
|
654
|
-
"anyOf": [
|
|
655
|
-
{
|
|
656
|
-
"type": "string",
|
|
657
|
-
"const": "eddsa-jcs-2022",
|
|
658
|
-
"description": "The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785]. https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022"
|
|
659
|
-
},
|
|
607
|
+
"parameters": [
|
|
660
608
|
{
|
|
661
|
-
"
|
|
662
|
-
"
|
|
663
|
-
"
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
"properties": {
|
|
671
|
-
"@value": {
|
|
672
|
-
"type": "string",
|
|
673
|
-
"description": "The value for the label."
|
|
674
|
-
},
|
|
675
|
-
"@language": {
|
|
676
|
-
"type": "string",
|
|
677
|
-
"description": "The language for the label."
|
|
678
|
-
},
|
|
679
|
-
"@direction": {
|
|
680
|
-
"type": "string",
|
|
681
|
-
"description": "The direction of the label."
|
|
609
|
+
"name": "id",
|
|
610
|
+
"description": "The id of the immutable proof to remove the notarization from.",
|
|
611
|
+
"in": "path",
|
|
612
|
+
"required": true,
|
|
613
|
+
"schema": {
|
|
614
|
+
"type": "string"
|
|
615
|
+
},
|
|
616
|
+
"style": "simple",
|
|
617
|
+
"example": "immutable-proof:1234567890"
|
|
682
618
|
}
|
|
683
|
-
},
|
|
684
|
-
"required": [
|
|
685
|
-
"@value",
|
|
686
|
-
"@language"
|
|
687
619
|
],
|
|
688
|
-
"
|
|
689
|
-
"description": "Interface describing a DID Label."
|
|
690
|
-
},
|
|
691
|
-
"DidVerifiableCredential": {
|
|
692
|
-
"anyOf": [
|
|
693
|
-
{
|
|
694
|
-
"$ref": "#/components/schemas/DidVerifiableCredentialV1"
|
|
695
|
-
},
|
|
620
|
+
"security": [
|
|
696
621
|
{
|
|
697
|
-
"
|
|
622
|
+
"jwtBearerAuthScheme": []
|
|
698
623
|
}
|
|
699
624
|
],
|
|
700
|
-
"
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
"type": "object",
|
|
704
|
-
"properties": {
|
|
705
|
-
"id": {
|
|
706
|
-
"type": "string",
|
|
707
|
-
"description": "The identifier for the verifiable credential."
|
|
708
|
-
},
|
|
709
|
-
"type": {
|
|
710
|
-
"anyOf": [
|
|
711
|
-
{
|
|
712
|
-
"type": "string"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
"type": "array",
|
|
716
|
-
"items": {
|
|
717
|
-
"type": "string"
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
],
|
|
721
|
-
"description": "The types of the data stored in the verifiable credential."
|
|
722
|
-
},
|
|
723
|
-
"credentialSubject": {
|
|
724
|
-
"anyOf": [
|
|
725
|
-
{
|
|
726
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
"type": "array",
|
|
730
|
-
"items": {
|
|
731
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
],
|
|
735
|
-
"description": "The data for the verifiable credential."
|
|
736
|
-
},
|
|
737
|
-
"credentialStatus": {
|
|
738
|
-
"anyOf": [
|
|
739
|
-
{
|
|
740
|
-
"$ref": "#/components/schemas/DidCredentialStatus"
|
|
741
|
-
},
|
|
742
|
-
{
|
|
743
|
-
"type": "array",
|
|
744
|
-
"items": {
|
|
745
|
-
"$ref": "#/components/schemas/DidCredentialStatus"
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
],
|
|
749
|
-
"description": "Used to discover information about the current status of the verifiable credential, such as whether it is suspended or revoked."
|
|
750
|
-
},
|
|
751
|
-
"credentialSchema": {
|
|
752
|
-
"anyOf": [
|
|
753
|
-
{
|
|
754
|
-
"$ref": "#/components/schemas/DidCredentialSchema"
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
"type": "array",
|
|
758
|
-
"items": {
|
|
759
|
-
"$ref": "#/components/schemas/DidCredentialSchema"
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
],
|
|
763
|
-
"description": "Annotate type definitions or lock them to specific versions of the vocabulary."
|
|
625
|
+
"responses": {
|
|
626
|
+
"204": {
|
|
627
|
+
"description": "The rest request ended in success with no data."
|
|
764
628
|
},
|
|
765
|
-
"
|
|
766
|
-
"
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
"
|
|
773
|
-
"
|
|
774
|
-
"
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
"type": "string"
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
"type": "array",
|
|
783
|
-
"items": {
|
|
784
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
]
|
|
788
|
-
},
|
|
789
|
-
"description": {
|
|
790
|
-
"anyOf": [
|
|
791
|
-
{
|
|
792
|
-
"type": "string"
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
"type": "array",
|
|
796
|
-
"items": {
|
|
797
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
798
|
-
}
|
|
629
|
+
"400": {
|
|
630
|
+
"description": "The server cannot process the request, 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": "GeneralError",
|
|
640
|
+
"message": "errorMessage",
|
|
641
|
+
"properties": {
|
|
642
|
+
"foo": "bar"
|
|
799
643
|
}
|
|
800
|
-
|
|
644
|
+
}
|
|
801
645
|
}
|
|
802
|
-
},
|
|
803
|
-
"required": [
|
|
804
|
-
"id"
|
|
805
|
-
],
|
|
806
|
-
"additionalProperties": false
|
|
807
|
-
}
|
|
808
|
-
],
|
|
809
|
-
"description": "The issuing identity."
|
|
810
|
-
},
|
|
811
|
-
"name": {
|
|
812
|
-
"anyOf": [
|
|
813
|
-
{
|
|
814
|
-
"type": "string"
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
"type": "array",
|
|
818
|
-
"items": {
|
|
819
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
],
|
|
823
|
-
"description": "The name of the credential."
|
|
824
|
-
},
|
|
825
|
-
"description": {
|
|
826
|
-
"anyOf": [
|
|
827
|
-
{
|
|
828
|
-
"type": "string"
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
"type": "array",
|
|
832
|
-
"items": {
|
|
833
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
834
646
|
}
|
|
835
647
|
}
|
|
836
|
-
|
|
837
|
-
"description": "The description of the credential."
|
|
838
|
-
},
|
|
839
|
-
"evidence": {
|
|
840
|
-
"anyOf": [
|
|
841
|
-
{
|
|
842
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
843
|
-
},
|
|
844
|
-
{
|
|
845
|
-
"type": "array",
|
|
846
|
-
"items": {
|
|
847
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
],
|
|
851
|
-
"description": "Evidence associated with the Credential."
|
|
852
|
-
},
|
|
853
|
-
"proof": {
|
|
854
|
-
"anyOf": [
|
|
855
|
-
{
|
|
856
|
-
"$ref": "#/components/schemas/Proof"
|
|
857
|
-
},
|
|
858
|
-
{
|
|
859
|
-
"type": "array",
|
|
860
|
-
"items": {
|
|
861
|
-
"$ref": "#/components/schemas/Proof"
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
],
|
|
865
|
-
"description": "Proofs that the verifiable credential is valid. Optional if a different proof method is used, such as JWT."
|
|
648
|
+
}
|
|
866
649
|
},
|
|
867
|
-
"
|
|
868
|
-
"
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
"
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
"
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
650
|
+
"401": {
|
|
651
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
652
|
+
"content": {
|
|
653
|
+
"application/json": {
|
|
654
|
+
"schema": {
|
|
655
|
+
"$ref": "#/components/schemas/Error"
|
|
656
|
+
},
|
|
657
|
+
"examples": {
|
|
658
|
+
"exampleResponse": {
|
|
659
|
+
"value": {
|
|
660
|
+
"name": "UnauthorizedError",
|
|
661
|
+
"message": "errorMessage"
|
|
662
|
+
}
|
|
880
663
|
}
|
|
881
|
-
],
|
|
882
|
-
"items": {
|
|
883
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
],
|
|
887
|
-
"description": "The context for the verifiable credential."
|
|
888
|
-
},
|
|
889
|
-
"issuanceDate": {
|
|
890
|
-
"type": "string",
|
|
891
|
-
"description": "The date the verifiable credential was issued, depending on version validFrom might be set instead."
|
|
892
|
-
},
|
|
893
|
-
"expirationDate": {
|
|
894
|
-
"type": "string",
|
|
895
|
-
"description": "The date the verifiable credential expires, depending on version validUntil might be set instead."
|
|
896
|
-
}
|
|
897
|
-
},
|
|
898
|
-
"required": [
|
|
899
|
-
"@context",
|
|
900
|
-
"type"
|
|
901
|
-
],
|
|
902
|
-
"additionalProperties": false,
|
|
903
|
-
"description": "Interface describing a verifiable credential. https://www.w3.org/TR/vc-data-model-1.1"
|
|
904
|
-
},
|
|
905
|
-
"DidVerifiableCredentialV2": {
|
|
906
|
-
"type": "object",
|
|
907
|
-
"properties": {
|
|
908
|
-
"id": {
|
|
909
|
-
"type": "string",
|
|
910
|
-
"description": "The identifier for the verifiable credential."
|
|
911
|
-
},
|
|
912
|
-
"type": {
|
|
913
|
-
"anyOf": [
|
|
914
|
-
{
|
|
915
|
-
"type": "string"
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
"type": "array",
|
|
919
|
-
"items": {
|
|
920
|
-
"type": "string"
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
],
|
|
924
|
-
"description": "The types of the data stored in the verifiable credential."
|
|
925
|
-
},
|
|
926
|
-
"credentialSubject": {
|
|
927
|
-
"anyOf": [
|
|
928
|
-
{
|
|
929
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
"type": "array",
|
|
933
|
-
"items": {
|
|
934
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
],
|
|
938
|
-
"description": "The data for the verifiable credential."
|
|
939
|
-
},
|
|
940
|
-
"credentialStatus": {
|
|
941
|
-
"anyOf": [
|
|
942
|
-
{
|
|
943
|
-
"$ref": "#/components/schemas/DidCredentialStatus"
|
|
944
|
-
},
|
|
945
|
-
{
|
|
946
|
-
"type": "array",
|
|
947
|
-
"items": {
|
|
948
|
-
"$ref": "#/components/schemas/DidCredentialStatus"
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
],
|
|
952
|
-
"description": "Used to discover information about the current status of the verifiable credential, such as whether it is suspended or revoked."
|
|
953
|
-
},
|
|
954
|
-
"credentialSchema": {
|
|
955
|
-
"anyOf": [
|
|
956
|
-
{
|
|
957
|
-
"$ref": "#/components/schemas/DidCredentialSchema"
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
"type": "array",
|
|
961
|
-
"items": {
|
|
962
|
-
"$ref": "#/components/schemas/DidCredentialSchema"
|
|
963
664
|
}
|
|
964
665
|
}
|
|
965
|
-
|
|
966
|
-
"description": "Annotate type definitions or lock them to specific versions of the vocabulary."
|
|
666
|
+
}
|
|
967
667
|
},
|
|
968
|
-
"
|
|
969
|
-
"
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
"
|
|
976
|
-
"
|
|
977
|
-
"
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
"type": "string"
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
"type": "array",
|
|
986
|
-
"items": {
|
|
987
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
]
|
|
991
|
-
},
|
|
992
|
-
"description": {
|
|
993
|
-
"anyOf": [
|
|
994
|
-
{
|
|
995
|
-
"type": "string"
|
|
996
|
-
},
|
|
997
|
-
{
|
|
998
|
-
"type": "array",
|
|
999
|
-
"items": {
|
|
1000
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
1001
|
-
}
|
|
668
|
+
"404": {
|
|
669
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
670
|
+
"content": {
|
|
671
|
+
"application/json": {
|
|
672
|
+
"schema": {
|
|
673
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
674
|
+
},
|
|
675
|
+
"examples": {
|
|
676
|
+
"exampleResponse": {
|
|
677
|
+
"value": {
|
|
678
|
+
"name": "NotFoundError",
|
|
679
|
+
"message": "errorMessage",
|
|
680
|
+
"properties": {
|
|
681
|
+
"notFoundId": "1"
|
|
1002
682
|
}
|
|
1003
|
-
|
|
683
|
+
}
|
|
1004
684
|
}
|
|
1005
|
-
},
|
|
1006
|
-
"required": [
|
|
1007
|
-
"id"
|
|
1008
|
-
],
|
|
1009
|
-
"additionalProperties": false
|
|
1010
|
-
}
|
|
1011
|
-
],
|
|
1012
|
-
"description": "The issuing identity."
|
|
1013
|
-
},
|
|
1014
|
-
"name": {
|
|
1015
|
-
"anyOf": [
|
|
1016
|
-
{
|
|
1017
|
-
"type": "string"
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
"type": "array",
|
|
1021
|
-
"items": {
|
|
1022
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
],
|
|
1026
|
-
"description": "The name of the credential."
|
|
1027
|
-
},
|
|
1028
|
-
"description": {
|
|
1029
|
-
"anyOf": [
|
|
1030
|
-
{
|
|
1031
|
-
"type": "string"
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
"type": "array",
|
|
1035
|
-
"items": {
|
|
1036
|
-
"$ref": "#/components/schemas/DidLabel"
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
],
|
|
1040
|
-
"description": "The description of the credential."
|
|
1041
|
-
},
|
|
1042
|
-
"evidence": {
|
|
1043
|
-
"anyOf": [
|
|
1044
|
-
{
|
|
1045
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
"type": "array",
|
|
1049
|
-
"items": {
|
|
1050
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1051
685
|
}
|
|
1052
686
|
}
|
|
1053
|
-
|
|
1054
|
-
"description": "Evidence associated with the Credential."
|
|
1055
|
-
},
|
|
1056
|
-
"proof": {
|
|
1057
|
-
"anyOf": [
|
|
1058
|
-
{
|
|
1059
|
-
"$ref": "#/components/schemas/Proof"
|
|
1060
|
-
},
|
|
1061
|
-
{
|
|
1062
|
-
"type": "array",
|
|
1063
|
-
"items": {
|
|
1064
|
-
"$ref": "#/components/schemas/Proof"
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
],
|
|
1068
|
-
"description": "Proofs that the verifiable credential is valid. Optional if a different proof method is used, such as JWT."
|
|
687
|
+
}
|
|
1069
688
|
},
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
"
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
"
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
689
|
+
"500": {
|
|
690
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
691
|
+
"content": {
|
|
692
|
+
"application/json": {
|
|
693
|
+
"schema": {
|
|
694
|
+
"$ref": "#/components/schemas/Error"
|
|
695
|
+
},
|
|
696
|
+
"examples": {
|
|
697
|
+
"exampleResponse": {
|
|
698
|
+
"value": {
|
|
699
|
+
"name": "InternalServerError",
|
|
700
|
+
"message": "errorMessage"
|
|
701
|
+
}
|
|
1083
702
|
}
|
|
1084
|
-
],
|
|
1085
|
-
"items": {
|
|
1086
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
1087
703
|
}
|
|
1088
704
|
}
|
|
1089
|
-
|
|
1090
|
-
"description": "The context for the verifiable credential."
|
|
1091
|
-
},
|
|
1092
|
-
"validFrom": {
|
|
1093
|
-
"type": "string",
|
|
1094
|
-
"description": "The date the verifiable credential is valid from."
|
|
1095
|
-
},
|
|
1096
|
-
"validUntil": {
|
|
1097
|
-
"type": "string",
|
|
1098
|
-
"description": "The date the verifiable credential is valid until."
|
|
705
|
+
}
|
|
1099
706
|
}
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
"description": "Interface describing a verifiable credential. https://www.w3.org/TR/vc-data-model-2.0"
|
|
1107
|
-
},
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"components": {
|
|
712
|
+
"schemas": {
|
|
1108
713
|
"Error": {
|
|
714
|
+
"description": "Model to describe serialized error.",
|
|
1109
715
|
"type": "object",
|
|
1110
716
|
"properties": {
|
|
1111
717
|
"name": {
|
|
@@ -1114,7 +720,7 @@
|
|
|
1114
720
|
},
|
|
1115
721
|
"message": {
|
|
1116
722
|
"type": "string",
|
|
1117
|
-
"description": "The message for the error."
|
|
723
|
+
"description": "The message for the error as an i18n key."
|
|
1118
724
|
},
|
|
1119
725
|
"source": {
|
|
1120
726
|
"type": "string",
|
|
@@ -1136,126 +742,44 @@
|
|
|
1136
742
|
"required": [
|
|
1137
743
|
"name",
|
|
1138
744
|
"message"
|
|
1139
|
-
]
|
|
1140
|
-
"additionalProperties": false,
|
|
1141
|
-
"description": "Model to describe serialized error."
|
|
745
|
+
]
|
|
1142
746
|
},
|
|
1143
747
|
"ImmutableProofCreateRequest": {
|
|
1144
748
|
"type": "object",
|
|
1145
749
|
"properties": {
|
|
1146
750
|
"document": {
|
|
1147
751
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
"additionalProperties": false,
|
|
1154
|
-
"description": "The parameters from the body."
|
|
1155
|
-
},
|
|
1156
|
-
"JsonWebSignature2020Proof": {
|
|
1157
|
-
"type": "object",
|
|
1158
|
-
"properties": {
|
|
1159
|
-
"@context": {
|
|
1160
|
-
"anyOf": [
|
|
1161
|
-
{
|
|
752
|
+
},
|
|
753
|
+
"options": {
|
|
754
|
+
"type": "object",
|
|
755
|
+
"properties": {
|
|
756
|
+
"deleteLock": {
|
|
1162
757
|
"type": "string",
|
|
1163
|
-
"
|
|
1164
|
-
},
|
|
1165
|
-
{
|
|
1166
|
-
"type": "array",
|
|
1167
|
-
"minItems": 1,
|
|
1168
|
-
"prefixItems": [
|
|
1169
|
-
{
|
|
1170
|
-
"type": "string",
|
|
1171
|
-
"const": "https://w3id.org/security/suites/jws-2020/v1"
|
|
1172
|
-
}
|
|
1173
|
-
],
|
|
1174
|
-
"items": {
|
|
1175
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
1176
|
-
}
|
|
758
|
+
"description": "An ISO 8601 date-time string specifying when the notarization lock expires.\nIf omitted, no deletion lock is applied."
|
|
1177
759
|
}
|
|
1178
|
-
|
|
1179
|
-
"description": "
|
|
1180
|
-
},
|
|
1181
|
-
"type": {
|
|
1182
|
-
"type": "string",
|
|
1183
|
-
"const": "JsonWebSignature2020",
|
|
1184
|
-
"description": "JSON-LD Type."
|
|
1185
|
-
},
|
|
1186
|
-
"proofPurpose": {
|
|
1187
|
-
"type": "string",
|
|
1188
|
-
"description": "The reason the proof was created."
|
|
1189
|
-
},
|
|
1190
|
-
"verificationMethod": {
|
|
1191
|
-
"type": "string",
|
|
1192
|
-
"description": "The verification method of the proof."
|
|
1193
|
-
},
|
|
1194
|
-
"created": {
|
|
1195
|
-
"type": "string",
|
|
1196
|
-
"description": "The iso date of when the proof was created."
|
|
1197
|
-
},
|
|
1198
|
-
"jws": {
|
|
1199
|
-
"type": "string",
|
|
1200
|
-
"description": "The JSON Web Signature."
|
|
760
|
+
},
|
|
761
|
+
"description": "Optional settings for the proof."
|
|
1201
762
|
}
|
|
1202
763
|
},
|
|
1203
764
|
"required": [
|
|
1204
|
-
"
|
|
1205
|
-
"proofPurpose"
|
|
765
|
+
"document"
|
|
1206
766
|
],
|
|
1207
|
-
"
|
|
1208
|
-
"description": "Interface describing a did proof in JSON Web Signature 2020 Format. https://www.w3.org/TR/vc-jws-2020/"
|
|
767
|
+
"description": "The parameters from the body."
|
|
1209
768
|
},
|
|
1210
769
|
"NotFoundResponse": {
|
|
1211
770
|
"type": "object",
|
|
1212
|
-
"additionalProperties": false,
|
|
1213
771
|
"properties": {
|
|
1214
772
|
"notFoundId": {
|
|
1215
773
|
"type": "string",
|
|
1216
774
|
"description": "The id if the item that was not found."
|
|
1217
|
-
},
|
|
1218
|
-
"name": {
|
|
1219
|
-
"type": "string",
|
|
1220
|
-
"description": "The name for the error."
|
|
1221
|
-
},
|
|
1222
|
-
"message": {
|
|
1223
|
-
"type": "string",
|
|
1224
|
-
"description": "The message for the error."
|
|
1225
|
-
},
|
|
1226
|
-
"source": {
|
|
1227
|
-
"type": "string",
|
|
1228
|
-
"description": "The source of the error."
|
|
1229
|
-
},
|
|
1230
|
-
"properties": {
|
|
1231
|
-
"type": "object",
|
|
1232
|
-
"additionalProperties": {},
|
|
1233
|
-
"description": "Any additional information for the error."
|
|
1234
|
-
},
|
|
1235
|
-
"stack": {
|
|
1236
|
-
"type": "string",
|
|
1237
|
-
"description": "The stack trace for the error."
|
|
1238
|
-
},
|
|
1239
|
-
"cause": {
|
|
1240
|
-
"$ref": "#/components/schemas/Error"
|
|
1241
775
|
}
|
|
1242
776
|
},
|
|
1243
|
-
"
|
|
1244
|
-
"message",
|
|
1245
|
-
"name"
|
|
1246
|
-
],
|
|
1247
|
-
"description": "The body which contains the error."
|
|
1248
|
-
},
|
|
1249
|
-
"Proof": {
|
|
1250
|
-
"anyOf": [
|
|
1251
|
-
{
|
|
1252
|
-
"$ref": "#/components/schemas/DataIntegrityProof"
|
|
1253
|
-
},
|
|
777
|
+
"allOf": [
|
|
1254
778
|
{
|
|
1255
|
-
"$ref": "#/components/schemas/
|
|
779
|
+
"$ref": "#/components/schemas/Error"
|
|
1256
780
|
}
|
|
1257
781
|
],
|
|
1258
|
-
"description": "
|
|
782
|
+
"description": "The body which contains the error."
|
|
1259
783
|
}
|
|
1260
784
|
},
|
|
1261
785
|
"securitySchemes": {
|