Skip to content

Compute API returns 500 when resolving attestation UIDs #2

@johnx25bd

Description

@johnx25bd

Description

The compute API endpoints (e.g., /compute/v0/within, /compute/v0/distance) return a 500 Internal Server Error when geometry inputs reference existing attestation UIDs, but work correctly with raw GeoJSON.

Steps to Reproduce

  1. Create a location attestation onchain (this works fine)
  2. Call the compute API with the attestation UID:
curl -X POST "https://api.astral.global/compute/v0/within" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 84532,
    "geometry": {"uid": "0x83420c46a6b3590dda39c2a69353339d605aa6f26602517bf3a56995f0353243"},
    "target": {"uid": "0xd2e407612a3373b35e9298b2e2209cfb083a0b88f278b7824de3dcee8f954e1b"},
    "radius": 1000,
    "schema": "0xebb4ecaea7de6b22c4a2ebe8838d703c7a8f413ad2bee619d67917ce4c775bee",
    "recipient": "0x2cC5dF15a2418D0Daebcc89f88b4384624db9a28"
  }'

Result:

{"type":"https://astral.global/errors/internal","title":"Internal Server Error","status":500,"detail":"An unexpected error occurred","instance":"/compute/v0/within"}
  1. Same request with raw GeoJSON works:
curl -X POST "https://api.astral.global/compute/v0/within" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 84532,
    "geometry": {"type": "Point", "coordinates": [-122.4194, 37.7749]},
    "target": {"type": "Point", "coordinates": [-122.4194, 37.7749]},
    "radius": 1000,
    "schema": "...",
    "recipient": "..."
  }'

Result: Success with delegated attestation returned.

Expected Behavior

The API should resolve attestation UIDs to their geometry data and perform the compute operation, just as it does with raw GeoJSON.

Environment

  • Chain: Base Sepolia (84532)
  • SDK Version: @decentralized-geo/astral-sdk@0.2.0
  • Date: 2026-01-30

Impact

This blocks the intended workflow where users:

  1. Create a location attestation
  2. Reference that attestation UID in compute operations
  3. Get policy results that reference the original attestation

The workaround (using raw GeoJSON) works but defeats the purpose of having verifiable location attestations as inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions