Within
Check if a geometry is within a specified radius of a target geometry.Request Body
number
required
Target chain ID (e.g., 84532 for Base Sepolia, 8453 for Base).
Input
required
The geometry to check (typically a point).
Input
required
The target geometry to measure distance from.
number
required
Maximum distance in meters.
string
required
EAS schema UID to issue the attestation against.
string
Ethereum address to receive the attestation. Defaults to zero address if not provided.
Example Request
Example Response
Notes
- Uses PostGIS
ST_DWithinfunction - Radius is always in meters (no unit conversion)
- Returns
trueif the distance between geometries is less than or equal to the radius - The
operationfield includes the radius in centimeters:within:RADIUS_CM(e.g.,within:50000for a 500m radius). Resolver contracts should use prefix matching, not exact string comparison
SDK Method
See
astral.compute.within()