Within
Check if a geometry is within a specified radius of a target geometry.Request body
Target chain ID (e.g.,
84532 for Base Sepolia).The geometry to check (typically a point). See Input types for accepted formats.
The target geometry to measure distance from.
Maximum distance in meters.
EAS schema UID. The server uses a default schema if not provided.
Ethereum address to receive the attestation. Defaults to the zero address.
Example request
Response
Returns a BooleanComputeResponse.true if the geometry is within the radius of the target.Encodes the radius in centimeters:
"within:RADIUS_CM" (e.g., "within:50000" for a 500m radius).Unix timestamp of computation.
Array containing
[geometryRef, targetRef].Signed EAS attestation. See AttestationData.
Signature for delegated onchain submission. See DelegatedAttestationData.
Example response
Notes
- Uses PostGIS
ST_DWithinfunction - Radius is always in meters in the request (no unit conversion needed)
- The
operationfield encodes the radius in centimeters:within:50000means 500 meters. Resolver contracts should use prefix matching, not exact string comparison - Returns
trueif the distance between geometries is less than or equal to the radius
SDK Method
See
astral.compute.within()