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

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Immutable Proof Service
2
2
 
3
- Immutable proof contract implementation and REST endpoint definitions.
3
+ This package implements the core immutable proof lifecycle, including proof creation, retrieval, verification, and storage coordination. It also exposes route and schema helpers so API hosts can register endpoints and entity schemas with consistent behaviour.
4
4
 
5
5
  ## Installation
6
6
 
package/docs/changelog.md CHANGED
@@ -1,4 +1,19 @@
1
- # @twin.org/immutable-proof-service - Changelog
1
+ # Changelog
2
+
3
+ ## [0.0.3-next.11](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-service-v0.0.3-next.10...immutable-proof-service-v0.0.3-next.11) (2026-03-25)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **immutable-proof-service:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.10 to 0.0.3-next.11
16
+ * @twin.org/immutable-proof-task bumped from 0.0.3-next.10 to 0.0.3-next.11
2
17
 
3
18
  ## [0.0.3-next.10](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-service-v0.0.3-next.9...immutable-proof-service-v0.0.3-next.10) (2026-02-25)
4
19
 
package/docs/examples.md CHANGED
@@ -1 +1,127 @@
1
- # @twin.org/immutable-proof-service - Examples
1
+ # Immutable Proof Service Examples
2
+
3
+ These examples show how to initialise storage and routes, create and retrieve proofs, verify them, and work with persisted entities.
4
+
5
+ ## ImmutableProofService
6
+
7
+ ```typescript
8
+ import { ImmutableProofService } from '@twin.org/immutable-proof-service';
9
+
10
+ const service = new ImmutableProofService({
11
+ identityConnectorType: 'identity',
12
+ config: {
13
+ verificationMethodId: 'immutable-proof-assertion'
14
+ }
15
+ });
16
+
17
+ console.log(service.className()); // ImmutableProofService
18
+ ```
19
+
20
+ ```typescript
21
+ import { ImmutableProofService } from '@twin.org/immutable-proof-service';
22
+
23
+ const service = new ImmutableProofService();
24
+ await service.start();
25
+
26
+ const proofId = await service.create({
27
+ '@context': 'https://schema.org',
28
+ type: 'Person',
29
+ name: 'Alice Example'
30
+ });
31
+
32
+ console.log(proofId); // immutable-proof:01JABCDEF1234567890
33
+ ```
34
+
35
+ ```typescript
36
+ import { ImmutableProofService } from '@twin.org/immutable-proof-service';
37
+
38
+ const service = new ImmutableProofService();
39
+ const proofId = 'immutable-proof:01JABCDEF1234567890';
40
+
41
+ const credential = await service.get(proofId);
42
+ const verification = await service.verify(proofId);
43
+
44
+ console.log(credential.id); // immutable-proof:01JABCDEF1234567890
45
+ console.log(verification.verified); // true
46
+ ```
47
+
48
+ ```typescript
49
+ import { ImmutableProofService } from '@twin.org/immutable-proof-service';
50
+
51
+ const service = new ImmutableProofService();
52
+ const proofId = 'immutable-proof:01JABCDEF1234567890';
53
+
54
+ await service.removeVerifiable(proofId);
55
+ const verificationAfterRemoval = await service.verify(proofId);
56
+
57
+ console.log(verificationAfterRemoval.verified); // false
58
+ ```
59
+
60
+ ## ImmutableProof
61
+
62
+ ```typescript
63
+ import { ImmutableProof } from '@twin.org/immutable-proof-service';
64
+
65
+ const entity: ImmutableProof = {
66
+ id: '01JABCDEF1234567890',
67
+ organizationId: 'did:iota:tst:issuer',
68
+ dateCreated: '2026-03-10T09:30:00.000Z',
69
+ proofObjectId: 'https://example.org/documents/100',
70
+ proofObjectIntegrity: 'yEr9VvYCGDh2Ww1YwQMehUy4LlW35mLhX8j8R8U6x0g=',
71
+ verifiableStorageId: 'verifiable-storage:01JABCDE'
72
+ };
73
+
74
+ console.log(entity.organizationId); // did:iota:tst:issuer
75
+ ```
76
+
77
+ ## Route and Schema Helpers
78
+
79
+ ```typescript
80
+ import {
81
+ generateRestRoutesImmutableProof,
82
+ initSchema,
83
+ restEntryPoints
84
+ } from '@twin.org/immutable-proof-service';
85
+
86
+ initSchema();
87
+
88
+ const routes = generateRestRoutesImmutableProof('/immutable-proof', 'immutable-proof');
89
+ console.log(routes.length); // 3
90
+ console.log(restEntryPoints[0].name); // immutable-proof
91
+ ```
92
+
93
+ ```typescript
94
+ import {
95
+ immutableProofCreate,
96
+ immutableProofGet,
97
+ immutableProofVerify
98
+ } from '@twin.org/immutable-proof-service';
99
+
100
+ const requestContext = {};
101
+
102
+ const createResponse = await immutableProofCreate(requestContext, 'immutable-proof', {
103
+ body: {
104
+ document: {
105
+ '@context': 'https://schema.org',
106
+ type: 'Person',
107
+ name: 'Alice Example'
108
+ }
109
+ }
110
+ });
111
+
112
+ const getResponse = await immutableProofGet(requestContext, 'immutable-proof', {
113
+ pathParams: {
114
+ id: createResponse.headers.location
115
+ }
116
+ });
117
+
118
+ const verifyResponse = await immutableProofVerify(requestContext, 'immutable-proof', {
119
+ pathParams: {
120
+ id: createResponse.headers.location
121
+ }
122
+ });
123
+
124
+ console.log(createResponse.statusCode); // 201
125
+ console.log(getResponse.body.id); // immutable-proof:01JABCDEF1234567890
126
+ console.log(verifyResponse.body.verified); // true
127
+ ```
@@ -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": {
@@ -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": {
@@ -14,7 +14,7 @@ Class describing the immutable proof.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### id
17
+ ### id {#id}
18
18
 
