1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
"""
Exception hierarchy for KYA Validator.
This module defines all custom exceptions used throughout the KYA Validator
Python package.
"""
"""Base exception for all KYA Validator errors.
All custom exceptions in the KYA Validator package inherit from this
base class, allowing users to catch all KYA-related errors with a single
except clause.
Examples
--------
>>> try:
... validate_manifest(manifest_json)
... except KyaValidatorError as e:
... print(f"KYA validation failed: {e}")
"""
"""Initialize exception.
Parameters
----------
message : str
Human-readable error message.
details : dict, optional
Additional error details for debugging.
Attributes
----------
message : str
The error message.
details : dict
Additional error details.
"""
=
= or
"""Return string representation.
Returns
-------
str
String representation of the error.
"""
return f
return
"""Exception raised when manifest validation fails.
This exception is raised when the validation process completes but
produces errors in one or more validation categories (schema, TTL,
crypto, inspector, or policy).
Attributes
----------
schema_errors : list[str]
Schema validation errors.
ttl_errors : list[str]
Time-to-live validation errors.
crypto_errors : list[str]
Cryptographic verification errors.
inspector_errors : list[str]
Inspector validation errors.
policy_errors : list[str]
Policy evaluation errors.
"""
"""Initialize validation error.
Parameters
----------
message : str
Human-readable error message.
schema_errors : list[str], optional
Schema validation errors.
ttl_errors : list[str], optional
Time-to-live validation errors.
crypto_errors : list[str], optional
Cryptographic verification errors.
inspector_errors : list[str], optional
Inspector validation errors.
policy_errors : list[str], optional
Policy evaluation errors.
Attributes
----------
schema_errors : list[str]
Schema validation errors.
ttl_errors : list[str]
Time-to-live validation errors.
crypto_errors : list[str]
Cryptographic verification errors.
inspector_errors : list[str]
Inspector validation errors.
policy_errors : list[str]
Policy evaluation errors.
"""
=
=
=
=
=
=
"""Exception raised when input data is invalid.
This exception is raised when the provided input (manifest JSON,
configuration, etc.) cannot be parsed or is malformed.
Examples
--------
>>> try:
... validate_manifest("not valid json")
... except InvalidInputError as e:
... print(f"Invalid input: {e}")
"""
pass
"""Exception raised when configuration is invalid.
This exception is raised when the validation configuration is
malformed, contains invalid values, or cannot be loaded.
"""
pass
"""Exception raised when TEE evidence verification fails.
This exception is raised when Trusted Execution Environment
attestation evidence cannot be verified.
Attributes
----------
tee_type : str, optional
Type of TEE (e.g., "intel-sgx", "amd-sev-snp").
"""
"""Initialize TEE verification error.
Parameters
----------
message : str
Human-readable error message.
tee_type : str, optional
Type of TEE that failed verification.
Attributes
----------
tee_type : str, optional
Type of TEE that failed verification.
"""
=
=
"""Exception raised during blockchain operations.
This exception is raised when blockchain queries fail,
network errors occur, or solvency checks cannot be completed.
Attributes
----------
network : str, optional
Blockchain network (e.g., "ethereum", "polygon").
provider : str, optional
Blockchain provider (e.g., "alchemy", "infura").
"""
"""Initialize blockchain error.
Parameters
----------
message : str
Human-readable error message.
network : str, optional
Blockchain network.
provider : str, optional
Blockchain provider.
Attributes
----------
network : str, optional
Blockchain network.
provider : str, optional
Blockchain provider.
"""
=
=
=
=
=
"""Exception raised during plugin operations.
This exception is raised when plugin registration, execution,
or lifecycle management fails.
Attributes
----------
plugin_name : str, optional
Name of the plugin that caused the error.
"""
"""Initialize plugin error.
Parameters
----------
message : str
Human-readable error message.
plugin_name : str, optional
Name of the plugin.
Attributes
----------
plugin_name : str, optional
Name of the plugin.
"""
=
=
"""Exception raised when an internal core error occurs.
This exception is raised when an unexpected error occurs in the
Rust core validation engine that cannot be classified as a more
specific error type.
"""
pass