Skip to main content
Research Preview — This API is under development.

Contains

Check if a geometry is inside a container geometry.

Request Body

number
required
Target chain ID (e.g., 84532 for Base Sepolia, 8453 for Base).
Input
required
The containing geometry (typically a polygon). Can be a UID, GeoJSON, or offchain attestation reference.
Input
required
The geometry to check. Can be a UID, GeoJSON, or offchain attestation reference.
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

Response

boolean
required
true if the geometry is inside the container, false otherwise
string
required
Always “contains”
number
required
Unix timestamp of computation
string[]
required
Array containing [containerRef, geometryRef]

Example Response

Notes

  • Uses PostGIS ST_Contains function
  • The container must completely contain the geometry for true
  • Points on the boundary may return false (use intersects for boundary cases)

SDK Method

See astral.compute.contains()