Policy Attestations
Policy Attestations are the signed outputs of geospatial operations. They are signed by the Astral signing key, which is held exclusively inside the TEE (trusted execution environment). This is how you know the computation was performed correctly — only code running inside the TEE can produce valid signatures.When submitted onchain via EAS resolvers, policy attestations can trigger any smart contract logic on EVM-compatible chains.
What is a Policy Attestation?
When you call a compute operation, Astral returns a Policy Attestation:Code snippets need testing — Verify against actual implementation before use.
- The computation was performed by the Astral signing key
- The inputs were exactly as specified
- The result is accurate
Schema Types
Policy Attestations use per-result-type schemas. The SDK auto-selects based on the operation.BooleanPolicyAttestation
For predicates (contains, within, intersects):
NumericPolicyAttestation
For measurements (distance, length, area):
GeometryPolicyAttestation (Future)
For transformations (buffer, centroid, union):
Input References
TheinputRefs array contains a bytes32 reference for each input:
This enables verification that specific inputs were used:
For raw GeoJSON, the hash allows verification if the original geometry is known, but does not reveal the geometry itself.
SDK Return Object
Using Policy Attestations
Offchain
Use the result directly in your application:Onchain
Submit using delegated attestation:To connect policy attestations to smart contract logic, you need to register an EAS resolver with your schema first.
Result Scaling
Numeric results are stored as scaled integers for determinism:Attestation Expiry
ThedelegatedAttestation.deadline indicates when the signature expires. Submissions after the deadline will fail.
Next: EAS Resolvers
Learn how to gate smart contracts with Policy Attestations