Research Preview — APIs may change. GitHub
Compute
The Compute endpoint runs geospatial operations on location data inside the TEE and returns signed results. It answers spatial questions — how far apart are these locations? is this point inside that boundary? — and signs the answer so the computation can be verified independently. (Whether the input locations are truthful is a separate question — see accepted inputs below.)Accepted Inputs
The compute endpoint accepts location data at any level of the verifiability spectrum:
You can mix input types in a single operation. A geofencing check might use raw GeoJSON for the boundary (a publicly known polygon) and a verified location proof for the user’s position.
Inside the TEE
The compute engine is PostGIS backed by GEOS — the same C++ library that powers QGIS, GDAL, and most professional geospatial software. PostGIS runs inside the Docker container within the TEE, not as an external service. Computation is stateless and deterministic. Each request brings all required inputs. Results are rounded to centimeter precision before signing to ensure reproducibility. Same inputs always produce the same output.Available Operations
Measurements (Numeric Results)
Predicates (Boolean Results)
All measurements use metric units. No unit conversion is provided — convert client-side if needed.
Precision and Determinism
Results are stored with centimeter precision as scaled integers:
This scaling ensures deterministic integer representation, which is important for smart contract integration where floating-point arithmetic isn’t available.
Output
Every compute operation returns a signed result containing:- The computed answer (boolean or numeric)
- References to the specific inputs used (note: in v0 the result may also carry the full input data in plaintext — see Privacy)
- A timestamp
- The operation name
- A cryptographic signature from the TEE-held signing key
What’s Next
The current operation set covers the most common spatial questions, but PostGIS exposes a much larger surface. Areas we’re exploring:- More predicates and measurements —
disjoint,touches,crosses, nearest-neighbor queries - Geometry transformations — buffers, centroids, unions, intersections. These return new geometries rather than scalar or boolean values, which raises open design questions about signed result format and storage
- Spatial selection queries — operations over sets of geometries, like “which of these polygons contains this point?” or “find all zones within 1km of this location”
- Compositional queries — chaining multiple operations into a single verified request, so you could express something like “is this point within 500m of any geometry in this set that intersects this boundary?” without multiple round trips
Next: Signed results
Output formats and how to use them
See also:
- API: Compute endpoints — endpoint reference for each operation
- SDK: Compute module — programmatic access to compute operations
- API: Types — result type reference