@twin.org/immutable-proof-service 0.0.3-next.10 → 0.0.3-next.12

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.
@@ -189,7 +189,7 @@
189
189
  "content": {
190
190
  "application/json": {
191
191
  "schema": {
192
- "$ref": "#/components/schemas/DidVerifiableCredential"
192
+ "$ref": "https://schema.twindev.org/w3c-did/DidVerifiableCredential"
193
193
  },
194
194
  "examples": {
195
195
  "immutableProofGetResponseExample": {
@@ -227,7 +227,7 @@
227
227
  },
228
228
  "application/ld+json": {
229
229
  "schema": {
230
- "$ref": "#/components/schemas/DidVerifiableCredential"
230
+ "$ref": "https://schema.twindev.org/w3c-did/DidVerifiableCredential"
231
231
  },
232
232
  "examples": {
233
233
  "immutableProofJsonLdGetResponseExample": {
@@ -500,605 +500,8 @@
500
500
  },
501
501
  "components": {
502
502
  "schemas": {
503
- "DataIntegrityProof": {
504
- "type": "object",
505
- "properties": {
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
- "description": "Interface describing a did proof. https://www.w3.org/TR/vc-data-integrity/"
611
- },
612
- "DidCredentialSchema": {
613
- "type": "object",
614
- "properties": {
615
- "id": {
616
- "type": "string",
617
- "description": "The URI id."
618
- },
619
- "type": {
620
- "type": "string",
621
- "description": "The credential schema type."
622
- }
623
- },
624
- "required": [
625
- "id",
626
- "type"
627
- ],
628
- "description": "Interface describing a DID credential schema."
629
- },
630
- "DidCredentialStatus": {
631
- "type": "object",
632
- "properties": {
633
- "id": {
634
- "type": "string",
635
- "description": "The URI id."
636
- },
637
- "type": {
638
- "type": "string",
639
- "description": "The credential status type."
640
- }
641
- },
642
- "required": [
643
- "id",
644
- "type"
645
- ],
646
- "additionalProperties": {
647
- "description": "Additional properties."
648
- },
649
- "description": "Interface describing a DID credential status."
650
- },
651
- "DidCryptoSuites": {
652
- "anyOf": [
653
- {
654
- "type": "string",
655
- "const": "eddsa-jcs-2022",
656
- "description": "The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785]. https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022"
657
- },
658
- {
659
- "type": "string",
660
- "const": "eddsa-rdfc-2022",
661
- "description": "The type for EdDSA crypto suite for RDF Dataset Canonicalization. https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022"
662
- }
663
- ],
664
- "description": "The types for DID Proof crypto suites."
665
- },
666
- "DidLabel": {
667
- "type": "object",
668
- "properties": {
669
- "@value": {
670
- "type": "string",
671
- "description": "The value for the label."
672
- },
673
- "@language": {
674
- "type": "string",
675
- "description": "The language for the label."
676
- },
677
- "@direction": {
678
- "type": "string",
679
- "description": "The direction of the label."
680
- }
681
- },
682
- "required": [
683
- "@value",
684
- "@language"
685
- ],
686
- "description": "Interface describing a DID Label."
687
- },
688
- "DidVerifiableCredential": {
689
- "anyOf": [
690
- {
691
- "$ref": "#/components/schemas/DidVerifiableCredentialV1"
692
- },
693
- {
694
- "$ref": "#/components/schemas/DidVerifiableCredentialV2"
695
- }
696
- ],
697
- "description": "Interface describing a verifiable credential."
698
- },
699
- "DidVerifiableCredentialV1": {
700
- "type": "object",
701
- "properties": {
702
- "id": {
703
- "type": "string",
704
- "description": "The identifier for the verifiable credential."
705
- },
706
- "type": {
707
- "anyOf": [
708
- {
709
- "type": "string"
710
- },
711
- {
712
- "type": "array",
713
- "items": {
714
- "type": "string"
715
- }
716
- }
717
- ],
718
- "description": "The types of the data stored in the verifiable credential."
719
- },
720
- "credentialSubject": {
721
- "anyOf": [
722
- {
723
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
724
- },
725
- {
726
- "type": "array",
727
- "items": {
728
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
729
- }
730
- }
731
- ],
732
- "description": "The data for the verifiable credential."
733
- },
734
- "credentialStatus": {
735
- "anyOf": [
736
- {
737
- "$ref": "#/components/schemas/DidCredentialStatus"
738
- },
739
- {
740
- "type": "array",
741
- "items": {
742
- "$ref": "#/components/schemas/DidCredentialStatus"
743
- }
744
- }
745
- ],
746
- "description": "Used to discover information about the current status of the verifiable credential, such as whether it is suspended or revoked."
747
- },
748
- "credentialSchema": {
749
- "anyOf": [
750
- {
751
- "$ref": "#/components/schemas/DidCredentialSchema"
752
- },
753
- {
754
- "type": "array",
755
- "items": {
756
- "$ref": "#/components/schemas/DidCredentialSchema"
757
- }
758
- }
759
- ],
760
- "description": "Annotate type definitions or lock them to specific versions of the vocabulary."
761
- },
762
- "issuer": {
763
- "anyOf": [
764
- {
765
- "type": "string"
766
- },
767
- {
768
- "type": "object",
769
- "properties": {
770
- "id": {
771
- "type": "string"
772
- },
773
- "name": {
774
- "anyOf": [
775
- {
776
- "type": "string"
777
- },
778
- {
779
- "type": "array",
780
- "items": {
781
- "$ref": "#/components/schemas/DidLabel"
782
- }
783
- }
784
- ]
785
- },
786
- "description": {
787
- "anyOf": [
788
- {
789
- "type": "string"
790
- },
791
- {
792
- "type": "array",
793
- "items": {
794
- "$ref": "#/components/schemas/DidLabel"
795
- }
796
- }
797
- ]
798
- }
799
- },
800
- "required": [
801
- "id"
802
- ]
803
- }
804
- ],
805
- "description": "The issuing identity."
806
- },
807
- "name": {
808
- "anyOf": [
809
- {
810
- "type": "string"
811
- },
812
- {
813
- "type": "array",
814
- "items": {
815
- "$ref": "#/components/schemas/DidLabel"
816
- }
817
- }
818
- ],
819
- "description": "The name of the credential."
820
- },
821
- "description": {
822
- "anyOf": [
823
- {
824
- "type": "string"
825
- },
826
- {
827
- "type": "array",
828
- "items": {
829
- "$ref": "#/components/schemas/DidLabel"
830
- }
831
- }
832
- ],
833
- "description": "The description of the credential."
834
- },
835
- "evidence": {
836
- "anyOf": [
837
- {
838
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
839
- },
840
- {
841
- "type": "array",
842
- "items": {
843
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
844
- }
845
- }
846
- ],
847
- "description": "Evidence associated with the Credential."
848
- },
849
- "proof": {
850
- "anyOf": [
851
- {
852
- "$ref": "#/components/schemas/Proof"
853
- },
854
- {
855
- "type": "array",
856
- "items": {
857
- "$ref": "#/components/schemas/Proof"
858
- }
859
- }
860
- ],
861
- "description": "Proofs that the verifiable credential is valid. Optional if a different proof method is used, such as JWT."
862
- },
863
- "@context": {
864
- "anyOf": [
865
- {
866
- "type": "string",
867
- "const": "https://www.w3.org/2018/credentials/v1"
868
- },
869
- {
870
- "type": "array",
871
- "minItems": 1,
872
- "prefixItems": [
873
- {
874
- "type": "string",
875
- "const": "https://www.w3.org/2018/credentials/v1"
876
- }
877
- ],
878
- "items": {
879
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
880
- }
881
- }
882
- ],
883
- "description": "The context for the verifiable credential."
884
- },
885
- "issuanceDate": {
886
- "type": "string",
887
- "description": "The date the verifiable credential was issued, depending on version validFrom might be set instead."
888
- },
889
- "expirationDate": {
890
- "type": "string",
891
- "description": "The date the verifiable credential expires, depending on version validUntil might be set instead."
892
- }
893
- },
894
- "required": [
895
- "@context",
896
- "type"
897
- ],
898
- "description": "Interface describing a verifiable credential. https://www.w3.org/TR/vc-data-model-1.1"
899
- },
900
- "DidVerifiableCredentialV2": {
901
- "type": "object",
902
- "properties": {
903
- "id": {
904
- "type": "string",
905
- "description": "The identifier for the verifiable credential."
906
- },
907
- "type": {
908
- "anyOf": [
909
- {
910
- "type": "string"
911
- },
912
- {
913
- "type": "array",
914
- "items": {
915
- "type": "string"
916
- }
917
- }
918
- ],
919
- "description": "The types of the data stored in the verifiable credential."
920
- },
921
- "credentialSubject": {
922
- "anyOf": [
923
- {
924
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
925
- },
926
- {
927
- "type": "array",
928
- "items": {
929
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
930
- }
931
- }
932
- ],
933
- "description": "The data for the verifiable credential."
934
- },
935
- "credentialStatus": {
936
- "anyOf": [
937
- {
938
- "$ref": "#/components/schemas/DidCredentialStatus"
939
- },
940
- {
941
- "type": "array",
942
- "items": {
943
- "$ref": "#/components/schemas/DidCredentialStatus"
944
- }
945
- }
946
- ],
947
- "description": "Used to discover information about the current status of the verifiable credential, such as whether it is suspended or revoked."
948
- },
949
- "credentialSchema": {
950
- "anyOf": [
951
- {
952
- "$ref": "#/components/schemas/DidCredentialSchema"
953
- },
954
- {
955
- "type": "array",
956
- "items": {
957
- "$ref": "#/components/schemas/DidCredentialSchema"
958
- }
959
- }
960
- ],
961
- "description": "Annotate type definitions or lock them to specific versions of the vocabulary."
962
- },
963
- "issuer": {
964
- "anyOf": [
965
- {
966
- "type": "string"
967
- },
968
- {
969
- "type": "object",
970
- "properties": {
971
- "id": {
972
- "type": "string"
973
- },
974
- "name": {
975
- "anyOf": [
976
- {
977
- "type": "string"
978
- },
979
- {
980
- "type": "array",
981
- "items": {
982
- "$ref": "#/components/schemas/DidLabel"
983
- }
984
- }
985
- ]
986
- },
987
- "description": {
988
- "anyOf": [
989
- {
990
- "type": "string"
991
- },
992
- {
993
- "type": "array",
994
- "items": {
995
- "$ref": "#/components/schemas/DidLabel"
996
- }
997
- }
998
- ]
999
- }
1000
- },
1001
- "required": [
1002
- "id"
1003
- ]
1004
- }
1005
- ],
1006
- "description": "The issuing identity."
1007
- },
1008
- "name": {
1009
- "anyOf": [
1010
- {
1011
- "type": "string"
1012
- },
1013
- {
1014
- "type": "array",
1015
- "items": {
1016
- "$ref": "#/components/schemas/DidLabel"
1017
- }
1018
- }
1019
- ],
1020
- "description": "The name of the credential."
1021
- },
1022
- "description": {
1023
- "anyOf": [
1024
- {
1025
- "type": "string"
1026
- },
1027
- {
1028
- "type": "array",
1029
- "items": {
1030
- "$ref": "#/components/schemas/DidLabel"
1031
- }
1032
- }
1033
- ],
1034
- "description": "The description of the credential."
1035
- },
1036
- "evidence": {
1037
- "anyOf": [
1038
- {
1039
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1040
- },
1041
- {
1042
- "type": "array",
1043
- "items": {
1044
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1045
- }
1046
- }
1047
- ],
1048
- "description": "Evidence associated with the Credential."
1049
- },
1050
- "proof": {
1051
- "anyOf": [
1052
- {
1053
- "$ref": "#/components/schemas/Proof"
1054
- },
1055
- {
1056
- "type": "array",
1057
- "items": {
1058
- "$ref": "#/components/schemas/Proof"
1059
- }
1060
- }
1061
- ],
1062
- "description": "Proofs that the verifiable credential is valid. Optional if a different proof method is used, such as JWT."
1063
- },
1064
- "@context": {
1065
- "anyOf": [
1066
- {
1067
- "type": "string",
1068
- "const": "https://www.w3.org/ns/credentials/v2"
1069
- },
1070
- {
1071
- "type": "array",
1072
- "minItems": 1,
1073
- "prefixItems": [
1074
- {
1075
- "type": "string",
1076
- "const": "https://www.w3.org/ns/credentials/v2"
1077
- }
1078
- ],
1079
- "items": {
1080
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1081
- }
1082
- }
1083
- ],
1084
- "description": "The context for the verifiable credential."
1085
- },
1086
- "validFrom": {
1087
- "type": "string",
1088
- "description": "The date the verifiable credential is valid from."
1089
- },
1090
- "validUntil": {
1091
- "type": "string",
1092
- "description": "The date the verifiable credential is valid until."
1093
- }
1094
- },
1095
- "required": [
1096
- "@context",
1097
- "type"
1098
- ],
1099
- "description": "Interface describing a verifiable credential. https://www.w3.org/TR/vc-data-model-2.0"
1100
- },
1101
503
  "Error": {
504
+ "description": "Model to describe serialized error.",
1102
505
  "type": "object",
1103
506
  "properties": {
1104
507
  "name": {
@@ -1107,7 +510,7 @@
1107
510
  },
1108
511
  "message": {
1109
512
  "type": "string",
1110
- "description": "The message for the error."
513
+ "description": "The message for the error as an i18n key."
1111
514
  },
1112
515
  "source": {
1113
516
  "type": "string",
@@ -1129,8 +532,7 @@
1129
532
  "required": [
1130
533
  "name",
1131
534
  "message"
1132
- ],
1133
- "description": "Model to describe serialized error."
535
+ ]
1134
536
  },
1135
537
  "ImmutableProofCreateRequest": {
1136
538
  "type": "object",
@@ -1144,107 +546,20 @@
1144
546
  ],
1145
547
  "description": "The parameters from the body."
1146
548
  },
1147
- "JsonWebSignature2020Proof": {
1148
- "type": "object",
1149
- "properties": {
1150
- "@context": {
1151
- "anyOf": [
1152
- {
1153
- "type": "string",
1154
- "const": "https://w3id.org/security/suites/jws-2020/v1"
1155
- },
1156
- {
1157
- "type": "array",
1158
- "minItems": 1,
1159
- "prefixItems": [
1160
- {
1161
- "type": "string",
1162
- "const": "https://w3id.org/security/suites/jws-2020/v1"
1163
- }
1164
- ],
1165
- "items": {
1166
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1167
- }
1168
- }
1169
- ],
1170
- "description": "JSON-LD Context."
1171
- },
1172
- "type": {
1173
- "type": "string",
1174
- "const": "JsonWebSignature2020",
1175
- "description": "JSON-LD Type."
1176
- },
1177
- "proofPurpose": {
1178
- "type": "string",
1179
- "description": "The reason the proof was created."
1180
- },
1181
- "verificationMethod": {
1182
- "type": "string",
1183
- "description": "The verification method of the proof."
1184
- },
1185
- "created": {
1186
- "type": "string",
1187
- "description": "The iso date of when the proof was created."
1188
- },
1189
- "jws": {
1190
- "type": "string",
1191
- "description": "The JSON Web Signature."
1192
- }
1193
- },
1194
- "required": [
1195
- "type",
1196
- "proofPurpose"
1197
- ],
1198
- "description": "Interface describing a did proof in JSON Web Signature 2020 Format. https://www.w3.org/TR/vc-jws-2020/"
1199
- },
1200
549
  "NotFoundResponse": {
1201
550
  "type": "object",
1202
551
  "properties": {
1203
552
  "notFoundId": {
1204
553
  "type": "string",
1205
554
  "description": "The id if the item that was not found."
1206
- },
1207
- "name": {
1208
- "type": "string",
1209
- "description": "The name for the error."
1210
- },
1211
- "message": {
1212
- "type": "string",
1213
- "description": "The message for the error."
1214
- },
1215
- "source": {
1216
- "type": "string",
1217
- "description": "The source of the error."
1218
- },
1219
- "properties": {
1220
- "type": "object",
1221
- "additionalProperties": {},
1222
- "description": "Any additional information for the error."
1223
- },
1224
- "stack": {
1225
- "type": "string",
1226
- "description": "The stack trace for the error."
1227
- },
1228
- "cause": {
1229
- "$ref": "#/components/schemas/Error"
1230
555
  }
1231
556
  },
1232
- "required": [
1233
- "message",
1234
- "name"
1235
- ],
1236
- "description": "The body which contains the error."
1237
- },
1238
- "Proof": {
1239
- "anyOf": [
557
+ "allOf": [
1240
558
  {
1241
- "$ref": "#/components/schemas/DataIntegrityProof"
1242
- },
1243
- {
1244
- "$ref": "#/components/schemas/JsonWebSignature2020Proof"
559
+ "$ref": "#/components/schemas/Error"
1245
560
  }
1246
561
  ],
1247
- "description": "Interface describing a proof."
562
+ "description": "The body which contains the error."
1248
563
  }
1249
564
  },
1250
565
  "securitySchemes": {