@3sixty/immutable-proof-models 0.0.0-stage → 0.20.0-next.0
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/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/compiled/validators.js +294 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/immutableProofDataTypes.js +55 -0
- package/dist/es/dataTypes/immutableProofDataTypes.js.map +1 -0
- package/dist/es/index.js +24 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IImmutableProof.js +2 -0
- package/dist/es/models/IImmutableProof.js.map +1 -0
- package/dist/es/models/IImmutableProofComponent.js +2 -0
- package/dist/es/models/IImmutableProofComponent.js.map +1 -0
- package/dist/es/models/IImmutableProofCredential.js +2 -0
- package/dist/es/models/IImmutableProofCredential.js.map +1 -0
- package/dist/es/models/IImmutableProofDataIntegrity.js +4 -0
- package/dist/es/models/IImmutableProofDataIntegrity.js.map +1 -0
- package/dist/es/models/IImmutableProofVerification.js +2 -0
- package/dist/es/models/IImmutableProofVerification.js.map +1 -0
- package/dist/es/models/api/IImmutableProofCreateRequest.js +2 -0
- package/dist/es/models/api/IImmutableProofCreateRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofGetRequest.js +2 -0
- package/dist/es/models/api/IImmutableProofGetRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofGetResponse.js +2 -0
- package/dist/es/models/api/IImmutableProofGetResponse.js.map +1 -0
- package/dist/es/models/api/IImmutableProofRemoveNotarizationRequest.js +4 -0
- package/dist/es/models/api/IImmutableProofRemoveNotarizationRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofRemoveRequest.js +4 -0
- package/dist/es/models/api/IImmutableProofRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofVerifyRequest.js +2 -0
- package/dist/es/models/api/IImmutableProofVerifyRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofVerifyResponse.js +2 -0
- package/dist/es/models/api/IImmutableProofVerifyResponse.js.map +1 -0
- package/dist/es/models/eventBus/IImmutableProofEventBusProofCreated.js +4 -0
- package/dist/es/models/eventBus/IImmutableProofEventBusProofCreated.js.map +1 -0
- package/dist/es/models/immutableProofContexts.js +33 -0
- package/dist/es/models/immutableProofContexts.js.map +1 -0
- package/dist/es/models/immutableProofFailure.js +25 -0
- package/dist/es/models/immutableProofFailure.js.map +1 -0
- package/dist/es/models/immutableProofMetricIds.js +33 -0
- package/dist/es/models/immutableProofMetricIds.js.map +1 -0
- package/dist/es/models/immutableProofMetrics.js +42 -0
- package/dist/es/models/immutableProofMetrics.js.map +1 -0
- package/dist/es/models/immutableProofTopics.js +13 -0
- package/dist/es/models/immutableProofTopics.js.map +1 -0
- package/dist/es/models/immutableProofTypes.js +21 -0
- package/dist/es/models/immutableProofTypes.js.map +1 -0
- package/dist/es/schemas/ImmutableProof.json +39 -0
- package/dist/es/schemas/ImmutableProofCredential.json +25 -0
- package/dist/es/schemas/ImmutableProofDataIntegrity.json +13 -0
- package/dist/es/schemas/ImmutableProofFailure.json +24 -0
- package/dist/es/schemas/ImmutableProofVerification.json +30 -0
- package/dist/types/compiled/validators.d.ts +21 -0
- package/dist/types/dataTypes/immutableProofDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/models/IImmutableProof.d.ts +24 -0
- package/dist/types/models/IImmutableProofComponent.d.ts +47 -0
- package/dist/types/models/IImmutableProofCredential.d.ts +11 -0
- package/dist/types/models/IImmutableProofDataIntegrity.d.ts +10 -0
- package/dist/types/models/IImmutableProofVerification.d.ts +26 -0
- package/dist/types/models/api/IImmutableProofCreateRequest.d.ts +25 -0
- package/dist/types/models/api/IImmutableProofGetRequest.d.ts +21 -0
- package/dist/types/models/api/IImmutableProofGetResponse.d.ts +17 -0
- package/dist/types/models/api/IImmutableProofRemoveNotarizationRequest.d.ts +14 -0
- package/dist/types/models/api/IImmutableProofRemoveRequest.d.ts +14 -0
- package/dist/types/models/api/IImmutableProofVerifyRequest.d.ts +21 -0
- package/dist/types/models/api/IImmutableProofVerifyResponse.d.ts +17 -0
- package/dist/types/models/eventBus/IImmutableProofEventBusProofCreated.d.ts +9 -0
- package/dist/types/models/immutableProofContexts.d.ts +33 -0
- package/dist/types/models/immutableProofFailure.d.ts +25 -0
- package/dist/types/models/immutableProofMetricIds.d.ts +33 -0
- package/dist/types/models/immutableProofMetrics.d.ts +5 -0
- package/dist/types/models/immutableProofTopics.d.ts +13 -0
- package/dist/types/models/immutableProofTypes.d.ts +21 -0
- package/docs/changelog.md +0 -0
- package/docs/examples.md +72 -0
- package/docs/reference/classes/ImmutableProofDataTypes.md +25 -0
- package/docs/reference/index.md +43 -0
- package/docs/reference/interfaces/IImmutableProof.md +35 -0
- package/docs/reference/interfaces/IImmutableProofComponent.md +143 -0
- package/docs/reference/interfaces/IImmutableProofCreateRequest.md +30 -0
- package/docs/reference/interfaces/IImmutableProofCredential.md +15 -0
- package/docs/reference/interfaces/IImmutableProofDataIntegrity.md +11 -0
- package/docs/reference/interfaces/IImmutableProofEventBusProofCreated.md +11 -0
- package/docs/reference/interfaces/IImmutableProofGetRequest.md +29 -0
- package/docs/reference/interfaces/IImmutableProofGetResponse.md +23 -0
- package/docs/reference/interfaces/IImmutableProofRemoveNotarizationRequest.md +17 -0
- package/docs/reference/interfaces/IImmutableProofRemoveRequest.md +17 -0
- package/docs/reference/interfaces/IImmutableProofVerification.md +35 -0
- package/docs/reference/interfaces/IImmutableProofVerifyRequest.md +29 -0
- package/docs/reference/interfaces/IImmutableProofVerifyResponse.md +23 -0
- package/docs/reference/type-aliases/ImmutableProofContexts.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofFailure.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofMetricIds.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofTopics.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofTypes.md +5 -0
- package/docs/reference/variables/CompiledImmutableProof.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofCredential.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofDataIntegrity.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofFailure.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofVerification.md +5 -0
- package/docs/reference/variables/ImmutableProofContexts.md +43 -0
- package/docs/reference/variables/ImmutableProofFailure.md +31 -0
- package/docs/reference/variables/ImmutableProofMetricIds.md +43 -0
- package/docs/reference/variables/ImmutableProofMetrics.md +5 -0
- package/docs/reference/variables/ImmutableProofTopics.md +13 -0
- package/docs/reference/variables/ImmutableProofTypes.md +25 -0
- package/locales/en.json +3 -0
- package/package.json +56 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2024 IOTA Stiftung.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 3Sixty Immutable Proof Models
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This package defines the shared contracts used by immutable proof components, including request and response models, verification structures, topics, and schema context values. It provides a stable foundation so services, tasks, and clients can exchange data consistently.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
npm install @3sixty/immutable-proof-models
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
Usage of the APIs is shown in the examples [docs/examples.md](docs/examples.md)
|
|
14
|
+
|
|
15
|
+
## Reference
|
|
16
|
+
|
|
17
|
+
Detailed reference documentation for the API can be found in [docs/reference/index.md](docs/reference/index.md)
|
|
18
|
+
|
|
19
|
+
## Changelog
|
|
20
|
+
|
|
21
|
+
The changes between each version can be found in [docs/changelog.md](docs/changelog.md)
|
|
22
|
+
|
|
23
|
+
## Origin
|
|
24
|
+
|
|
25
|
+
This package is derived from the original [iotaledger/twin-immutable-proof](https://github.com/iotaledger/twin-immutable-proof/tree/next/packages/immutable-proof-models) repository.
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import * as external0 from "@3sixty/standards-w3c-did";
|
|
2
|
+
import * as external1 from "../models/immutableProofFailure.js";
|
|
3
|
+
const MESSAGES = ["must NOT have more than 2 items", "must NOT have fewer than 2 items", "must be equal to constant", "must be array", "must be string", "must be object", "must be boolean"];
|
|
4
|
+
function createError(instancePath, schemaPath, keyword, params, message) {
|
|
5
|
+
return { instancePath, schemaPath, keyword, params, ["message"]: typeof message === "number" ? MESSAGES[message] : message };
|
|
6
|
+
}
|
|
7
|
+
function pushError(errors, error) {
|
|
8
|
+
if (errors === null) {
|
|
9
|
+
return [error];
|
|
10
|
+
}
|
|
11
|
+
errors.push(error);
|
|
12
|
+
return errors;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Compiled validator for the ImmutableProof schema.
|
|
16
|
+
*/
|
|
17
|
+
export const CompiledImmutableProof = validate52;
|
|
18
|
+
function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
19
|
+
/*# sourceURL="https://schema.3sixty.global/immutable-proof/ImmutableProof" */ ;
|
|
20
|
+
let vErrors = null;
|
|
21
|
+
let errors = 0;
|
|
22
|
+
const evaluated0 = validate52.evaluated;
|
|
23
|
+
if (evaluated0.dynamicProps) {
|
|
24
|
+
evaluated0.props = undefined;
|
|
25
|
+
}
|
|
26
|
+
if (evaluated0.dynamicItems) {
|
|
27
|
+
evaluated0.items = undefined;
|
|
28
|
+
}
|
|
29
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
30
|
+
if (data.proofIntegrity === undefined) {
|
|
31
|
+
const err0 = createError(instancePath, "#/required", "required", { missingProperty: "proofIntegrity" }, "must have required property '" + "proofIntegrity" + "'");
|
|
32
|
+
vErrors = pushError(vErrors, err0);
|
|
33
|
+
errors++;
|
|
34
|
+
}
|
|
35
|
+
if (data["@context"] !== undefined) {
|
|
36
|
+
let data0 = data["@context"];
|
|
37
|
+
if (Array.isArray(data0)) {
|
|
38
|
+
if (data0.length > 2) {
|
|
39
|
+
const err1 = createError(instancePath + "/@context", "#/properties/%40context/maxItems", "maxItems", { limit: 2 }, 0);
|
|
40
|
+
vErrors = pushError(vErrors, err1);
|
|
41
|
+
errors++;
|
|
42
|
+
}
|
|
43
|
+
if (data0.length < 2) {
|
|
44
|
+
const err2 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 1);
|
|
45
|
+
vErrors = pushError(vErrors, err2);
|
|
46
|
+
errors++;
|
|
47
|
+
}
|
|
48
|
+
const len0 = data0.length;
|
|
49
|
+
if (len0 > 0) {
|
|
50
|
+
if ("https://schema.3sixty.global/immutable-proof/" !== data0[0]) {
|
|
51
|
+
const err3 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/immutable-proof/" }, 2);
|
|
52
|
+
vErrors = pushError(vErrors, err3);
|
|
53
|
+
errors++;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (len0 > 1) {
|
|
57
|
+
if ("https://schema.3sixty.global/common/" !== data0[1]) {
|
|
58
|
+
const err4 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/common/" }, 2);
|
|
59
|
+
vErrors = pushError(vErrors, err4);
|
|
60
|
+
errors++;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const len1 = data0.length;
|
|
64
|
+
if (!(len1 <= 2)) {
|
|
65
|
+
const err5 = createError(instancePath + "/@context", "#/properties/%40context/items", "items", { limit: 2 }, 0);
|
|
66
|
+
vErrors = pushError(vErrors, err5);
|
|
67
|
+
errors++;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const err6 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 3);
|
|
72
|
+
vErrors = pushError(vErrors, err6);
|
|
73
|
+
errors++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (data.type !== undefined) {
|
|
77
|
+
if ("ImmutableProof" !== data.type) {
|
|
78
|
+
const err7 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "ImmutableProof" }, 2);
|
|
79
|
+
vErrors = pushError(vErrors, err7);
|
|
80
|
+
errors++;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (data.id !== undefined) {
|
|
84
|
+
if (typeof data.id !== "string") {
|
|
85
|
+
const err8 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 4);
|
|
86
|
+
vErrors = pushError(vErrors, err8);
|
|
87
|
+
errors++;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (data.proofIntegrity !== undefined) {
|
|
91
|
+
if (typeof data.proofIntegrity !== "string") {
|
|
92
|
+
const err9 = createError(instancePath + "/proofIntegrity", "#/properties/proofIntegrity/type", "type", { type: "string" }, 4);
|
|
93
|
+
vErrors = pushError(vErrors, err9);
|
|
94
|
+
errors++;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
const err10 = createError(instancePath, "#/type", "type", { type: "object" }, 5);
|
|
100
|
+
vErrors = pushError(vErrors, err10);
|
|
101
|
+
errors++;
|
|
102
|
+
}
|
|
103
|
+
validate52.errors = vErrors;
|
|
104
|
+
return errors === 0;
|
|
105
|
+
}
|
|
106
|
+
validate52.evaluated = { "props": { "@context": true, "type": true, "id": true, "proofIntegrity": true }, "dynamicProps": false, "dynamicItems": false };
|
|
107
|
+
/**
|
|
108
|
+
* Compiled validator for the ImmutableProofCredential schema.
|
|
109
|
+
*/
|
|
110
|
+
export const CompiledImmutableProofCredential = validate53;
|
|
111
|
+
const keyword0 = external0["CompiledDidVerifiableCredential"];
|
|
112
|
+
const keyword1 = external0["CompiledProof"];
|
|
113
|
+
function validate54(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
114
|
+
/*# sourceURL="https://schema.3sixty.global/immutable-proof/ImmutableProofDataIntegrity" */ ;
|
|
115
|
+
let vErrors = null;
|
|
116
|
+
let errors = 0;
|
|
117
|
+
const evaluated0 = validate54.evaluated;
|
|
118
|
+
if (evaluated0.dynamicProps) {
|
|
119
|
+
evaluated0.props = undefined;
|
|
120
|
+
}
|
|
121
|
+
if (evaluated0.dynamicItems) {
|
|
122
|
+
evaluated0.items = undefined;
|
|
123
|
+
}
|
|
124
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
125
|
+
if (data.notarizationId !== undefined) {
|
|
126
|
+
if (typeof data.notarizationId !== "string") {
|
|
127
|
+
const err0 = createError(instancePath + "/notarizationId", "#/properties/notarizationId/type", "type", { type: "string" }, 4);
|
|
128
|
+
vErrors = pushError(vErrors, err0);
|
|
129
|
+
errors++;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
const err1 = createError(instancePath, "#/type", "type", { type: "object" }, 5);
|
|
135
|
+
vErrors = pushError(vErrors, err1);
|
|
136
|
+
errors++;
|
|
137
|
+
}
|
|
138
|
+
validate54.errors = vErrors;
|
|
139
|
+
return errors === 0;
|
|
140
|
+
}
|
|
141
|
+
validate54.evaluated = { "props": { "notarizationId": true }, "dynamicProps": false, "dynamicItems": false };
|
|
142
|
+
function validate53(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
143
|
+
/*# sourceURL="https://schema.3sixty.global/immutable-proof/ImmutableProofCredential" */ ;
|
|
144
|
+
let vErrors = null;
|
|
145
|
+
let errors = 0;
|
|
146
|
+
const evaluated0 = validate53.evaluated;
|
|
147
|
+
if (evaluated0.dynamicProps) {
|
|
148
|
+
evaluated0.props = undefined;
|
|
149
|
+
}
|
|
150
|
+
if (evaluated0.dynamicItems) {
|
|
151
|
+
evaluated0.items = undefined;
|
|
152
|
+
}
|
|
153
|
+
if (!(keyword0(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
154
|
+
vErrors = vErrors === null ? keyword0.errors : vErrors.concat(keyword0.errors);
|
|
155
|
+
errors = vErrors.length;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
var props0 = keyword0.evaluated.props;
|
|
159
|
+
}
|
|
160
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
161
|
+
if (props0 !== true) {
|
|
162
|
+
props0 = props0 || {};
|
|
163
|
+
props0.proof = true;
|
|
164
|
+
}
|
|
165
|
+
if (data.proof !== undefined) {
|
|
166
|
+
let data0 = data.proof;
|
|
167
|
+
if (!(keyword1(data0, { instancePath: instancePath + "/proof", parentData: data, parentDataProperty: "proof", rootData, dynamicAnchors }))) {
|
|
168
|
+
vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
|
|
169
|
+
errors = vErrors.length;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
var props1 = keyword1.evaluated.props;
|
|
173
|
+
}
|
|
174
|
+
if (!(validate54(data0, { instancePath: instancePath + "/proof", parentData: data, parentDataProperty: "proof", rootData, dynamicAnchors }))) {
|
|
175
|
+
vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
|
|
176
|
+
errors = vErrors.length;
|
|
177
|
+
}
|
|
178
|
+
if (props1 !== true) {
|
|
179
|
+
props1 = props1 || {};
|
|
180
|
+
props1.notarizationId = true;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
const err0 = createError(instancePath, "#/type", "type", { type: "object" }, 5);
|
|
186
|
+
vErrors = pushError(vErrors, err0);
|
|
187
|
+
errors++;
|
|
188
|
+
}
|
|
189
|
+
validate53.errors = vErrors;
|
|
190
|
+
evaluated0.props = props0;
|
|
191
|
+
return errors === 0;
|
|
192
|
+
}
|
|
193
|
+
validate53.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
194
|
+
/**
|
|
195
|
+
* Compiled validator for the ImmutableProofDataIntegrity schema.
|
|
196
|
+
*/
|
|
197
|
+
export const CompiledImmutableProofDataIntegrity = validate54;
|
|
198
|
+
/**
|
|
199
|
+
* Compiled validator for the ImmutableProofVerification schema.
|
|
200
|
+
*/
|
|
201
|
+
export const CompiledImmutableProofVerification = validate56;
|
|
202
|
+
const keyword2 = Object.values(external1["ImmutableProofFailure"]);
|
|
203
|
+
function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
204
|
+
/*# sourceURL="https://schema.3sixty.global/immutable-proof/ImmutableProofFailure" */ ;
|
|
205
|
+
let vErrors = null;
|
|
206
|
+
let errors = 0;
|
|
207
|
+
const evaluated0 = validate57.evaluated;
|
|
208
|
+
if (evaluated0.dynamicProps) {
|
|
209
|
+
evaluated0.props = undefined;
|
|
210
|
+
}
|
|
211
|
+
if (evaluated0.dynamicItems) {
|
|
212
|
+
evaluated0.items = undefined;
|
|
213
|
+
}
|
|
214
|
+
if (!keyword2.includes(data)) {
|
|
215
|
+
for (let i0 = 0; i0 < keyword2.length; i0++) {
|
|
216
|
+
vErrors = pushError(vErrors, createError(instancePath, "#/anyOf" + "/" + i0 + "/const", "const", { allowedValue: keyword2[i0] }, "must be equal to constant"));
|
|
217
|
+
errors++;
|
|
218
|
+
}
|
|
219
|
+
vErrors = pushError(vErrors, createError(instancePath, "#/anyOf", "anyOf", {}, "must match a schema in anyOf"));
|
|
220
|
+
errors++;
|
|
221
|
+
}
|
|
222
|
+
validate57.errors = vErrors;
|
|
223
|
+
return errors === 0;
|
|
224
|
+
}
|
|
225
|
+
validate57.evaluated = { "dynamicProps": false, "dynamicItems": false };
|
|
226
|
+
function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
227
|
+
/*# sourceURL="https://schema.3sixty.global/immutable-proof/ImmutableProofVerification" */ ;
|
|
228
|
+
let vErrors = null;
|
|
229
|
+
let errors = 0;
|
|
230
|
+
const evaluated0 = validate56.evaluated;
|
|
231
|
+
if (evaluated0.dynamicProps) {
|
|
232
|
+
evaluated0.props = undefined;
|
|
233
|
+
}
|
|
234
|
+
if (evaluated0.dynamicItems) {
|
|
235
|
+
evaluated0.items = undefined;
|
|
236
|
+
}
|
|
237
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
238
|
+
if (data["@context"] === undefined) {
|
|
239
|
+
const err0 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
|
|
240
|
+
vErrors = pushError(vErrors, err0);
|
|
241
|
+
errors++;
|
|
242
|
+
}
|
|
243
|
+
if (data.type === undefined) {
|
|
244
|
+
const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
|
|
245
|
+
vErrors = pushError(vErrors, err1);
|
|
246
|
+
errors++;
|
|
247
|
+
}
|
|
248
|
+
if (data.verified === undefined) {
|
|
249
|
+
const err2 = createError(instancePath, "#/required", "required", { missingProperty: "verified" }, "must have required property '" + "verified" + "'");
|
|
250
|
+
vErrors = pushError(vErrors, err2);
|
|
251
|
+
errors++;
|
|
252
|
+
}
|
|
253
|
+
if (data["@context"] !== undefined) {
|
|
254
|
+
if ("https://schema.3sixty.global/immutable-proof/" !== data["@context"]) {
|
|
255
|
+
const err3 = createError(instancePath + "/@context", "#/properties/%40context/const", "const", { allowedValue: "https://schema.3sixty.global/immutable-proof/" }, 2);
|
|
256
|
+
vErrors = pushError(vErrors, err3);
|
|
257
|
+
errors++;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (data.type !== undefined) {
|
|
261
|
+
if ("ImmutableProofVerification" !== data.type) {
|
|
262
|
+
const err4 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "ImmutableProofVerification" }, 2);
|
|
263
|
+
vErrors = pushError(vErrors, err4);
|
|
264
|
+
errors++;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (data.verified !== undefined) {
|
|
268
|
+
if (typeof data.verified !== "boolean") {
|
|
269
|
+
const err5 = createError(instancePath + "/verified", "#/properties/verified/type", "type", { type: "boolean" }, 6);
|
|
270
|
+
vErrors = pushError(vErrors, err5);
|
|
271
|
+
errors++;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (data.failure !== undefined) {
|
|
275
|
+
if (!(validate57(data.failure, { instancePath: instancePath + "/failure", parentData: data, parentDataProperty: "failure", rootData, dynamicAnchors }))) {
|
|
276
|
+
vErrors = vErrors === null ? validate57.errors : vErrors.concat(validate57.errors);
|
|
277
|
+
errors = vErrors.length;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
const err6 = createError(instancePath, "#/type", "type", { type: "object" }, 5);
|
|
283
|
+
vErrors = pushError(vErrors, err6);
|
|
284
|
+
errors++;
|
|
285
|
+
}
|
|
286
|
+
validate56.errors = vErrors;
|
|
287
|
+
return errors === 0;
|
|
288
|
+
}
|
|
289
|
+
validate56.evaluated = { "props": { "@context": true, "type": true, "verified": true, "failure": true }, "dynamicProps": false, "dynamicItems": false };
|
|
290
|
+
/**
|
|
291
|
+
* Compiled validator for the ImmutableProofFailure schema.
|
|
292
|
+
*/
|
|
293
|
+
export const CompiledImmutableProofFailure = validate57;
|
|
294
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/compiled/validators.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,S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,EAAC,OAAO,EAAC,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAC,CAAC;AAExI;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAuB,UAAU,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n// This file is generated by ts-to-schema, do not edit it directly.\n// @ts-nocheck\n/* cspell:disable */\nimport type { ICompiledValidator } from \"@3sixty/data-core\";\nimport * as external0 from \"@3sixty/standards-w3c-did\";\nimport * as external1 from \"../models/immutableProofFailure.js\";\nconst MESSAGES = [\"must NOT have more than 2 items\",\"must NOT have fewer than 2 items\",\"must be equal to constant\",\"must be array\",\"must be string\",\"must be object\",\"must be boolean\"];\nfunction createError(instancePath, schemaPath, keyword, params, message) {\nreturn { instancePath, schemaPath, keyword, params, [\"message\"]: typeof message === \"number\" ? MESSAGES[message] : message };\n}\nfunction pushError(errors, error) {\nif (errors === null) {\nreturn [error];\n}\nerrors.push(error);\nreturn errors;\n}\n/**\n * Compiled validator for the ImmutableProof schema.\n */\nexport const CompiledImmutableProof: ICompiledValidator = validate52;\n\nfunction validate52(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.3sixty.global/immutable-proof/ImmutableProof\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate52.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(data.proofIntegrity === undefined){\nconst err0 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"proofIntegrity\"},\"must have required property '\"+\"proofIntegrity\"+\"'\");\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\nif(data[\"@context\"] !== undefined){\nlet data0 = data[\"@context\"];\nif(Array.isArray(data0)){\nif(data0.length > 2){\nconst err1 = createError(instancePath+\"/@context\",\"#/properties/%40context/maxItems\",\"maxItems\",{limit: 2},0);\nvErrors = pushError(vErrors, err1);\nerrors++;\n}\nif(data0.length < 2){\nconst err2 = createError(instancePath+\"/@context\",\"#/properties/%40context/minItems\",\"minItems\",{limit: 2},1);\nvErrors = pushError(vErrors, err2);\nerrors++;\n}\nconst len0 = data0.length;\nif(len0 > 0){\nif(\"https://schema.3sixty.global/immutable-proof/\" !== data0[0]){\nconst err3 = createError(instancePath+\"/@context/0\",\"#/properties/%40context/prefixItems/0/const\",\"const\",{allowedValue: \"https://schema.3sixty.global/immutable-proof/\"},2);\nvErrors = pushError(vErrors, err3);\nerrors++;\n}\n}\nif(len0 > 1){\nif(\"https://schema.3sixty.global/common/\" !== data0[1]){\nconst err4 = createError(instancePath+\"/@context/1\",\"#/properties/%40context/prefixItems/1/const\",\"const\",{allowedValue: \"https://schema.3sixty.global/common/\"},2);\nvErrors = pushError(vErrors, err4);\nerrors++;\n}\n}\nconst len1 = data0.length;\nif(!(len1 <= 2)){\nconst err5 = createError(instancePath+\"/@context\",\"#/properties/%40context/items\",\"items\",{limit: 2},0);\nvErrors = pushError(vErrors, err5);\nerrors++;\n}\n}\nelse {\nconst err6 = createError(instancePath+\"/@context\",\"#/properties/%40context/type\",\"type\",{type: \"array\"},3);\nvErrors = pushError(vErrors, err6);\nerrors++;\n}\n}\nif(data.type !== undefined){\nif(\"ImmutableProof\" !== data.type){\nconst err7 = createError(instancePath+\"/type\",\"#/properties/type/const\",\"const\",{allowedValue: \"ImmutableProof\"},2);\nvErrors = pushError(vErrors, err7);\nerrors++;\n}\n}\nif(data.id !== undefined){\nif(typeof data.id !== \"string\"){\nconst err8 = createError(instancePath+\"/id\",\"#/properties/id/type\",\"type\",{type: \"string\"},4);\nvErrors = pushError(vErrors, err8);\nerrors++;\n}\n}\nif(data.proofIntegrity !== undefined){\nif(typeof data.proofIntegrity !== \"string\"){\nconst err9 = createError(instancePath+\"/proofIntegrity\",\"#/properties/proofIntegrity/type\",\"type\",{type: \"string\"},4);\nvErrors = pushError(vErrors, err9);\nerrors++;\n}\n}\n}\nelse {\nconst err10 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},5);\nvErrors = pushError(vErrors, err10);\nerrors++;\n}\nvalidate52.errors = vErrors;\nreturn errors === 0;\n}\nvalidate52.evaluated = {\"props\":{\"@context\":true,\"type\":true,\"id\":true,\"proofIntegrity\":true},\"dynamicProps\":false,\"dynamicItems\":false};\n\n/**\n * Compiled validator for the ImmutableProofCredential schema.\n */\nexport const CompiledImmutableProofCredential: ICompiledValidator = validate53;\nconst keyword0 = external0[\"CompiledDidVerifiableCredential\"];\nconst keyword1 = external0[\"CompiledProof\"];\n\nfunction validate54(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.3sixty.global/immutable-proof/ImmutableProofDataIntegrity\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate54.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(data.notarizationId !== undefined){\nif(typeof data.notarizationId !== \"string\"){\nconst err0 = createError(instancePath+\"/notarizationId\",\"#/properties/notarizationId/type\",\"type\",{type: \"string\"},4);\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\n}\n}\nelse {\nconst err1 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},5);\nvErrors = pushError(vErrors, err1);\nerrors++;\n}\nvalidate54.errors = vErrors;\nreturn errors === 0;\n}\nvalidate54.evaluated = {\"props\":{\"notarizationId\":true},\"dynamicProps\":false,\"dynamicItems\":false};\n\n\nfunction validate53(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.3sixty.global/immutable-proof/ImmutableProofCredential\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate53.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(!(keyword0(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? keyword0.errors : vErrors.concat(keyword0.errors);\nerrors = vErrors.length;\n}\nelse {\nvar props0 = keyword0.evaluated.props;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(props0 !== true){\nprops0 = props0 || {};\nprops0.proof = true;\n}\nif(data.proof !== undefined){\nlet data0 = data.proof;\nif(!(keyword1(data0, {instancePath:instancePath+\"/proof\",parentData:data,parentDataProperty:\"proof\",rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);\nerrors = vErrors.length;\n}\nelse {\nvar props1 = keyword1.evaluated.props;\n}\nif(!(validate54(data0, {instancePath:instancePath+\"/proof\",parentData:data,parentDataProperty:\"proof\",rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);\nerrors = vErrors.length;\n}\nif(props1 !== true){\nprops1 = props1 || {};\nprops1.notarizationId = true;\n}\n}\n}\nelse {\nconst err0 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},5);\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\nvalidate53.errors = vErrors;\nevaluated0.props = props0;\nreturn errors === 0;\n}\nvalidate53.evaluated = {\"dynamicProps\":true,\"dynamicItems\":false};\n\n/**\n * Compiled validator for the ImmutableProofDataIntegrity schema.\n */\nexport const CompiledImmutableProofDataIntegrity: ICompiledValidator = validate54;\n\n/**\n * Compiled validator for the ImmutableProofVerification schema.\n */\nexport const CompiledImmutableProofVerification: ICompiledValidator = validate56;\nconst keyword2 = Object.values(external1[\"ImmutableProofFailure\"]);\n\nfunction validate57(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.3sixty.global/immutable-proof/ImmutableProofFailure\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate57.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(!keyword2.includes(data)){\nfor(let i0 = 0; i0 < keyword2.length; i0++){\nvErrors = pushError(vErrors, createError(instancePath, \"#/anyOf\" + \"/\" + i0 + \"/const\", \"const\", { allowedValue: keyword2[i0] }, \"must be equal to constant\"));\nerrors++;\n}\nvErrors = pushError(vErrors, createError(instancePath, \"#/anyOf\", \"anyOf\", {}, \"must match a schema in anyOf\"));\nerrors++;\n}\nvalidate57.errors = vErrors;\nreturn errors === 0;\n}\nvalidate57.evaluated = {\"dynamicProps\":false,\"dynamicItems\":false};\n\n\nfunction validate56(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.3sixty.global/immutable-proof/ImmutableProofVerification\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate56.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(data[\"@context\"] === undefined){\nconst err0 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"@context\"},\"must have required property '\"+\"@context\"+\"'\");\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\nif(data.type === undefined){\nconst err1 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"type\"},\"must have required property '\"+\"type\"+\"'\");\nvErrors = pushError(vErrors, err1);\nerrors++;\n}\nif(data.verified === undefined){\nconst err2 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"verified\"},\"must have required property '\"+\"verified\"+\"'\");\nvErrors = pushError(vErrors, err2);\nerrors++;\n}\nif(data[\"@context\"] !== undefined){\nif(\"https://schema.3sixty.global/immutable-proof/\" !== data[\"@context\"]){\nconst err3 = createError(instancePath+\"/@context\",\"#/properties/%40context/const\",\"const\",{allowedValue: \"https://schema.3sixty.global/immutable-proof/\"},2);\nvErrors = pushError(vErrors, err3);\nerrors++;\n}\n}\nif(data.type !== undefined){\nif(\"ImmutableProofVerification\" !== data.type){\nconst err4 = createError(instancePath+\"/type\",\"#/properties/type/const\",\"const\",{allowedValue: \"ImmutableProofVerification\"},2);\nvErrors = pushError(vErrors, err4);\nerrors++;\n}\n}\nif(data.verified !== undefined){\nif(typeof data.verified !== \"boolean\"){\nconst err5 = createError(instancePath+\"/verified\",\"#/properties/verified/type\",\"type\",{type: \"boolean\"},6);\nvErrors = pushError(vErrors, err5);\nerrors++;\n}\n}\nif(data.failure !== undefined){\nif(!(validate57(data.failure, {instancePath:instancePath+\"/failure\",parentData:data,parentDataProperty:\"failure\",rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? validate57.errors : vErrors.concat(validate57.errors);\nerrors = vErrors.length;\n}\n}\n}\nelse {\nconst err6 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},5);\nvErrors = pushError(vErrors, err6);\nerrors++;\n}\nvalidate56.errors = vErrors;\nreturn errors === 0;\n}\nvalidate56.evaluated = {\"props\":{\"@context\":true,\"type\":true,\"verified\":true,\"failure\":true},\"dynamicProps\":false,\"dynamicItems\":false};\n\n/**\n * Compiled validator for the ImmutableProofFailure schema.\n */\nexport const CompiledImmutableProofFailure: ICompiledValidator = validate57;\n\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHelper } from "@3sixty/data-core";
|
|
4
|
+
import { JsonLdDataTypes } from "@3sixty/data-json-ld";
|
|
5
|
+
import { DidDataTypes } from "@3sixty/standards-w3c-did";
|
|
6
|
+
import * as CompiledValidators from "../compiled/validators.js";
|
|
7
|
+
import { ImmutableProofContexts } from "../models/immutableProofContexts.js";
|
|
8
|
+
import { ImmutableProofTypes } from "../models/immutableProofTypes.js";
|
|
9
|
+
import ImmutableProofSchema from "../schemas/ImmutableProof.json" with { type: "json" };
|
|
10
|
+
import ImmutableProofCredentialSchema from "../schemas/ImmutableProofCredential.json" with { type: "json" };
|
|
11
|
+
import ImmutableProofDataIntegritySchema from "../schemas/ImmutableProofDataIntegrity.json" with { type: "json" };
|
|
12
|
+
import ImmutableProofFailureSchema from "../schemas/ImmutableProofFailure.json" with { type: "json" };
|
|
13
|
+
import ImmutableProofVerificationSchema from "../schemas/ImmutableProofVerification.json" with { type: "json" };
|
|
14
|
+
/**
|
|
15
|
+
* Handle all the data types for immutable proof.
|
|
16
|
+
*/
|
|
17
|
+
export class ImmutableProofDataTypes {
|
|
18
|
+
/**
|
|
19
|
+
* Register all the data types.
|
|
20
|
+
*/
|
|
21
|
+
static registerTypes() {
|
|
22
|
+
// Register the types referenced by the schemas, which are only registered once.
|
|
23
|
+
JsonLdDataTypes.registerTypes();
|
|
24
|
+
DidDataTypes.registerTypes();
|
|
25
|
+
const types = [
|
|
26
|
+
{
|
|
27
|
+
type: ImmutableProofTypes.ImmutableProof,
|
|
28
|
+
schema: ImmutableProofSchema,
|
|
29
|
+
compiledValidator: CompiledValidators.CompiledImmutableProof
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: ImmutableProofTypes.ImmutableProofVerification,
|
|
33
|
+
schema: ImmutableProofVerificationSchema,
|
|
34
|
+
compiledValidator: CompiledValidators.CompiledImmutableProofVerification
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: ImmutableProofTypes.ImmutableProofFailure,
|
|
38
|
+
schema: ImmutableProofFailureSchema,
|
|
39
|
+
compiledValidator: CompiledValidators.CompiledImmutableProofFailure
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: "ImmutableProofCredential",
|
|
43
|
+
schema: ImmutableProofCredentialSchema,
|
|
44
|
+
compiledValidator: CompiledValidators.CompiledImmutableProofCredential
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: "ImmutableProofDataIntegrity",
|
|
48
|
+
schema: ImmutableProofDataIntegritySchema,
|
|
49
|
+
compiledValidator: CompiledValidators.CompiledImmutableProofDataIntegrity
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
DataTypeHelper.registerTypes(ImmutableProofContexts.Namespace, ImmutableProofContexts.JsonLdContext, types);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=immutableProofDataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"immutableProofDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/immutableProofDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,8BAA8B,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5G,OAAO,iCAAiC,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClH,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhH;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,gFAAgF;QAChF,eAAe,CAAC,aAAa,EAAE,CAAC;QAChC,YAAY,CAAC,aAAa,EAAE,CAAC;QAE7B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,mBAAmB,CAAC,cAAc;gBACxC,MAAM,EAAE,oBAAoB;gBAC5B,iBAAiB,EAAE,kBAAkB,CAAC,sBAAsB;aAC5D;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,0BAA0B;gBACpD,MAAM,EAAE,gCAAgC;gBACxC,iBAAiB,EAAE,kBAAkB,CAAC,kCAAkC;aACxE;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,qBAAqB;gBAC/C,MAAM,EAAE,2BAA2B;gBACnC,iBAAiB,EAAE,kBAAkB,CAAC,6BAA6B;aACnE;YACD;gBACC,IAAI,EAAE,0BAA0B;gBAChC,MAAM,EAAE,8BAA8B;gBACtC,iBAAiB,EAAE,kBAAkB,CAAC,gCAAgC;aACtE;YACD;gBACC,IAAI,EAAE,6BAA6B;gBACnC,MAAM,EAAE,iCAAiC;gBACzC,iBAAiB,EAAE,kBAAkB,CAAC,mCAAmC;aACzE;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,sBAAsB,CAAC,SAAS,EAChC,sBAAsB,CAAC,aAAa,EACpC,KAAK,CACL,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@3sixty/data-core\";\nimport { JsonLdDataTypes } from \"@3sixty/data-json-ld\";\nimport { DidDataTypes } from \"@3sixty/standards-w3c-did\";\nimport * as CompiledValidators from \"../compiled/validators.js\";\nimport { ImmutableProofContexts } from \"../models/immutableProofContexts.js\";\nimport { ImmutableProofTypes } from \"../models/immutableProofTypes.js\";\nimport ImmutableProofSchema from \"../schemas/ImmutableProof.json\" with { type: \"json\" };\nimport ImmutableProofCredentialSchema from \"../schemas/ImmutableProofCredential.json\" with { type: \"json\" };\nimport ImmutableProofDataIntegritySchema from \"../schemas/ImmutableProofDataIntegrity.json\" with { type: \"json\" };\nimport ImmutableProofFailureSchema from \"../schemas/ImmutableProofFailure.json\" with { type: \"json\" };\nimport ImmutableProofVerificationSchema from \"../schemas/ImmutableProofVerification.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for immutable proof.\n */\nexport class ImmutableProofDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\t// Register the types referenced by the schemas, which are only registered once.\n\t\tJsonLdDataTypes.registerTypes();\n\t\tDidDataTypes.registerTypes();\n\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProof,\n\t\t\t\tschema: ImmutableProofSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledImmutableProof\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofVerification,\n\t\t\t\tschema: ImmutableProofVerificationSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledImmutableProofVerification\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofFailure,\n\t\t\t\tschema: ImmutableProofFailureSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledImmutableProofFailure\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ImmutableProofCredential\",\n\t\t\t\tschema: ImmutableProofCredentialSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledImmutableProofCredential\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ImmutableProofDataIntegrity\",\n\t\t\t\tschema: ImmutableProofDataIntegritySchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledImmutableProofDataIntegrity\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tImmutableProofContexts.Namespace,\n\t\t\tImmutableProofContexts.JsonLdContext,\n\t\t\ttypes\n\t\t);\n\t}\n}\n"]}
|