@veraanchor/verifier 0.0.0-stage → 0.1.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.
Files changed (214) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/CONTRIBUTING.md +33 -0
  3. package/LICENSE +21 -0
  4. package/NOTICE +4 -0
  5. package/README.md +263 -2
  6. package/SECURITY.md +21 -0
  7. package/dist/cli/commandV1.d.ts +5 -0
  8. package/dist/cli/commandV1.d.ts.map +1 -0
  9. package/dist/cli/commandV1.js +440 -0
  10. package/dist/cli/commandV1.js.map +1 -0
  11. package/dist/cli.d.ts +3 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +5 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/contracts/verification.d.ts +77 -0
  16. package/dist/contracts/verification.d.ts.map +1 -0
  17. package/dist/contracts/verification.js +6 -0
  18. package/dist/contracts/verification.js.map +1 -0
  19. package/dist/crypto/sha3.d.ts +15 -0
  20. package/dist/crypto/sha3.d.ts.map +1 -0
  21. package/dist/crypto/sha3.js +27 -0
  22. package/dist/crypto/sha3.js.map +1 -0
  23. package/dist/crypto/streamSha3.d.ts +26 -0
  24. package/dist/crypto/streamSha3.d.ts.map +1 -0
  25. package/dist/crypto/streamSha3.js +52 -0
  26. package/dist/crypto/streamSha3.js.map +1 -0
  27. package/dist/hf/hashContractV1.d.ts +48 -0
  28. package/dist/hf/hashContractV1.d.ts.map +1 -0
  29. package/dist/hf/hashContractV1.js +185 -0
  30. package/dist/hf/hashContractV1.js.map +1 -0
  31. package/dist/index.d.ts +80 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +57 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/merkle/membership.d.ts +30 -0
  36. package/dist/merkle/membership.d.ts.map +1 -0
  37. package/dist/merkle/membership.js +105 -0
  38. package/dist/merkle/membership.js.map +1 -0
  39. package/dist/policy/contractV1.d.ts +37 -0
  40. package/dist/policy/contractV1.d.ts.map +1 -0
  41. package/dist/policy/contractV1.js +2 -0
  42. package/dist/policy/contractV1.js.map +1 -0
  43. package/dist/policy/evaluateV1.d.ts +24 -0
  44. package/dist/policy/evaluateV1.d.ts.map +1 -0
  45. package/dist/policy/evaluateV1.js +320 -0
  46. package/dist/policy/evaluateV1.js.map +1 -0
  47. package/dist/profiles/dataset/sourceV1.d.ts +22 -0
  48. package/dist/profiles/dataset/sourceV1.d.ts.map +1 -0
  49. package/dist/profiles/dataset/sourceV1.js +73 -0
  50. package/dist/profiles/dataset/sourceV1.js.map +1 -0
  51. package/dist/profiles/dataset/v1.d.ts +39 -0
  52. package/dist/profiles/dataset/v1.d.ts.map +1 -0
  53. package/dist/profiles/dataset/v1.js +362 -0
  54. package/dist/profiles/dataset/v1.js.map +1 -0
  55. package/dist/profiles/execution/contractV1.d.ts +279 -0
  56. package/dist/profiles/execution/contractV1.d.ts.map +1 -0
  57. package/dist/profiles/execution/contractV1.js +364 -0
  58. package/dist/profiles/execution/contractV1.js.map +1 -0
  59. package/dist/profiles/execution/independentStandardsV1.d.ts +44 -0
  60. package/dist/profiles/execution/independentStandardsV1.d.ts.map +1 -0
  61. package/dist/profiles/execution/independentStandardsV1.js +336 -0
  62. package/dist/profiles/execution/independentStandardsV1.js.map +1 -0
  63. package/dist/profiles/execution/reasonCodesV1.d.ts +30 -0
  64. package/dist/profiles/execution/reasonCodesV1.d.ts.map +1 -0
  65. package/dist/profiles/execution/reasonCodesV1.js +20 -0
  66. package/dist/profiles/execution/reasonCodesV1.js.map +1 -0
  67. package/dist/profiles/execution/recomputationV1.d.ts +11 -0
  68. package/dist/profiles/execution/recomputationV1.d.ts.map +1 -0
  69. package/dist/profiles/execution/recomputationV1.js +144 -0
  70. package/dist/profiles/execution/recomputationV1.js.map +1 -0
  71. package/dist/profiles/execution/rulesV1.d.ts +6 -0
  72. package/dist/profiles/execution/rulesV1.d.ts.map +1 -0
  73. package/dist/profiles/execution/rulesV1.js +855 -0
  74. package/dist/profiles/execution/rulesV1.js.map +1 -0
  75. package/dist/profiles/execution/standardsPlanV1.d.ts +18 -0
  76. package/dist/profiles/execution/standardsPlanV1.d.ts.map +1 -0
  77. package/dist/profiles/execution/standardsPlanV1.js +16 -0
  78. package/dist/profiles/execution/standardsPlanV1.js.map +1 -0
  79. package/dist/profiles/execution/verificationV1.d.ts +28 -0
  80. package/dist/profiles/execution/verificationV1.d.ts.map +1 -0
  81. package/dist/profiles/execution/verificationV1.js +188 -0
  82. package/dist/profiles/execution/verificationV1.js.map +1 -0
  83. package/dist/profiles/ingest/sourceV1.d.ts +36 -0
  84. package/dist/profiles/ingest/sourceV1.d.ts.map +1 -0
  85. package/dist/profiles/ingest/sourceV1.js +99 -0
  86. package/dist/profiles/ingest/sourceV1.js.map +1 -0
  87. package/dist/profiles/ingest/v1.d.ts +65 -0
  88. package/dist/profiles/ingest/v1.d.ts.map +1 -0
  89. package/dist/profiles/ingest/v1.js +477 -0
  90. package/dist/profiles/ingest/v1.js.map +1 -0
  91. package/dist/profiles/sourceV1Helpers.d.ts +48 -0
  92. package/dist/profiles/sourceV1Helpers.d.ts.map +1 -0
  93. package/dist/profiles/sourceV1Helpers.js +141 -0
  94. package/dist/profiles/sourceV1Helpers.js.map +1 -0
  95. package/dist/reports/coreV1.d.ts +7 -0
  96. package/dist/reports/coreV1.d.ts.map +1 -0
  97. package/dist/reports/coreV1.js +195 -0
  98. package/dist/reports/coreV1.js.map +1 -0
  99. package/dist/reports/portableV1.d.ts +48 -0
  100. package/dist/reports/portableV1.d.ts.map +1 -0
  101. package/dist/reports/portableV1.js +279 -0
  102. package/dist/reports/portableV1.js.map +1 -0
  103. package/dist/reports/validationV1.d.ts +19 -0
  104. package/dist/reports/validationV1.d.ts.map +1 -0
  105. package/dist/reports/validationV1.js +441 -0
  106. package/dist/reports/validationV1.js.map +1 -0
  107. package/dist/resolvers/executionMirrorV1.d.ts +15 -0
  108. package/dist/resolvers/executionMirrorV1.d.ts.map +1 -0
  109. package/dist/resolvers/executionMirrorV1.js +206 -0
  110. package/dist/resolvers/executionMirrorV1.js.map +1 -0
  111. package/dist/resolvers/explorerExecutionV1.d.ts +17 -0
  112. package/dist/resolvers/explorerExecutionV1.d.ts.map +1 -0
  113. package/dist/resolvers/explorerExecutionV1.js +61 -0
  114. package/dist/resolvers/explorerExecutionV1.js.map +1 -0
  115. package/dist/resolvers/explorerPublicV1.d.ts +37 -0
  116. package/dist/resolvers/explorerPublicV1.d.ts.map +1 -0
  117. package/dist/resolvers/explorerPublicV1.js +210 -0
  118. package/dist/resolvers/explorerPublicV1.js.map +1 -0
  119. package/dist/resolvers/explorerPublicationV1.d.ts +20 -0
  120. package/dist/resolvers/explorerPublicationV1.d.ts.map +1 -0
  121. package/dist/resolvers/explorerPublicationV1.js +195 -0
  122. package/dist/resolvers/explorerPublicationV1.js.map +1 -0
  123. package/dist/resolvers/explorerTransportV1.d.ts +17 -0
  124. package/dist/resolvers/explorerTransportV1.d.ts.map +1 -0
  125. package/dist/resolvers/explorerTransportV1.js +112 -0
  126. package/dist/resolvers/explorerTransportV1.js.map +1 -0
  127. package/dist/resolvers/hcs11MirrorV1.d.ts +49 -0
  128. package/dist/resolvers/hcs11MirrorV1.d.ts.map +1 -0
  129. package/dist/resolvers/hcs11MirrorV1.js +293 -0
  130. package/dist/resolvers/hcs11MirrorV1.js.map +1 -0
  131. package/dist/resolvers/hcs13MirrorV1.d.ts +35 -0
  132. package/dist/resolvers/hcs13MirrorV1.d.ts.map +1 -0
  133. package/dist/resolvers/hcs13MirrorV1.js +72 -0
  134. package/dist/resolvers/hcs13MirrorV1.js.map +1 -0
  135. package/dist/resolvers/hcs1MirrorV1.d.ts +28 -0
  136. package/dist/resolvers/hcs1MirrorV1.d.ts.map +1 -0
  137. package/dist/resolvers/hcs1MirrorV1.js +220 -0
  138. package/dist/resolvers/hcs1MirrorV1.js.map +1 -0
  139. package/dist/resolvers/hcs26MirrorV1.d.ts +67 -0
  140. package/dist/resolvers/hcs26MirrorV1.d.ts.map +1 -0
  141. package/dist/resolvers/hcs26MirrorV1.js +218 -0
  142. package/dist/resolvers/hcs26MirrorV1.js.map +1 -0
  143. package/dist/resolvers/hcs26RegistryMirrorV1.d.ts +26 -0
  144. package/dist/resolvers/hcs26RegistryMirrorV1.d.ts.map +1 -0
  145. package/dist/resolvers/hcs26RegistryMirrorV1.js +200 -0
  146. package/dist/resolvers/hcs26RegistryMirrorV1.js.map +1 -0
  147. package/dist/resolvers/hcs2MirrorV1.d.ts +26 -0
  148. package/dist/resolvers/hcs2MirrorV1.d.ts.map +1 -0
  149. package/dist/resolvers/hcs2MirrorV1.js +196 -0
  150. package/dist/resolvers/hcs2MirrorV1.js.map +1 -0
  151. package/dist/resolvers/hederaMirrorV1.d.ts +22 -0
  152. package/dist/resolvers/hederaMirrorV1.d.ts.map +1 -0
  153. package/dist/resolvers/hederaMirrorV1.js +338 -0
  154. package/dist/resolvers/hederaMirrorV1.js.map +1 -0
  155. package/dist/standards/hcs/hcs11V1.d.ts +51 -0
  156. package/dist/standards/hcs/hcs11V1.d.ts.map +1 -0
  157. package/dist/standards/hcs/hcs11V1.js +289 -0
  158. package/dist/standards/hcs/hcs11V1.js.map +1 -0
  159. package/dist/standards/hcs/hcs13V1.d.ts +39 -0
  160. package/dist/standards/hcs/hcs13V1.d.ts.map +1 -0
  161. package/dist/standards/hcs/hcs13V1.js +114 -0
  162. package/dist/standards/hcs/hcs13V1.js.map +1 -0
  163. package/dist/standards/hcs/hcs14V1.d.ts +35 -0
  164. package/dist/standards/hcs/hcs14V1.d.ts.map +1 -0
  165. package/dist/standards/hcs/hcs14V1.js +168 -0
  166. package/dist/standards/hcs/hcs14V1.js.map +1 -0
  167. package/dist/standards/hcs/hcs1V1.d.ts +30 -0
  168. package/dist/standards/hcs/hcs1V1.d.ts.map +1 -0
  169. package/dist/standards/hcs/hcs1V1.js +140 -0
  170. package/dist/standards/hcs/hcs1V1.js.map +1 -0
  171. package/dist/standards/hcs/hcs26V1.d.ts +58 -0
  172. package/dist/standards/hcs/hcs26V1.d.ts.map +1 -0
  173. package/dist/standards/hcs/hcs26V1.js +339 -0
  174. package/dist/standards/hcs/hcs26V1.js.map +1 -0
  175. package/dist/standards/hcs/hcs2V1.d.ts +36 -0
  176. package/dist/standards/hcs/hcs2V1.d.ts.map +1 -0
  177. package/dist/standards/hcs/hcs2V1.js +181 -0
  178. package/dist/standards/hcs/hcs2V1.js.map +1 -0
  179. package/dist/standards/hcs/jsonCanonicalV1.d.ts +15 -0
  180. package/dist/standards/hcs/jsonCanonicalV1.d.ts.map +1 -0
  181. package/dist/standards/hcs/jsonCanonicalV1.js +160 -0
  182. package/dist/standards/hcs/jsonCanonicalV1.js.map +1 -0
  183. package/dist/triangulation/compareV1.d.ts +50 -0
  184. package/dist/triangulation/compareV1.d.ts.map +1 -0
  185. package/dist/triangulation/compareV1.js +236 -0
  186. package/dist/triangulation/compareV1.js.map +1 -0
  187. package/dist/triangulation/executionPlanV1.d.ts +39 -0
  188. package/dist/triangulation/executionPlanV1.d.ts.map +1 -0
  189. package/dist/triangulation/executionPlanV1.js +208 -0
  190. package/dist/triangulation/executionPlanV1.js.map +1 -0
  191. package/dist/triangulation/executionPublicV1.d.ts +22 -0
  192. package/dist/triangulation/executionPublicV1.d.ts.map +1 -0
  193. package/dist/triangulation/executionPublicV1.js +39 -0
  194. package/dist/triangulation/executionPublicV1.js.map +1 -0
  195. package/dist/triangulation/messageObservationV1.d.ts +26 -0
  196. package/dist/triangulation/messageObservationV1.d.ts.map +1 -0
  197. package/dist/triangulation/messageObservationV1.js +69 -0
  198. package/dist/triangulation/messageObservationV1.js.map +1 -0
  199. package/dist/triangulation/publicV1.d.ts +29 -0
  200. package/dist/triangulation/publicV1.d.ts.map +1 -0
  201. package/dist/triangulation/publicV1.js +170 -0
  202. package/dist/triangulation/publicV1.js.map +1 -0
  203. package/dist/verification/sourceIntentV1.d.ts +15 -0
  204. package/dist/verification/sourceIntentV1.d.ts.map +1 -0
  205. package/dist/verification/sourceIntentV1.js +206 -0
  206. package/dist/verification/sourceIntentV1.js.map +1 -0
  207. package/docs/cli-v0.1.md +237 -0
  208. package/docs/conformance.md +38 -0
  209. package/docs/threat-model.md +37 -0
  210. package/docs/verification-semantics.md +65 -0
  211. package/examples/README.md +35 -0
  212. package/examples/dataset-offline.mjs +58 -0
  213. package/examples/dataset-policy.mjs +59 -0
  214. package/package.json +65 -4
@@ -0,0 +1,279 @@
1
+ type HederaNetwork = "testnet" | "mainnet";
2
+ import { type ExecutionVerificationReasonCode } from "./reasonCodesV1.js";
3
+ export declare const EXECUTION_VERIFICATION_SCHEMA_VERSION = "vera.execution-verification.v1";
4
+ export declare const EXECUTION_VERIFIER_VERSION = "1.0.0";
5
+ export declare const SUPPORTED_PUBLIC_STANDARDS_CONTRACT_VERSIONS: readonly string[];
6
+ export declare const EXECUTION_VERIFICATION_STATUSES: readonly ["consistent", "incomplete", "failed"];
7
+ export declare const EXECUTION_VERIFICATION_CHECK_STATUSES: readonly ["pass", "fail", "unavailable", "not_applicable"];
8
+ export declare const EXECUTION_VERIFICATION_REQUIREMENTS: readonly ["required", "optional", "conditional"];
9
+ export type ExecutionVerificationStatus = (typeof EXECUTION_VERIFICATION_STATUSES)[number];
10
+ export type ExecutionVerificationCheckStatus = (typeof EXECUTION_VERIFICATION_CHECK_STATUSES)[number];
11
+ export type ExecutionVerificationRequirement = (typeof EXECUTION_VERIFICATION_REQUIREMENTS)[number];
12
+ export type PublicStandardsSourceDocument = {
13
+ standard?: string | null;
14
+ version?: string | null;
15
+ path?: string | null;
16
+ sha256?: string | null;
17
+ };
18
+ export type PublicStandardsBaselineEvidence = {
19
+ baseline_id?: string | null;
20
+ title?: string | null;
21
+ source_repository?: string | null;
22
+ source_commit?: string | null;
23
+ frozen_at?: string | Date | null;
24
+ source_documents?: PublicStandardsSourceDocument[] | null;
25
+ };
26
+ export type PublicHcs11Evidence = {
27
+ profile_version?: string | null;
28
+ account_id?: string | null;
29
+ profile_registry_topic_id?: string | null;
30
+ profile_registry_sequence?: number | null;
31
+ profile_hcs1_ref?: string | null;
32
+ profile_checksum_sha256?: string | null;
33
+ };
34
+ export type PublicAgentEvidence = {
35
+ logical_id?: string | null;
36
+ display_name?: string | null;
37
+ base_did?: string | null;
38
+ hcs14_uaid?: string | null;
39
+ hcs11?: PublicHcs11Evidence | null;
40
+ };
41
+ export type PublicCapabilityEvidence = {
42
+ standard?: string | null;
43
+ capability_version_id?: string | null;
44
+ display_name?: string | null;
45
+ discovery_registry_topic_id?: string | null;
46
+ skill_uid?: string | null;
47
+ skill_version?: string | null;
48
+ version_registry_topic_id?: string | null;
49
+ version_sequence_number?: number | null;
50
+ manifest_hcs1_ref?: string | null;
51
+ manifest_checksum_sha256?: string | null;
52
+ repository_uri?: string | null;
53
+ repository_commit?: string | null;
54
+ published_at?: string | Date | null;
55
+ };
56
+ export type PublicSchemaEvidence = {
57
+ role?: string | null;
58
+ ordinal?: number | null;
59
+ schema_uid?: string | null;
60
+ display_name?: string | null;
61
+ semantic_version?: string | null;
62
+ registry_topic_id?: string | null;
63
+ registry_sequence_number?: number | null;
64
+ hcs13_ref?: string | null;
65
+ schema_checksum_sha256?: string | null;
66
+ instance_digest_sha3_512?: string | null;
67
+ };
68
+ export type PublicExecutionDatasetEvidence = {
69
+ dataset_key?: string | null;
70
+ dataset_version?: number | null;
71
+ dataset_fingerprint_sha3_512?: string | null;
72
+ dataset_manifest_sha3_512?: string | null;
73
+ };
74
+ export type PublicExecutionEvidence = {
75
+ job_id?: string | null;
76
+ result_id?: string | null;
77
+ proof_date?: string | null;
78
+ program?: string | null;
79
+ status?: string | null;
80
+ hedera_network?: HederaNetwork | string | null;
81
+ pipeline_hash?: string | null;
82
+ dataset?: PublicExecutionDatasetEvidence | null;
83
+ };
84
+ export type PublicParameterInstanceVerificationMaterial = {
85
+ role?: string | null;
86
+ hcs13_ref?: string | null;
87
+ domain_separator?: string | null;
88
+ payload?: unknown;
89
+ };
90
+ export type PublicExecutionStartVerificationMaterial = {
91
+ started_at?: string | Date | null;
92
+ hcs_transaction_id?: string | null;
93
+ hcs_topic_id?: string | null;
94
+ consensus_timestamp_exact?: string | null;
95
+ };
96
+ export type PublicStandardsResolutionState = "verified" | "failed" | "unavailable";
97
+ export type PublicStandardsResolutionItem = Readonly<{
98
+ key?: string | null;
99
+ standard?: string | null;
100
+ reference?: string | null;
101
+ state?: PublicStandardsResolutionState | null;
102
+ reason?: string | null;
103
+ }>;
104
+ export type PublicStandardsResolutionMaterial = Readonly<{
105
+ schema_version?: string | null;
106
+ hedera_network?: HederaNetwork | string | null;
107
+ state?: PublicStandardsResolutionState | null;
108
+ items?: readonly PublicStandardsResolutionItem[] | null;
109
+ }>;
110
+ export type PublicExecutionVerificationMaterial = {
111
+ parameter_instance?: PublicParameterInstanceVerificationMaterial | null;
112
+ execution_start?: PublicExecutionStartVerificationMaterial | null;
113
+ standards_resolution?: PublicStandardsResolutionMaterial | null;
114
+ };
115
+ export type PublicSoftwareReleaseEvidence = {
116
+ repository_uri?: string | null;
117
+ git_commit?: string | null;
118
+ pipeline_hash_sha3_512?: string | null;
119
+ };
120
+ export type PublicContractMetadataRecord = {
121
+ schema?: string | null;
122
+ digest?: string | null;
123
+ digest_payload?: Record<string, unknown> | null;
124
+ canonicalization?: string | null;
125
+ digest_algorithm?: string | null;
126
+ domain_separator?: string | null;
127
+ };
128
+ export type PublicBindingEvidence = PublicContractMetadataRecord & {
129
+ id?: string | null;
130
+ finalized_at?: string | Date | null;
131
+ };
132
+ export type PublicAcceptanceHcsEvidence = {
133
+ topic_id?: string | null;
134
+ transaction_id?: string | null;
135
+ message_id?: string | null;
136
+ sequence_number?: number | null;
137
+ consensus_timestamp?: string | Date | null;
138
+ consensus_timestamp_exact?: string | null;
139
+ data_hash_sha3_512?: string | null;
140
+ };
141
+ export type PublicAcceptanceEvidence = PublicContractMetadataRecord & {
142
+ id?: string | null;
143
+ state?: string | null;
144
+ admission_policy_id?: string | null;
145
+ requires_hcs_confirmation?: boolean | null;
146
+ binding_digest?: string | null;
147
+ accepted_at?: string | Date | null;
148
+ confirmed_at?: string | Date | null;
149
+ failure_code?: string | null;
150
+ hcs?: PublicAcceptanceHcsEvidence | null;
151
+ };
152
+ export type PublicResultEvidenceHcsEvidence = {
153
+ transaction_id?: string | null;
154
+ topic_id?: string | null;
155
+ };
156
+ export type PublicResultEvidence = PublicContractMetadataRecord & {
157
+ id?: string | null;
158
+ result_id?: string | null;
159
+ binding_digest?: string | null;
160
+ acceptance_digest?: string | null;
161
+ pipeline_hash?: string | null;
162
+ result_hash?: string | null;
163
+ service_hash?: string | null;
164
+ global_hash?: string | null;
165
+ artifact_count?: number | null;
166
+ sealed_at?: string | Date | null;
167
+ hcs?: PublicResultEvidenceHcsEvidence | null;
168
+ };
169
+ export type PublicExecutionStandardsEvidence = {
170
+ available?: boolean;
171
+ contract_version?: string | null;
172
+ reason?: string | null;
173
+ execution?: PublicExecutionEvidence | null;
174
+ standards?: {
175
+ baseline?: PublicStandardsBaselineEvidence | null;
176
+ schemas?: PublicSchemaEvidence[] | null;
177
+ reference_complete?: boolean | null;
178
+ publicly_resolvable?: boolean | null;
179
+ } | null;
180
+ agents?: {
181
+ requester?: PublicAgentEvidence | null;
182
+ executor?: PublicAgentEvidence | null;
183
+ } | null;
184
+ capability?: PublicCapabilityEvidence | null;
185
+ software_release?: PublicSoftwareReleaseEvidence | null;
186
+ binding?: PublicBindingEvidence | null;
187
+ acceptance?: PublicAcceptanceEvidence | null;
188
+ result_evidence?: PublicResultEvidence | null;
189
+ };
190
+ export type ExecutionVerificationSubject = Readonly<{
191
+ hedera_network: HederaNetwork | null;
192
+ program: string | null;
193
+ job_id: string | null;
194
+ result_id: string | null;
195
+ }>;
196
+ export type ExecutionVerificationCheck = Readonly<{
197
+ id: string;
198
+ group: string;
199
+ label: string;
200
+ requirement: ExecutionVerificationRequirement;
201
+ status: ExecutionVerificationCheckStatus;
202
+ reason_code: ExecutionVerificationReasonCode;
203
+ evidence_refs: readonly string[];
204
+ }>;
205
+ export type ExecutionVerificationSummary = Readonly<{
206
+ total: number;
207
+ outcome_relevant: number;
208
+ passed: number;
209
+ failed: number;
210
+ unavailable: number;
211
+ not_applicable: number;
212
+ }>;
213
+ export type ExecutionVerificationReport = Readonly<{
214
+ schema_version: typeof EXECUTION_VERIFICATION_SCHEMA_VERSION;
215
+ verifier_version: typeof EXECUTION_VERIFIER_VERSION;
216
+ subject: ExecutionVerificationSubject;
217
+ status: ExecutionVerificationStatus;
218
+ summary: ExecutionVerificationSummary;
219
+ checks: readonly ExecutionVerificationCheck[];
220
+ }>;
221
+ export type ExecutionVerificationRuleResult = Readonly<{
222
+ status: ExecutionVerificationCheckStatus;
223
+ reasonCode: ExecutionVerificationReasonCode;
224
+ }>;
225
+ export type ExecutionVerificationContext = Readonly<{
226
+ evidence: PublicExecutionStandardsEvidence;
227
+ verificationMaterial: PublicExecutionVerificationMaterial | null;
228
+ expectedNetwork: HederaNetwork | "";
229
+ requestedResultId: string;
230
+ supportedContractVersions: readonly string[];
231
+ }>;
232
+ export type ExecutionVerificationRule = Readonly<{
233
+ id: string;
234
+ group: string;
235
+ label: string;
236
+ requirement: ExecutionVerificationRequirement;
237
+ evidenceRefs: readonly string[];
238
+ evaluate: (context: ExecutionVerificationContext) => ExecutionVerificationRuleResult;
239
+ }>;
240
+ export declare function cleanString(value: unknown): string;
241
+ export declare function normalizeIdentifier(value: unknown): string;
242
+ export declare function sameIdentifier(left: unknown, right: unknown): boolean;
243
+ export declare function isUuid(value: unknown): value is string;
244
+ export declare function isSha3_512(value: unknown): value is string;
245
+ export declare function isSha256(value: unknown): value is string;
246
+ export declare function isGitCommit(value: unknown): value is string;
247
+ export declare function isHederaId(value: unknown): value is string;
248
+ export declare function isHcsTransactionId(value: unknown): value is string;
249
+ export declare function isHcs1Ref(value: unknown): value is string;
250
+ export declare function isHcs13Ref(value: unknown): value is string;
251
+ export declare function isSupportedHederaNetwork(value: unknown): value is HederaNetwork;
252
+ export declare function isValidDate(value: unknown): value is string;
253
+ export declare function hasTimestamp(value: unknown): boolean;
254
+ export declare function isPositiveSafeInteger(value: unknown): value is number;
255
+ export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
256
+ export type ExecutionVerificationInputBoundsResult = Readonly<{
257
+ ok: boolean;
258
+ reasonCode: ExecutionVerificationReasonCode;
259
+ }>;
260
+ export declare function validateExecutionVerificationInputBounds(value: unknown): ExecutionVerificationInputBoundsResult;
261
+ export declare function makeVerificationCheck({ id, group, label, requirement, status, reasonCode, evidenceRefs, }: {
262
+ id: string;
263
+ group: string;
264
+ label: string;
265
+ requirement: ExecutionVerificationRequirement;
266
+ status: ExecutionVerificationCheckStatus;
267
+ reasonCode: ExecutionVerificationReasonCode;
268
+ evidenceRefs?: readonly string[];
269
+ }): ExecutionVerificationCheck;
270
+ export declare function pass(reasonCode?: ExecutionVerificationReasonCode): ExecutionVerificationRuleResult;
271
+ export declare function fail(reasonCode: ExecutionVerificationReasonCode): ExecutionVerificationRuleResult;
272
+ export declare function unavailable(reasonCode?: ExecutionVerificationReasonCode): ExecutionVerificationRuleResult;
273
+ export declare function notApplicable(reasonCode?: ExecutionVerificationReasonCode): ExecutionVerificationRuleResult;
274
+ export declare function outcomeStatus(checks: readonly ExecutionVerificationCheck[]): ExecutionVerificationStatus;
275
+ export declare function verificationSummary(checks: readonly ExecutionVerificationCheck[]): ExecutionVerificationSummary;
276
+ export declare function freezeVerificationReport(report: ExecutionVerificationReport): ExecutionVerificationReport;
277
+ export declare function canonicalizeExecutionVerificationReport(report: ExecutionVerificationReport): string;
278
+ export {};
279
+ //# sourceMappingURL=contractV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractV1.d.ts","sourceRoot":"","sources":["../../../src/profiles/execution/contractV1.ts"],"names":[],"mappings":"AAIA,KAAK,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAC3C,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAE5B,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AAE,GAC5C,4BAA4B,CA0B9B;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,2BAA2B,GAClC,2BAA2B,CAE7B;AA2DD,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,2BAA2B,GAClC,MAAM,CAER"}
@@ -0,0 +1,364 @@
1
+ // SDK-local execution evidence and verification rule contracts (v1).
2
+ // Pure structural types and bounded validators; no Explorer, Core, or network I/O.
3
+ // Derived from the October 2026 Explorer execution verification baseline.
4
+ import { EXECUTION_VERIFICATION_REASON_CODES as REASONS, } from "./reasonCodesV1.js";
5
+ export const EXECUTION_VERIFICATION_SCHEMA_VERSION = "vera.execution-verification.v1";
6
+ export const EXECUTION_VERIFIER_VERSION = "1.0.0";
7
+ export const SUPPORTED_PUBLIC_STANDARDS_CONTRACT_VERSIONS = Object.freeze(["1.0.0"]);
8
+ export const EXECUTION_VERIFICATION_STATUSES = Object.freeze([
9
+ "consistent",
10
+ "incomplete",
11
+ "failed",
12
+ ]);
13
+ export const EXECUTION_VERIFICATION_CHECK_STATUSES = Object.freeze([
14
+ "pass",
15
+ "fail",
16
+ "unavailable",
17
+ "not_applicable",
18
+ ]);
19
+ export const EXECUTION_VERIFICATION_REQUIREMENTS = Object.freeze([
20
+ "required",
21
+ "optional",
22
+ "conditional",
23
+ ]);
24
+ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
25
+ const SHA3_512_RE = /^[0-9a-f]{128}$/;
26
+ const SHA256_RE = /^[0-9a-f]{64}$/;
27
+ const GIT_COMMIT_RE = /^[0-9a-f]{40}$/;
28
+ const HEDERA_ID_RE = /^0\.0\.[0-9]+$/;
29
+ const HCS_TX_ID_RE = /^0\.0\.[0-9]+@[0-9]+\.[0-9]+$/;
30
+ const HCS1_REF_RE = /^hcs:\/\/1\/0\.0\.[0-9]+(?:\/.*)?$/;
31
+ const HCS13_REF_RE = /^hcs:\/\/13\/0\.0\.[0-9]+#[1-9][0-9]*$/;
32
+ const DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
33
+ const INPUT_LIMITS = Object.freeze({
34
+ maxDepth: 20,
35
+ maxObjectKeys: 4096,
36
+ maxArrayLength: 256,
37
+ maxStringLength: 8192,
38
+ maxVisitedValues: 20000,
39
+ });
40
+ export function cleanString(value) {
41
+ if (typeof value !== "string")
42
+ return "";
43
+ const out = value.trim();
44
+ return out.length ? out : "";
45
+ }
46
+ export function normalizeIdentifier(value) {
47
+ return cleanString(value).toLowerCase();
48
+ }
49
+ export function sameIdentifier(left, right) {
50
+ const a = normalizeIdentifier(left);
51
+ const b = normalizeIdentifier(right);
52
+ return Boolean(a && b && a === b);
53
+ }
54
+ export function isUuid(value) {
55
+ return UUID_RE.test(cleanString(value));
56
+ }
57
+ export function isSha3_512(value) {
58
+ return SHA3_512_RE.test(cleanString(value));
59
+ }
60
+ export function isSha256(value) {
61
+ return SHA256_RE.test(cleanString(value));
62
+ }
63
+ export function isGitCommit(value) {
64
+ return GIT_COMMIT_RE.test(cleanString(value));
65
+ }
66
+ export function isHederaId(value) {
67
+ return HEDERA_ID_RE.test(cleanString(value));
68
+ }
69
+ export function isHcsTransactionId(value) {
70
+ return HCS_TX_ID_RE.test(cleanString(value));
71
+ }
72
+ export function isHcs1Ref(value) {
73
+ return HCS1_REF_RE.test(cleanString(value));
74
+ }
75
+ export function isHcs13Ref(value) {
76
+ return HCS13_REF_RE.test(cleanString(value));
77
+ }
78
+ export function isSupportedHederaNetwork(value) {
79
+ const network = normalizeIdentifier(value);
80
+ return network === "testnet" || network === "mainnet";
81
+ }
82
+ export function isValidDate(value) {
83
+ const text = cleanString(value);
84
+ const match = DATE_RE.exec(text);
85
+ if (!match)
86
+ return false;
87
+ const year = Number(match[1]);
88
+ const month = Number(match[2]);
89
+ const day = Number(match[3]);
90
+ const date = new Date(Date.UTC(year, month - 1, day));
91
+ return (date.getUTCFullYear() === year &&
92
+ date.getUTCMonth() === month - 1 &&
93
+ date.getUTCDate() === day);
94
+ }
95
+ export function hasTimestamp(value) {
96
+ if (value instanceof Date)
97
+ return Number.isFinite(value.getTime());
98
+ return Boolean(cleanString(value));
99
+ }
100
+ export function isPositiveSafeInteger(value) {
101
+ return Number.isSafeInteger(value) && Number(value) > 0;
102
+ }
103
+ export function isPlainObject(value) {
104
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
105
+ return false;
106
+ }
107
+ const proto = Object.getPrototypeOf(value);
108
+ return proto === Object.prototype || proto === null;
109
+ }
110
+ export function validateExecutionVerificationInputBounds(value) {
111
+ if (!isPlainObject(value)) {
112
+ return Object.freeze({
113
+ ok: false,
114
+ reasonCode: REASONS.INPUT_STRUCTURE_INVALID,
115
+ });
116
+ }
117
+ const stack = [
118
+ { value, depth: 0 },
119
+ ];
120
+ const seen = new Set();
121
+ let visited = 0;
122
+ let objectKeys = 0;
123
+ while (stack.length) {
124
+ const current = stack.pop();
125
+ if (!current)
126
+ break;
127
+ const item = current.value;
128
+ visited += 1;
129
+ if (visited > INPUT_LIMITS.maxVisitedValues) {
130
+ return Object.freeze({
131
+ ok: false,
132
+ reasonCode: REASONS.INPUT_LIMIT_EXCEEDED,
133
+ });
134
+ }
135
+ if (item === null ||
136
+ typeof item === "boolean" ||
137
+ typeof item === "number") {
138
+ if (typeof item === "number" && !Number.isFinite(item)) {
139
+ return Object.freeze({
140
+ ok: false,
141
+ reasonCode: REASONS.INPUT_STRUCTURE_INVALID,
142
+ });
143
+ }
144
+ continue;
145
+ }
146
+ if (typeof item === "string") {
147
+ if (item.length > INPUT_LIMITS.maxStringLength) {
148
+ return Object.freeze({
149
+ ok: false,
150
+ reasonCode: REASONS.INPUT_LIMIT_EXCEEDED,
151
+ });
152
+ }
153
+ continue;
154
+ }
155
+ if (item instanceof Date) {
156
+ if (!Number.isFinite(item.getTime())) {
157
+ return Object.freeze({
158
+ ok: false,
159
+ reasonCode: REASONS.INPUT_STRUCTURE_INVALID,
160
+ });
161
+ }
162
+ continue;
163
+ }
164
+ if (typeof item !== "object") {
165
+ return Object.freeze({
166
+ ok: false,
167
+ reasonCode: REASONS.INPUT_STRUCTURE_INVALID,
168
+ });
169
+ }
170
+ if (current.depth >= INPUT_LIMITS.maxDepth) {
171
+ return Object.freeze({
172
+ ok: false,
173
+ reasonCode: REASONS.INPUT_LIMIT_EXCEEDED,
174
+ });
175
+ }
176
+ if (seen.has(item)) {
177
+ return Object.freeze({
178
+ ok: false,
179
+ reasonCode: REASONS.INPUT_STRUCTURE_INVALID,
180
+ });
181
+ }
182
+ seen.add(item);
183
+ if (Array.isArray(item)) {
184
+ if (item.length > INPUT_LIMITS.maxArrayLength) {
185
+ return Object.freeze({
186
+ ok: false,
187
+ reasonCode: REASONS.INPUT_LIMIT_EXCEEDED,
188
+ });
189
+ }
190
+ for (let i = item.length - 1; i >= 0; i -= 1) {
191
+ stack.push({ value: item[i], depth: current.depth + 1 });
192
+ }
193
+ continue;
194
+ }
195
+ if (!isPlainObject(item)) {
196
+ return Object.freeze({
197
+ ok: false,
198
+ reasonCode: REASONS.INPUT_STRUCTURE_INVALID,
199
+ });
200
+ }
201
+ const keys = Object.keys(item);
202
+ objectKeys += keys.length;
203
+ if (objectKeys > INPUT_LIMITS.maxObjectKeys) {
204
+ return Object.freeze({
205
+ ok: false,
206
+ reasonCode: REASONS.INPUT_LIMIT_EXCEEDED,
207
+ });
208
+ }
209
+ for (const key of keys) {
210
+ if (key.length > 256) {
211
+ return Object.freeze({
212
+ ok: false,
213
+ reasonCode: REASONS.INPUT_LIMIT_EXCEEDED,
214
+ });
215
+ }
216
+ stack.push({ value: item[key], depth: current.depth + 1 });
217
+ }
218
+ }
219
+ return Object.freeze({
220
+ ok: true,
221
+ reasonCode: REASONS.CHECK_PASSED,
222
+ });
223
+ }
224
+ function deepFreeze(value) {
225
+ if (!value || typeof value !== "object" || Object.isFrozen(value)) {
226
+ return value;
227
+ }
228
+ Object.freeze(value);
229
+ for (const child of Object.values(value)) {
230
+ deepFreeze(child);
231
+ }
232
+ return value;
233
+ }
234
+ export function makeVerificationCheck({ id, group, label, requirement, status, reasonCode, evidenceRefs = [], }) {
235
+ if (!cleanString(id) || !cleanString(group) || !cleanString(label)) {
236
+ throw new TypeError("Verification checks require id, group, and label.");
237
+ }
238
+ if (!EXECUTION_VERIFICATION_REQUIREMENTS.includes(requirement)) {
239
+ throw new TypeError(`Unsupported verification requirement: ${requirement}.`);
240
+ }
241
+ if (!EXECUTION_VERIFICATION_CHECK_STATUSES.includes(status)) {
242
+ throw new TypeError(`Unsupported verification check status: ${status}.`);
243
+ }
244
+ if (!cleanString(reasonCode)) {
245
+ throw new TypeError("Verification checks require a reason code.");
246
+ }
247
+ return deepFreeze({
248
+ id: cleanString(id),
249
+ group: cleanString(group),
250
+ label: cleanString(label),
251
+ requirement,
252
+ status,
253
+ reason_code: reasonCode,
254
+ evidence_refs: [...new Set(evidenceRefs.map(cleanString).filter(Boolean))].sort(),
255
+ });
256
+ }
257
+ export function pass(reasonCode = REASONS.CHECK_PASSED) {
258
+ return Object.freeze({ status: "pass", reasonCode });
259
+ }
260
+ export function fail(reasonCode) {
261
+ return Object.freeze({ status: "fail", reasonCode });
262
+ }
263
+ export function unavailable(reasonCode = REASONS.REQUIRED_EVIDENCE_MISSING) {
264
+ return Object.freeze({ status: "unavailable", reasonCode });
265
+ }
266
+ export function notApplicable(reasonCode = REASONS.NOT_APPLICABLE) {
267
+ return Object.freeze({ status: "not_applicable", reasonCode });
268
+ }
269
+ export function outcomeStatus(checks) {
270
+ const applicable = checks.filter((check) => check.requirement === "required" ||
271
+ (check.requirement === "conditional" &&
272
+ check.status !== "not_applicable"));
273
+ if (applicable.some((check) => check.status === "fail")) {
274
+ return "failed";
275
+ }
276
+ if (applicable.some((check) => check.status === "unavailable")) {
277
+ return "incomplete";
278
+ }
279
+ return "consistent";
280
+ }
281
+ export function verificationSummary(checks) {
282
+ const counts = {
283
+ pass: 0,
284
+ fail: 0,
285
+ unavailable: 0,
286
+ not_applicable: 0,
287
+ };
288
+ let outcomeRelevant = 0;
289
+ for (const check of checks) {
290
+ counts[check.status] += 1;
291
+ if (check.requirement === "required" ||
292
+ (check.requirement === "conditional" &&
293
+ check.status !== "not_applicable")) {
294
+ outcomeRelevant += 1;
295
+ }
296
+ }
297
+ return Object.freeze({
298
+ total: checks.length,
299
+ outcome_relevant: outcomeRelevant,
300
+ passed: counts.pass,
301
+ failed: counts.fail,
302
+ unavailable: counts.unavailable,
303
+ not_applicable: counts.not_applicable,
304
+ });
305
+ }
306
+ export function freezeVerificationReport(report) {
307
+ return deepFreeze(report);
308
+ }
309
+ function assertNoUnpairedSurrogates(value, path) {
310
+ for (let i = 0; i < value.length; i += 1) {
311
+ const code = value.charCodeAt(i);
312
+ if (code >= 0xd800 && code <= 0xdbff) {
313
+ const next = value.charCodeAt(i + 1);
314
+ if (!(next >= 0xdc00 && next <= 0xdfff)) {
315
+ throw new TypeError(`Unpaired UTF-16 surrogate at ${path}.`);
316
+ }
317
+ i += 1;
318
+ }
319
+ else if (code >= 0xdc00 && code <= 0xdfff) {
320
+ throw new TypeError(`Unpaired UTF-16 surrogate at ${path}.`);
321
+ }
322
+ }
323
+ }
324
+ function canonicalizeReportValue(value, path) {
325
+ if (value === null)
326
+ return "null";
327
+ if (typeof value === "string") {
328
+ assertNoUnpairedSurrogates(value, path);
329
+ return JSON.stringify(value);
330
+ }
331
+ if (typeof value === "boolean")
332
+ return value ? "true" : "false";
333
+ if (typeof value === "number") {
334
+ if (!Number.isFinite(value)) {
335
+ throw new TypeError(`Non-finite number at ${path}.`);
336
+ }
337
+ return JSON.stringify(value);
338
+ }
339
+ if (Array.isArray(value)) {
340
+ const parts = value.map((item, index) => canonicalizeReportValue(item, `${path}[${index}]`));
341
+ return `[${parts.join(",")}]`;
342
+ }
343
+ if (!isPlainObject(value)) {
344
+ throw new TypeError(`Unsupported canonical report value at ${path}.`);
345
+ }
346
+ const keys = Object.keys(value).sort();
347
+ const parts = [];
348
+ for (const key of keys) {
349
+ assertNoUnpairedSurrogates(key, `${path}.{key}`);
350
+ const child = value[key];
351
+ if (child === undefined ||
352
+ typeof child === "function" ||
353
+ typeof child === "symbol" ||
354
+ typeof child === "bigint") {
355
+ throw new TypeError(`Unsupported canonical report value at ${path}.${key}.`);
356
+ }
357
+ parts.push(`${JSON.stringify(key)}:${canonicalizeReportValue(child, `${path}.${key}`)}`);
358
+ }
359
+ return `{${parts.join(",")}}`;
360
+ }
361
+ export function canonicalizeExecutionVerificationReport(report) {
362
+ return canonicalizeReportValue(report, "$");
363
+ }
364
+ //# sourceMappingURL=contractV1.js.map