19
19
  > **id**: `string`
20
20
 
@@ -22,7 +22,7 @@ The id of the proof.
22
22
 
23
23
  ***
24
24
 
25
- ### organizationId
25
+ ### organizationId {#organizationid}
26
26
 
27
27
  > **organizationId**: `string`
28
28
 
@@ -30,7 +30,7 @@ The organization id.
30
30
 
31
31
  ***
32
32
 
33
- ### dateCreated
33
+ ### dateCreated {#datecreated}
34
34
 
35
35
  > **dateCreated**: `string`
36
36
 
@@ -38,15 +38,15 @@ The date/time of when the proof was created.
38
38
 
39
39
  ***
40
40
 
41
- ### proofObjectId?
41
+ ### proofObjectId? {#proofobjectid}
42
42
 
43
- > `optional` **proofObjectId**: `string`
43
+ > `optional` **proofObjectId?**: `string`
44
44
 
45
45
  The associated id for the item.
46
46
 
47
47
  ***
48
48
 
49
- ### proofObjectIntegrity
49
+ ### proofObjectIntegrity {#proofobjectintegrity}
50
50
 
51
51
  > **proofObjectIntegrity**: `string`
52
52
 
@@ -54,16 +54,16 @@ The associated integrity for the item.
54
54
 
55
55
  ***
56
56
 
57
- ### verifiableStorageId?
57
+ ### verifiableStorageId? {#verifiablestorageid}
58
58
 
59
- > `optional` **verifiableStorageId**: `string`
59
+ > `optional` **verifiableStorageId?**: `string`
60
60
 
61
61
  The verifiable storage id.
62
62
 
63
63
  ***
64
64
 
65
- ### vcContext?
65
+ ### vcContext? {#vccontext}
66
66
 
67
- > `optional` **vcContext**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"`
67
+ > `optional` **vcContext?**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"`
68
68
 
69
69
  The verifiable credential context.
@@ -28,7 +28,7 @@ The dependencies for the immutable proof connector.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,7 +54,7 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### start()
57
+ ### start() {#start}
58
58
 
59
59
  > **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
60
60
 
@@ -80,7 +80,7 @@ Nothing.
80
80
 
81
81
  ***
82
82
 
83
- ### create()
83
+ ### create() {#create}
84
84
 
85
85
  > **create**(`document`): `Promise`\<`string`\>
86
86
 
@@ -106,7 +106,7 @@ The id of the new proof.
106
106
 
107
107
  ***
108
108
 
109
- ### get()
109
+ ### get() {#get}
110
110
 
111
111
  > **get**(`id`): `Promise`\<`IDidVerifiableCredential`\>
112
112
 
@@ -136,7 +136,7 @@ NotFoundError if the proof is not found.
136
136
 
137
137
  ***
138
138
 
139
- ### verify()
139
+ ### verify() {#verify}
140
140
 
141
141
  > **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
142
142
 
@@ -166,7 +166,7 @@ NotFoundError if the proof is not found.
166
166
 
