Distance
Calculate the distance between two geometries in meters.Request Body
Target chain ID. All UIDs must exist on this chain.
First geometry. Can be a UID, GeoJSON, or offchain attestation reference.
Second geometry. Can be a UID, GeoJSON, or offchain attestation reference.
EAS schema UID to issue the attestation against.
Ethereum address to receive the attestation. Defaults to zero address if not provided.
Example Request
Response
Distance in meters (e.g., 523.45)
Always “meters”
Always “distance”
Unix timestamp of computation
Array of input references (UIDs or geometry hashes)
The signed attestation object
Signature for delegated onchain submission
Example Response
Notes
- Distance is calculated using PostGIS
ST_Distancewith geodetic coordinates - Result is in meters with centimeter precision (rounded to 0.01m)
- For raw GeoJSON inputs, a keccak256 hash is used in
inputRefs
SDK Method
See
astral.compute.distance()