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

API Reference

Astral provides two REST APIs:
APIPurposeBase URL
Compute APIVerifiable geospatial operations/compute/v0
Records APIQuery location attestations/api/v0

Compute API

The Compute API performs verifiable geospatial operations and returns signed attestations.

Base URL

https://api.astral.global/compute/v0

Authentication

Phase 1 (MVP)

No authentication required. Rate limiting by IP address.
# No auth headers needed
curl https://api.astral.global/compute/v0/distance \
  -H "Content-Type: application/json" \
  -d '{"chainId": 84532, "from": "0xabc...", "to": "0xdef...", "schema": "0x..."}'

Phase 2 (Future)

Wallet-based authentication with signed requests.
curl https://api.astral.global/compute/v0/distance \
  -H "Content-Type: application/json" \
  -H "X-Wallet-Address: 0x..." \
  -H "X-Signature: 0x..." \
  -d '...'

Input Types

All endpoints accept geometry inputs in these formats:
FormatDescriptionExample
UID stringOnchain attestation"0xabc123..."
GeoJSONRaw geometry{"type": "Point", "coordinates": [2.29, 48.85]}
UID + URIOffchain attestation{"uid": "0xabc...", "uri": "ipfs://Qm..."}
Inline attestationFull offchain object{"attestation": {...}}

Response Format

All successful responses include:
{
  "result": 523.45,
  "units": "meters",
  "operation": "distance",
  "timestamp": 1706400000,
  "inputRefs": ["0x...", "0x..."],
  "attestation": {
    "schema": "0x...",
    "attester": "0x...",
    "recipient": "0x...",
    "data": "0x...",
    "signature": "0x..."
  },
  "delegatedAttestation": {
    "signature": "0x...",
    "attester": "0x...",
    "deadline": 1706403600
  }
}

Error Format

Errors follow RFC 7807 (Problem Details for HTTP APIs):
{
  "type": "https://api.astral.global/errors/attestation-not-found",
  "title": "Attestation Not Found",
  "status": 404,
  "detail": "Location attestation with UID 0xabc123... not found on chain 84532"
}

Error Types

TypeStatusDescription
invalid-input400Bad request data, missing fields, invalid geometry
attestation-not-found404UID doesn’t exist on specified chain
verification-failed401Signature verification failed
computation-error500PostGIS operation failed
rate-limited429Too many requests

Rate Limits

Auth LevelLimit
Unauthenticated100 requests/hour per IP
Wallet authenticated1000 requests/hour
During development and testing, you may hit rate limits quickly. Consider caching results or using a test wallet for higher limits.

Chain Configuration

The following table shows addresses for supported chains. The Attester Address is the address that signs delegated attestations—resolver contracts must verify attestations come from this address.
ChainChain IDEASSchema RegistryAttester Address
Base Sepolia845320x42000000000000000000000000000000000000210x42000000000000000000000000000000000000200x590fdb53ed3f0B52694876d42367192a5336700F

Available Endpoints