-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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
- Create a location attestation onchain (this works fine)
- 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"}- 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:
- Create a location attestation
- Reference that attestation UID in compute operations
- 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels