@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 @@
1
+ {"version":3,"file":"publicV1.js","sourceRoot":"","sources":["../../src/triangulation/publicV1.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,kCAAkC,EAC5C,MAAM,uCAAuC,CAAC;AAGlF,OAAO,EAAE,0BAA0B,EACI,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EACC,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EACL,MAAM,mCAAmC,CAAC;AAqBjG,MAAM,aAAa,GAAG,+BAA+B,CAAC;AACtD,MAAM,wBAAwB,GAAG,sCAAsC,CAAC;AACxE,MAAM,mBAAmB,GAAG,wCAAwC,CAAC;AAErE,SAAS,eAAe,CAAC,OAA4B;IACnD,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACjF,MAAM,IAAI,SAAS,CAAC,iFAAiF,CAAC,CAAC;IACzG,CAAC;IACD,OAAO,OAAO,CAAC,cAAc,CAAC;AAChC,CAAC;AACD,SAAS,YAAY,CAAC,GAAW,EAAE,MAAc;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,aAAsB,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;AACpF,CAAC;AACD,SAAS,SAAS,CAAC,GAAW,EAAE,KAAsB;IACpD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,WAAoB,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AO,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AACvD,CAAC;AAED,yGAAyG;AACzG,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAmC,EACnC,KAAuC;IAEvC,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtD,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ;QAAE,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;IAC/G,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,SAAS,GAAG,MAAM,kCAAkC,CAAC,MAAM,CAAC,QAAQ,EAAE;QAC1E,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QAC1C,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,OAAO;KACR,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { VerificationIntent, VerificationReport } from "../contracts/verification.js";
2
+ import { type DatasetV1SourceInput } from "../profiles/dataset/sourceV1.js";
3
+ import { type IngestV1SourceInput } from "../profiles/ingest/sourceV1.js";
4
+ /** Offline, read-only verification. Neither API authenticates a receipt's issuer or ledger publication. */
5
+ export type DatasetV1IntentInput = DatasetV1SourceInput & Readonly<{
6
+ intent: VerificationIntent;
7
+ }>;
8
+ export type IngestV1IntentInput = IngestV1SourceInput & Readonly<{
9
+ intent: VerificationIntent;
10
+ }>;
11
+ /** Source bytes and caller expectations, without claiming independent receipt authentication. */
12
+ export declare function verifyDatasetV1WithIntent(input: DatasetV1IntentInput): Promise<VerificationReport>;
13
+ /** Source material and caller expectations, with independent bundle/receipt comparison. */
14
+ export declare function verifyIngestV1WithIntent(input: IngestV1IntentInput): Promise<VerificationReport>;
15
+ //# sourceMappingURL=sourceIntentV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sourceIntentV1.d.ts","sourceRoot":"","sources":["../../src/verification/sourceIntentV1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAGlB,kBAAkB,EAEnB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AAmBxC,2GAA2G;AAC3G,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG,QAAQ,CAAC;IAAE,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAAC;AACnG,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,QAAQ,CAAC;IAAE,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAAC;AAsLjG,iGAAiG;AACjG,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAwBxG;AAED,2FAA2F;AAC3F,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0BtG"}
@@ -0,0 +1,206 @@
1
+ import { verifyDatasetV1Bundle, verifyDatasetV1Receipt, } from "../profiles/dataset/v1.js";
2
+ import { verifyDatasetV1Sources, } from "../profiles/dataset/sourceV1.js";
3
+ import { verifyIngestV1Bundle, verifyIngestV1Pair, } from "../profiles/ingest/v1.js";
4
+ import { verifyIngestV1Sources, } from "../profiles/ingest/sourceV1.js";
5
+ const HEX_512 = /^[a-f0-9]{128}$/i;
6
+ const EXPECTED_KEY = /^[a-z][a-z0-9_]{0,63}$/;
7
+ const MAX_EXPECTATIONS = 32;
8
+ function fact(key, value) {
9
+ return Object.freeze({ key, state: "available", value });
10
+ }
11
+ function observation(id, subject, source, facts) {
12
+ return Object.freeze({ id, subject: Object.freeze({ ...subject }), source, facts: Object.freeze([...facts]) });
13
+ }
14
+ function finding(check_id, outcome, reason_code, observation_ids) {
15
+ return Object.freeze({ check_id, outcome, reason_code, observation_ids: Object.freeze([...observation_ids]) });
16
+ }
17
+ function checkedIntent(intent) {
18
+ if (!intent || typeof intent !== "object" || !intent.subject || typeof intent.subject !== "object") {
19
+ throw new TypeError("Verification intent must have a subject");
20
+ }
21
+ const subject = intent.subject;
22
+ if (typeof subject.id !== "string" || subject.id.length === 0 || subject.id.length > 256 || subject.id.trim() !== subject.id) {
23
+ throw new TypeError("Verification subject must have a bounded, canonical ID");
24
+ }
25
+ if (subject.hedera_network !== undefined && subject.hedera_network !== "testnet" && subject.hedera_network !== "mainnet") {
26
+ throw new TypeError("Invalid expected Hedera network");
27
+ }
28
+ if (!Array.isArray(intent.expected) || intent.expected.length > MAX_EXPECTATIONS) {
29
+ throw new TypeError("Verification expectations must be a bounded array");
30
+ }
31
+ const used = new Set();
32
+ for (const commitment of intent.expected) {
33
+ if (!commitment || typeof commitment !== "object" || typeof commitment.key !== "string" || !EXPECTED_KEY.test(commitment.key)) {
34
+ throw new TypeError("Invalid commitment expectation key");
35
+ }
36
+ if (used.has(commitment.key))
37
+ throw new TypeError("Duplicate commitment expectation key");
38
+ used.add(commitment.key);
39
+ if (commitment.kind !== "digest" && commitment.kind !== "merkle-root") {
40
+ throw new TypeError("Unsupported commitment expectation kind");
41
+ }
42
+ if (commitment.kind === "digest" && (typeof commitment.digest !== "string" || !HEX_512.test(commitment.digest))) {
43
+ throw new TypeError("Expected digest must be a SHA3-512 hex commitment");
44
+ }
45
+ if (commitment.kind === "merkle-root" && (typeof commitment.root_hash !== "string" || !HEX_512.test(commitment.root_hash) ||
46
+ !Number.isSafeInteger(commitment.leaf_count) || commitment.leaf_count < 1)) {
47
+ throw new TypeError("Invalid expected Merkle root or leaf count");
48
+ }
49
+ }
50
+ return intent;
51
+ }
52
+ function commitmentClaim(profile, key, bundle) {
53
+ if (key === "bundle_digest") {
54
+ return { value: bundle.bundle_digest, domain: `va:${profile}:bundle:v1` };
55
+ }
56
+ if (key === "idempotency_key") {
57
+ return { value: bundle.idempotency_key, domain: `va:${profile}:idem:v1` };
58
+ }
59
+ if (profile === "dataset" && key === "dataset_fingerprint") {
60
+ return { value: bundle.dataset_fingerprint, domain: "va:dataset:fingerprint:v1" };
61
+ }
62
+ if (profile === "ingest" && key === "fingerprint") {
63
+ return { value: bundle.fingerprint, domain: "va:ingest:fingerprint:v1" };
64
+ }
65
+ return undefined;
66
+ }
67
+ function compareExpected(expected, values, observations) {
68
+ const check = `intent.commitment.${expected.key}`;
69
+ if (expected.kind === "merkle-root") {
70
+ const algorithm = values.profile === "dataset" ? "hf-dataset-v1" : "hf-ingest-v1";
71
+ if (expected.key !== "merkle_root" || expected.tree_alg !== algorithm) {
72
+ return finding(check, "unsupported", "COMMITMENT_CONTRACT_UNSUPPORTED", []);
73
+ }
74
+ if (values.sourceRoot === undefined || !values.sourceValid || !values.bundleValid) {
75
+ return finding(check, "indeterminate", "SOURCE_BINDING_NOT_ESTABLISHED", observations);
76
+ }
77
+ const matches = expected.root_hash.toLowerCase() === values.sourceRoot && expected.leaf_count === values.sourceCount;
78
+ return finding(check, matches ? "pass" : "fail", matches ? null : "EXPECTED_MERKLE_MISMATCH", observations);
79
+ }
80
+ const claim = commitmentClaim(values.profile, expected.key, values.bundle);
81
+ if (!claim || expected.contract !== "hf-contract-v1" || expected.material !== "json" || expected.domain !== claim.domain) {
82
+ return finding(check, "unsupported", "COMMITMENT_CONTRACT_UNSUPPORTED", []);
83
+ }
84
+ if (!values.sourceValid || !values.bundleValid) {
85
+ return finding(check, "indeterminate", "SOURCE_BINDING_NOT_ESTABLISHED", observations);
86
+ }
87
+ const matches = expected.digest.toLowerCase() === claim.value;
88
+ return finding(check, matches ? "pass" : "fail", matches ? null : "EXPECTED_DIGEST_MISMATCH", observations);
89
+ }
90
+ function report(intent, values) {
91
+ checkedIntent(intent);
92
+ const prefix = values.profile;
93
+ const sourceId = `${prefix}.source`;
94
+ const bundleId = `${prefix}.bundle`;
95
+ const receiptId = `${prefix}.receipt`;
96
+ const bundle = values.bundle;
97
+ const sourceFacts = [
98
+ fact("source_file_or_item_count", values.sourceCount),
99
+ fact("source_total_bytes", values.sourceBytes),
100
+ ...(values.sourceRoot === undefined ? [] : [fact("source_merkle_root", values.sourceRoot)]),
101
+ ];
102
+ const bundleFacts = [
103
+ fact("bundle_digest", bundle.bundle_digest),
104
+ fact("idempotency_key", bundle.idempotency_key),
105
+ fact("declared_file_or_item_count", "file_count" in bundle ? bundle.file_count : bundle.item_count),
106
+ fact("declared_total_bytes", bundle.total_bytes),
107
+ fact(values.profile === "dataset" ? "dataset_fingerprint" : "fingerprint", "dataset_fingerprint" in bundle ? bundle.dataset_fingerprint : bundle.fingerprint),
108
+ ];
109
+ const contentSubject = { kind: values.subject.kind, id: values.subject.id };
110
+ const observations = [
111
+ observation(sourceId, contentSubject, "local_computation", sourceFacts),
112
+ observation(bundleId, contentSubject, "local_computation", bundleFacts),
113
+ ];
114
+ if (values.receipt) {
115
+ observations.push(observation(receiptId, values.subject, "provided_evidence", [
116
+ fact("receipt_id_recomputed", values.receipt.receipt_id),
117
+ fact("receipt_declared_network", values.receipt.hedera_network),
118
+ ]));
119
+ }
120
+ const findings = [
121
+ finding(`${prefix}.source_binding`, values.sourceValid ? "pass" : "fail", values.sourceValid ? null : "SOURCE_MISMATCH", [sourceId, bundleId]),
122
+ finding(`${prefix}.bundle_consistency`, values.bundleValid ? "pass" : "fail", values.bundleValid ? null : "BUNDLE_MISMATCH", [bundleId]),
123
+ finding(`${prefix}.receipt_binding`, values.receiptBindingValid === null ? "indeterminate" : values.receiptBindingValid ? "pass" : "fail", values.receiptBindingValid === null ? "RECEIPT_NOT_SUPPLIED" : values.receiptBindingValid ? null : "RECEIPT_OR_BINDING_MISMATCH", values.receipt ? [bundleId, receiptId] : []),
124
+ ];
125
+ const subjectMatch = intent.subject.kind === values.subject.kind && intent.subject.id === values.subject.id;
126
+ findings.push(finding("intent.subject", !subjectMatch ? "fail" : values.sourceValid && values.bundleValid ? "pass" : "indeterminate", !subjectMatch ? "SUBJECT_MISMATCH" : values.sourceValid && values.bundleValid ? null : "SOURCE_BINDING_NOT_ESTABLISHED", [sourceId, bundleId]));
127
+ if (intent.subject.hedera_network !== undefined) {
128
+ const claimedNetwork = values.receipt?.hedera_network;
129
+ if (!claimedNetwork) {
130
+ findings.push(finding("intent.declared_network", "indeterminate", "NETWORK_EVIDENCE_UNAVAILABLE", values.receipt ? [receiptId] : []));
131
+ }
132
+ else if (claimedNetwork !== intent.subject.hedera_network) {
133
+ findings.push(finding("intent.declared_network", "fail", "NETWORK_MISMATCH", [receiptId]));
134
+ }
135
+ else if (!values.receiptBindingValid) {
136
+ findings.push(finding("intent.declared_network", "indeterminate", "RECEIPT_BINDING_NOT_ESTABLISHED", [receiptId]));
137
+ }
138
+ else {
139
+ findings.push(finding("intent.declared_network", "pass", null, [receiptId]));
140
+ }
141
+ }
142
+ for (const expected of intent.expected) {
143
+ findings.push(compareExpected(expected, values, [sourceId, bundleId]));
144
+ }
145
+ return Object.freeze({
146
+ intent: Object.freeze({
147
+ subject: Object.freeze({ ...intent.subject }),
148
+ expected: Object.freeze(intent.expected.map((expectation) => Object.freeze({ ...expectation }))),
149
+ }),
150
+ findings: Object.freeze(findings),
151
+ observations: Object.freeze(observations),
152
+ });
153
+ }
154
+ /** Source bytes and caller expectations, without claiming independent receipt authentication. */
155
+ export async function verifyDatasetV1WithIntent(input) {
156
+ checkedIntent(input.intent);
157
+ const source = await verifyDatasetV1Sources(input);
158
+ const bundle = verifyDatasetV1Bundle(input.bundle);
159
+ const receipt = input.receipt === undefined ? undefined : verifyDatasetV1Receipt(input.receipt);
160
+ const actual = bundle.computed;
161
+ const sourceValid = !source.mismatches.some((entry) => !entry.field.startsWith("bundle.") && !entry.field.startsWith("receipt.") &&
162
+ !entry.field.startsWith("binding.") && entry.field !== "sources.receipt_merkle_root");
163
+ const receiptBindingValid = receipt === undefined ? null :
164
+ receipt.ok && bundle.ok && !source.mismatches.some((entry) => entry.field.startsWith("binding.") || entry.field === "sources.receipt_merkle_root");
165
+ return report(input.intent, {
166
+ profile: "dataset",
167
+ subject: { kind: "dataset", id: actual.dataset_key, ...(receipt?.computed.hedera_network ? { hedera_network: receipt.computed.hedera_network } : {}) },
168
+ bundle: actual,
169
+ ...(receipt ? { receipt: receipt.computed } : {}),
170
+ sourceRoot: source.computed.source_merkle_root,
171
+ sourceCount: source.computed.source_file_count,
172
+ sourceBytes: source.computed.source_total_bytes,
173
+ sourceValid,
174
+ bundleValid: bundle.ok,
175
+ receiptBindingValid,
176
+ });
177
+ }
178
+ /** Source material and caller expectations, with independent bundle/receipt comparison. */
179
+ export async function verifyIngestV1WithIntent(input) {
180
+ checkedIntent(input.intent);
181
+ const source = await verifyIngestV1Sources(input);
182
+ const bundle = verifyIngestV1Bundle(input.bundle);
183
+ const pair = input.receipt === undefined ? undefined : verifyIngestV1Pair({ bundle: input.bundle, receipt: input.receipt });
184
+ const receipt = pair?.computed.receipt;
185
+ const sourceMismatches = input.receipt === undefined
186
+ ? source.mismatches.slice(bundle.mismatches.length)
187
+ : source.mismatches.filter((entry) => !entry.field.startsWith("bundle.") &&
188
+ !entry.field.startsWith("receipt.") && !entry.field.startsWith("binding.") &&
189
+ entry.field !== "sources.receipt_merkle_root");
190
+ const sourceValid = sourceMismatches.length === 0;
191
+ const receiptBindingValid = pair === undefined ? null :
192
+ pair.ok && !source.mismatches.some((entry) => entry.field === "sources.receipt_merkle_root");
193
+ return report(input.intent, {
194
+ profile: "ingest",
195
+ subject: { kind: "ingest", id: bundle.computed.object_key, ...(receipt?.hedera_network ? { hedera_network: receipt.hedera_network } : {}) },
196
+ bundle: bundle.computed,
197
+ ...(receipt ? { receipt } : {}),
198
+ sourceRoot: source.computed.source_merkle_root,
199
+ sourceCount: source.computed.source_item_count,
200
+ sourceBytes: source.computed.source_total_bytes,
201
+ sourceValid,
202
+ bundleValid: bundle.ok,
203
+ receiptBindingValid,
204
+ });
205
+ }
206
+ //# sourceMappingURL=sourceIntentV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sourceIntentV1.js","sourceRoot":"","sources":["../../src/verification/sourceIntentV1.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAGvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,sBAAsB,GAEvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,GAEtB,MAAM,gCAAgC,CAAC;AAuBxC,MAAM,OAAO,GAAG,kBAAkB,CAAC;AACnC,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAC9C,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,SAAS,IAAI,CAAC,GAAW,EAAE,KAAuC;IAChE,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,WAAoB,EAAE,KAAK,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,WAAW,CAClB,EAAU,EACV,OAA4B,EAC5B,MAAyC,EACzC,KAAkC;IAElC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AACjH,CAAC;AAED,SAAS,OAAO,CACd,QAAgB,EAChB,OAA4B,EAC5B,WAA0B,EAC1B,eAAkC;IAElC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,C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installing the package, run commands with `npx vera-anchor`. Contributors working from a source checkout may build the package with `npm run build` and invoke `node dist/cli.js` directly.
6
+
7
+ Dataset verification defaults to **offline**. Public verification is always explicit. Ingest and SAGE execution support both offline and public workflows, while independent SAGE HCS standards verification is a separate networked workflow.
8
+
9
+ ## Commands
10
+
11
+ ```text
12
+ npx vera-anchor verify dataset --bundle BUNDLE.json --sources SOURCES.json --source-root DIRECTORY --intent INTENT.json --policy POLICY.json [--receipt RECEIPT.json] [--mode offline] [--report-out REPORT.json]
13
+
14
+ npx vera-anchor verify dataset --mode public --explorer-url https://explorer.veraanchor.com --bundle BUNDLE.json --sources SOURCES.json --source-root DIRECTORY --intent INTENT.json --policy PUBLIC_POLICY.json [--receipt RECEIPT.json] [--mirror-url https://mainnet-public.mirrornode.hedera.com/api/v1] [--report-out REPORT.json]
15
+
16
+ npx vera-anchor verify ingest --bundle BUNDLE.json --material MATERIAL.json --intent INTENT.json --policy POLICY.json [--receipt RECEIPT.json] [--source-root DIRECTORY] [--mode offline] [--report-out REPORT.json]
17
+
18
+ npx vera-anchor verify ingest --mode public --explorer-url https://explorer.veraanchor.com --anchor-request-id CORE_ANCHOR_UUID --bundle BUNDLE.json --material MATERIAL.json --intent INTENT.json --policy PUBLIC_POLICY.json [--receipt RECEIPT.json] [--source-root DIRECTORY] [--mirror-url https://mainnet-public.mirrornode.hedera.com/api/v1] [--report-out REPORT.json]
19
+
20
+ npx vera-anchor verify execution --evidence EVIDENCE.json --intent INTENT.json --policy POLICY.json [--verification-material MATERIAL.json] [--mode offline] [--report-out REPORT.json]
21
+
22
+ npx vera-anchor verify execution --mode public --explorer-url https://explorer.veraanchor.com --evidence EVIDENCE.json --intent INTENT.json --policy PUBLIC_POLICY.json [--verification-material MATERIAL.json] [--mirror-url https://mainnet-public.mirrornode.hedera.com/api/v1] [--report-out REPORT.json]
23
+
24
+ npx vera-anchor verify standards --evidence SAGE_EVIDENCE.json --intent INTENT.json --policy STANDARDS_POLICY.json [--verification-material MATERIAL.json] [--mirror-url https://mainnet-public.mirrornode.hedera.com/api/v1] [--report-out REPORT.json]
25
+
26
+ npx vera-anchor report validate --report SAVED_REPORT.json
27
+
28
+ npx vera-anchor policy assess --report SAVED_REPORT.json --policy POLICY.json
29
+ ```
30
+
31
+ ## Verification intent and policy
32
+
33
+ `INTENT.json` contains caller-controlled verification intent. Subject identifiers, network selection and expected commitments must come from the relying party's trusted context rather than being copied from the evidence being verified.
34
+
35
+ `POLICY.json` uses the `va.verification-policy.v1` contract. Policy requirements determine which checks and assurance are required for an `allow`, `review` or `deny` decision.
36
+
37
+ An untrusted receipt, bundle, execution record or standards projection cannot define its own sufficient acceptance threshold.
38
+
39
+ ## Portable reports
40
+
41
+ All four `verify` commands accept `--report-out REPORT.json`.
42
+
43
+ The output file contains only the native `va.portable-verification-report.v1` report. The CLI still writes its normal result envelope to stdout and preserves the policy exit code.
44
+
45
+ The destination must be a new file in an existing writable directory. Report export uses a temporary sibling file and exclusive final creation so an existing output is not overwritten. Protect exported reports according to the sensitivity of their metadata.
46
+
47
+ `report validate` checks report structure and internal digests. It does **not** authenticate the report or recompute the original evidence.
48
+
49
+ `policy assess` treats a saved report as unauthenticated and therefore does not promote it into a fresh SDK-authorized `allow`. When a relying party needs a decision over the underlying evidence, rerun the corresponding verification workflow with independently supplied intent and policy.
50
+
51
+ ## Dataset verification
52
+
53
+ ### Offline Dataset verification
54
+
55
+ Offline Dataset verification recomputes supported source, bundle and receipt relationships without resolver network requests.
56
+
57
+ The Dataset source manifest supplied with `--sources` contains producer-relative paths. Those paths must correspond to the paths committed by the Dataset bundle; they are not inferred from local filesystem names.
58
+
59
+ Example policy:
60
+
61
+ ```json
62
+ {
63
+ "schema_version": "va.verification-policy.v1",
64
+ "subject": { "kind": "dataset", "id": "07be0cf7-4cab-40ca-aa70-87840df4d3e7.example.verification.demo.v1" },
65
+ "report_kind": "verification",
66
+ "required_checks": [
67
+ "dataset.source_binding",
68
+ "dataset.bundle_consistency"
69
+ ],
70
+ "on_unresolved": "review"
71
+ }
72
+ ```
73
+
74
+ ### Public Dataset verification
75
+
76
+ Public Dataset verification requires an independently selected Hedera network in both intent and policy. The policy must use `report_kind: "public_triangulation"`.
77
+
78
+ Example:
79
+
80
+ ```json
81
+ {
82
+ "schema_version": "va.verification-policy.v1",
83
+ "subject": {
84
+ "kind": "dataset",
85
+ "id": "07be0cf7-4cab-40ca-aa70-87840df4d3e7.example.verification.demo.v1",
86
+ "hedera_network": "mainnet"
87
+ },
88
+ "report_kind": "public_triangulation",
89
+ "required_checks": [
90
+ "dataset.source_binding",
91
+ "dataset.bundle_consistency",
92
+ "triangulation.public_record_hedera.message_sha3_512"
93
+ ],
94
+ "required_assurance": ["mirror_corroboration"],
95
+ "on_unresolved": "review"
96
+ }
97
+ ```
98
+
99
+ The public workflow recomputes local evidence, resolves the selected Vera Anchor Explorer publication record and independently queries Hedera Mirror for supported ledger observations.
100
+
101
+ A consistent ciphertext digest is not proof of independently authenticated decrypted plaintext, Hedera consensus signatures or publisher ownership.
102
+
103
+ ## Ingest verification
104
+
105
+ `verify ingest` accepts one bounded `--material MATERIAL.json` descriptor. The descriptor represents original material supplied for recomputation, not an authenticated claim about its fingerprint.
106
+
107
+ Supported forms include:
108
+
109
+ ```json
110
+ {"kind":"json","value":{"measurement":42}}
111
+ ```
112
+
113
+ ```json
114
+ {"kind":"text","text":"sample text","media_type":"text/plain"}
115
+ ```
116
+
117
+ ```json
118
+ {"kind":"file","path_rel":"measurement.csv"}
119
+ ```
120
+
121
+ ```json
122
+ {"kind":"file_set","paths":["sample.csv","subdir/notes.txt"]}
123
+ ```
124
+
125
+ For `file` and `file_set`, provide `--source-root DIRECTORY`. Paths must remain under the selected root and may not traverse symlinks.
126
+
127
+ Public Ingest verification additionally requires an independently selected `--anchor-request-id` for the Core Merkle anchor request. This identifier is distinct from the ingest object key, a Dataset identifier and tenant-side Hash Factory anchors.
128
+
129
+ Example public policy:
130
+
131
+ ```json
132
+ {
133
+ "schema_version": "va.verification-policy.v1",
134
+ "subject": {
135
+ "kind": "ingest",
136
+ "id": "hf.first-ingest.demo",
137
+ "hedera_network": "mainnet"
138
+ },
139
+ "report_kind": "public_triangulation",
140
+ "required_checks": [
141
+ "ingest.source_binding",
142
+ "ingest.bundle_consistency",
143
+ "triangulation.public_record_hedera.message_sha3_512"
144
+ ],
145
+ "required_assurance": ["mirror_corroboration"],
146
+ "on_unresolved": "review"
147
+ }
148
+ ```
149
+
150
+ ## SAGE execution verification
151
+
152
+ Offline execution verification uses `subject.kind: "execution"`, the exact job UUID and `report_kind: "execution"`.
153
+
154
+ The policy's `execution_scope` supplies the independently expected profile, program and optional exact result UUID. The verifier does not silently select a latest result.
155
+
156
+ Example public execution policy:
157
+
158
+ ```json
159
+ {
160
+ "schema_version": "va.verification-policy.v1",
161
+ "subject": {
162
+ "kind": "execution",
163
+ "id": "4e4f624d-25b6-577f-93c6-075292e722d6",
164
+ "hedera_network": "mainnet"
165
+ },
166
+ "report_kind": "execution_triangulation",
167
+ "required_checks": ["binding.digest_recomputed"],
168
+ "required_assurance": ["mirror_corroboration"],
169
+ "execution_scope": {
170
+ "profile": "sage-standards-v1",
171
+ "expected_program": "sage",
172
+ "requested_result_id": null
173
+ },
174
+ "on_unresolved": "review"
175
+ }
176
+ ```
177
+
178
+ Public execution triangulation covers its supported Explorer/Hedera relationships. It does not implicitly complete independent HCS standards verification.
179
+
180
+ ## Independent SAGE HCS standards verification
181
+
182
+ `verify standards` is networked and uses Hedera Mirror only. It does not use Explorer and does not accept `--mode` or `--explorer-url`.
183
+
184
+ The workflow resolves supported exact historical HCS references for the independently selected network. v0.1 supports HCS-1, HCS-2, HCS-11, HCS-13, HCS-14 and HCS-26 verification through the SDK's pinned contracts.
185
+
186
+ Example policy:
187
+
188
+ ```json
189
+ {
190
+ "schema_version": "va.verification-policy.v1",
191
+ "subject": {
192
+ "kind": "execution",
193
+ "id": "4e4f624d-25b6-577f-93c6-075292e722d6",
194
+ "hedera_network": "mainnet"
195
+ },
196
+ "report_kind": "independent_standards",
197
+ "required_checks": [
198
+ "binding.digest_recomputed",
199
+ "standards.references_resolved"
200
+ ],
201
+ "required_assurance": ["mirror_corroboration"],
202
+ "execution_scope": {
203
+ "profile": "sage-standards-v1",
204
+ "expected_program": "sage",
205
+ "requested_result_id": null
206
+ },
207
+ "on_unresolved": "review"
208
+ }
209
+ ```
210
+
211
+ HCS-26 resolution verifies the selected historical discovery/version path, canonical skill manifest and integrity of manifest-declared HCS-1 files within the SDK's resource bounds.
212
+
213
+ Standards resolution does not authenticate Hedera consensus signatures, DID-controller ownership, historical account ownership or publisher-key control, and it does not prove that referenced software executed.
214
+
215
+ HCS-1 Zstandard decoding uses Node's built-in `zstdDecompressSync`. Use Node 24 or Node 22.15+ for the full standards workflow. Older runtimes are outside the v0.1 supported engine range.
216
+
217
+ ## Resolver configuration
218
+
219
+ `--explorer-url` is required only for public Explorer workflows. `--mirror-url` is optional; when omitted, the SDK uses its network-specific Hedera Mirror default.
220
+
221
+ Resolver origins are caller-controlled configuration and are never taken from evidence or publication contents. Supported resolvers reject redirects, bound response sizes and timeouts, and do not silently probe another Hedera network.
222
+
223
+ HTTPS is required except for HTTP loopback development endpoints.
224
+
225
+ ## CLI result and exit codes
226
+
227
+ The CLI writes one JSON object to stdout using `schema_version: "va.verifier-cli-result.v1"`. Successful command execution returns either `{command,result}` or `{error:{code}}` according to the CLI contract. Raw source bytes and credentials are not included in the result envelope.
228
+
229
+ Exit codes:
230
+
231
+ - `0` — `allow`, or a valid saved report for `report validate`.
232
+ - `1` — `deny`, or an invalid saved report.
233
+ - `2` — `review`.
234
+ - `64` — malformed command or input.
235
+ - `70` — operational failure.
236
+
237
+ No CLI mode asserts Hedera consensus-signature authentication, DID-controller ownership or independent cryptographic binding of Explorer-assisted decrypted publication plaintext to its ciphertext.
@@ -0,0 +1,38 @@
1
+ # Conformance
2
+
3
+ The verifier is qualified against deterministic fixtures and live public observations. Conformance exists to demonstrate that the SDK reproduces supported Vera Anchor commitment contracts and preserves the same verification semantics across offline and networked workflows.
4
+
5
+ ## Current v0.1 coverage
6
+
7
+ Release qualification includes:
8
+
9
+ - Dataset offline recomputation and mainnet public triangulation;
10
+ - Ingest offline recomputation and mainnet public triangulation;
11
+ - SAGE execution verification using pinned mainnet evidence;
12
+ - independent HCS standards resolution for supported HCS-1, HCS-2, HCS-11, HCS-13, HCS-14 and HCS-26 references;
13
+ - HCS-26 manifest and declared-file integrity resolution;
14
+ - explicit network-scope and no-fallback behavior;
15
+ - Vera Anchor Explorer public-record resolution;
16
+ - Hedera Mirror corroboration;
17
+ - portable report validation and policy evaluation;
18
+ - positive and adversarial cases for supported commitment and resolver boundaries.
19
+
20
+ Live tests depend on external public services and therefore validate both the verifier and the continued availability of the pinned public evidence. A live service outage is not treated as a successful verification result.
21
+
22
+ ## Fixture requirements
23
+
24
+ Conformance fixtures must identify the relevant evidence profile/version, source provenance, Hedera network, independently expected subject or digest, required checks and expected outcomes, and whether a test is deterministic/offline or depends on live public services.
25
+
26
+ Fixtures must not contain production credentials, private tenant evidence or other confidential material. Missing fixture data must never be replaced with fabricated successful observations.
27
+
28
+ ## Reproducibility
29
+
30
+ Offline fixtures are expected to produce deterministic results from the same bytes and caller-supplied intent. Networked conformance uses exact references and explicit network selection; it must not silently substitute a different Hedera network, latest registry state or unrelated public record.
31
+
32
+ The repository test suite is part of release qualification:
33
+
34
+ ```sh
35
+ npm test
36
+ ```
37
+
38
+ A release also requires the package build and external-consumer checks described in the repository release process.
@@ -0,0 +1,37 @@
1
+ # Threat model
2
+
3
+ The verifier treats supplied bytes, JSON documents, source paths, evidence references and network responses as hostile input. Its purpose is to establish bounded verification claims without allowing untrusted evidence to define the relying party's trust policy.
4
+
5
+ ## Security boundaries
6
+
7
+ | Threat | v0.1 boundary |
8
+ | --- | --- |
9
+ | Replayed evidence bound to the wrong subject | Verification intent is independently supplied and subject/commitment mismatches fail. |
10
+ | Cross-network substitution | Hedera network selection is explicit and checked; resolvers do not silently fall back to another network. |
11
+ | Fabricated corroboration | Observations retain source/resolver identity and triangulation compares independently acquired facts rather than accepting producer summaries as proof. |
12
+ | Resolver redirection or arbitrary evidence URLs | Public resolver origins are caller-controlled configuration. Supported resolvers reject redirects and do not obtain resolver authority from evidence. |
13
+ | Oversized or adversarial inputs | Parsers, JSON structures, source sets, proof paths, HCS chunks, decompression and network responses are bounded at implementation-specific limits. |
14
+ | Stale or substituted registry state | Standards workflows use exact historical locators where required and do not silently select a latest entry. |
15
+ | Ledger-assurance overclaim | Hedera Mirror observations are reported as corroboration, not consensus-signature authentication. |
16
+ | Saved-report overclaim | Portable report validation checks structure and digests; a saved report does not authenticate itself or independently authorize `allow`. |
17
+ | Local path traversal or symlink substitution | CLI source workflows validate relative paths and constrain reads to the selected source root. |
18
+ | Leakage of private evidence | Offline workflows do not perform network requests; public network access is explicit. Reports and CLI output exclude raw source bytes and credentials. |
19
+ | Dependency compromise | The package has no runtime dependencies; development and release installs are lockfile-driven and validated in CI/release qualification. |
20
+
21
+ ## Trust assumptions
22
+
23
+ The relying party is responsible for independently selecting verification intent, expected subject identifiers, Hedera network, resolver origins and acceptance policy. Values copied from untrusted evidence do not become trustworthy merely because they are supplied to the verifier as expectations.
24
+
25
+ Vera Anchor Explorer and Hedera Mirror are distinct observation sources. A successful Explorer or Mirror lookup establishes only the claim represented by that resolver's documented result. Mirror REST data is not an authenticated Hedera consensus proof.
26
+
27
+ ## Out of scope for v0.1
28
+
29
+ The verifier does not establish:
30
+
31
+ - factual truth or quality of the underlying content;
32
+ - DID-controller ownership or publisher control solely from a DID/UAID declaration;
33
+ - authenticated Hedera consensus signatures from Mirror REST responses;
34
+ - historical account ownership beyond the exact evidence the supported standards expose;
35
+ - independent cryptographic binding of Explorer-assisted decrypted plaintext to publication ciphertext.
36
+
37
+ These boundaries are intentional. Unsupported or unavailable assurance must remain explicit rather than being inferred from successful integrity checks.