prove_field_predicate
Prove a hidden document field meets a threshold (<= or >=) without revealing the value, using zero-knowledge and a Merkle inclusion path; returns an async job ID.
Instructions
Issue a zero-knowledge field-bound predicate proof: prove that a hidden field of an anchored document satisfies "value <= threshold" or "value >= threshold" WITHOUT revealing the value. Needs the depth-4 Merkle inclusion path of the field in the anchored content root. value/threshold are scaled integers (decimal strings); the value is a witness and never persisted. If contentRoot is supplied it is anchored first. A false predicate fails at local proving time, nothing is submitted. Async: returns { jobId, status } immediately; poll get_job_status until succeeded or failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirs | Yes | Exactly 4 booleans; true means the current node is the LEFT child | |
| unit | No | Informational unit, e.g. kWh | |
| value | Yes | Scaled integer field value (witness only, never persisted) | |
| fieldKey | Yes | Canonical field id (64 hex, public) | |
| siblings | Yes | Depth-4 Merkle inclusion path: exactly 4 sibling digests (64 hex each) | |
| predicate | Yes | Predicate operator | |
| sessionId | Yes | Wallet session id that signs and submits | |
| threshold | Yes | Scaled integer threshold (same scaling as value) | |
| contentRoot | No | Optional Merkle root (64 hex) to anchor first | |
| payloadHash | Yes | Attestation payload hash (64 hex) | |
| idempotencyKey | No | Dedupes retries | |
| contractAddress | Yes | AttestationVault deployment | |
| sponsorSessionId | No | Optional second session that pays the dust fee | |
| compiledArtifactRef | No | Contract artifact ref, defaults to 'attestation-vault' |