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

Contains

Check if a geometry is inside a container geometry.

Request body

chainId
number
required
Target chain ID (e.g., 84532 for Base Sepolia).
container
Input
required
The containing geometry (typically a polygon). See Input types for accepted formats.
containee
Input
required
The geometry to check — is this inside the container?
schema
string
EAS schema UID. The server uses a default schema if not provided.
recipient
string
Ethereum address to receive the attestation. Defaults to the zero address.

Example request

Response

Returns a BooleanComputeResponse.
result
boolean
required
true if the containee is inside the container, false otherwise.
operation
string
required
Always "contains".
timestamp
number
required
Unix timestamp of computation.
inputRefs
string[]
required
Array containing [containerRef, containeeRef].
attestation
AttestationData
required
Signed EAS attestation. See AttestationData.
delegatedAttestation
DelegatedAttestationData
required
Signature for delegated onchain submission. See DelegatedAttestationData.

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
The field for the inner geometry is containee, not geometry. This naming distinguishes the two inputs unambiguously.

SDK Method

See astral.compute.contains()