167
167
  ***
168
168
 
169
- ### removeVerifiable()
169
+ ### removeVerifiable() {#removeverifiable}
170
170
 
171
171
  > **removeVerifiable**(`id`): `Promise`\<`void`\>
172
172
 
@@ -4,9 +4,9 @@ Configuration for the immutable proof service.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### verificationMethodId?
7
+ ### verificationMethodId? {#verificationmethodid}
8
8
 
9
- > `optional` **verificationMethodId**: `string`
9
+ > `optional` **verificationMethodId?**: `string`
10
10
 
11
11
  The verification method id to use for the proof.
12
12
 
@@ -4,9 +4,9 @@ Options for the immutable proof service constructor.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### immutableProofEntityStorageType?
7
+ ### immutableProofEntityStorageType? {#immutableproofentitystoragetype}
8
8
 
9
- > `optional` **immutableProofEntityStorageType**: `string`
9
+ > `optional` **immutableProofEntityStorageType?**: `string`
10
10
 
11
11
  The entity storage for proofs.
12
12
 
@@ -18,9 +18,9 @@ immutable-proof
18
18
 
19
19
  ***
20
20
 
21
- ### verifiableStorageType?
21
+ ### verifiableStorageType? {#verifiablestoragetype}
22
22
 
23
- > `optional` **verifiableStorageType**: `string`
23
+ > `optional` **verifiableStorageType?**: `string`
24
24
 
25
25
  The verifiable storage.
26
26
 
@@ -32,9 +32,9 @@ verifiable-storage
32
32
 
33
33
  ***
34
34
 
35
- ### loggingComponentType?
35
+ ### loggingComponentType? {#loggingcomponenttype}
36
36
 
37
- > `optional` **loggingComponentType**: `string`
37
+ > `optional` **loggingComponentType?**: `string`
38
38
 
39
39
  The logging component type.
40
40
 
@@ -46,9 +46,9 @@ logging
46
46
 
47
47
  ***
48
48
 
49
- ### identityConnectorType?
49
+ ### identityConnectorType? {#identityconnectortype}
50
50
 
51
- > `optional` **identityConnectorType**: `string`
51
+ > `optional` **identityConnectorType?**: `string`
52
52
 
53
53
  The identity connector type.
54
54
 
@@ -60,9 +60,9 @@ identity
60
60
 
61
61
  ***
62
62
 
63
- ### backgroundTaskComponentType?
63
+ ### backgroundTaskComponentType? {#backgroundtaskcomponenttype}
64
64
 
65
- > `optional` **backgroundTaskComponentType**: `string`
65
+ > `optional` **backgroundTaskComponentType?**: `string`
66
66
 
67
67
  The background task component type.
68
68
 
@@ -74,16 +74,16 @@ background-task
74
74
 
75
75
  ***
76
76
 
77
- ### eventBusComponentType?
77
+ ### eventBusComponentType? {#eventbuscomponenttype}
78
78
 
79
- > `optional` **eventBusComponentType**: `string`
79
+ > `optional` **eventBusComponentType?**: `string`
80
80
 
81
81
  The event bus component type, defaults to no event bus.
82
82
 
83
83
  ***
84
84
 
85
- ### config?
85
+ ### config? {#config}
86
86
 
87
- > `optional` **config**: [`IImmutableProofServiceConfig`](IImmutableProofServiceConfig.md)
87
+ > `optional` **config?**: [`IImmutableProofServiceConfig`](IImmutableProofServiceConfig.md)
88
88
 
89
89
  The configuration for the connector.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.3-next.10",
4
- "description": "Immutable proof contract implementation and REST endpoint definitions",
3
+ "version": "0.0.3-next.11",
4
+ "description": "Core proof lifecycle service with route helpers for create, get, and verify operations",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/immutable-proof.git",
@@ -24,8 +24,8 @@
24
24
  "@twin.org/entity-storage-models": "next",
25
25
  "@twin.org/event-bus-models": "next",
26
26
  "@twin.org/identity-models": "next",
27
- "@twin.org/immutable-proof-models": "0.0.3-next.10",
28
- "@twin.org/immutable-proof-task": "0.0.3-next.10",
27
+ "@twin.org/immutable-proof-models": "0.0.3-next.11",
28
+ "@twin.org/immutable-proof-task": "0.0.3-next.11",
29
29
  "@twin.org/logging-models": "next",
30
30
  "@twin.org/nameof": "next",
31
31
  "@twin.org/standards-w3c-did": "next",