⚠️ Development Preview - This project is under active development and not yet production-ready. APIs may change. See thedevelopbranch for latest work;mainwill be used for stable releases.
Verifiable geospatial computation for Ethereum - Run spatial operations in a TEE and get signed attestations for onchain use.
Astral Location Services is a geospatial computation oracle that makes location-based smart contracts possible. Perform spatial operations (distance, containment, intersection) and get back signed attestations you can register on EAS. Using EAS resolvers, these policy attestations can be connected to any smart contract.
Built on the Location Protocol and Ethereum Attestation Service (EAS), Astral Location Services provides verifiable geospatial operations for Ethereum.
Key features:
- Verifiable computation via EigenCompute (TEE environment)
- PostGIS-powered spatial operations (distance, contains, intersects, within, area)
- EAS integration with delegated attestations for onchain use
- SDK-first developer experience
import { AstralSDK } from '@decentralized-geo/astral-sdk';
const astral = new AstralSDK();
// Check if user is within 500m of landmark
const result = await astral.compute.within(
userLocationUID,
landmarkUID,
500,
{ schema: RESOLVER_SCHEMA, recipient: userAddress }
);
console.log(`Nearby: ${result.result}`);
// Submit onchain (developer pays gas, Astral is attester)
const tx = await astral.eas.submitDelegated(result.delegatedAttestation);See the Quickstart Guide for a complete walkthrough.
-
Location Attestations are signed spatial records (points, polygons, routes) that conform to Location Protocol. Reference them by UID.
-
Geospatial Operations compute relationships between locations: distance, containment, intersection, etc. Operations run in a TEE via EigenCompute.
-
Policy Attestations are signed results of computations. Smart contracts verify these to gate onchain actions by real-world location.
-
EAS Resolvers trigger business logic when attestations are created. Location-gated contracts become trivial - no manual signature verification needed.
- Local currencies - Geogated token swaps (only trade if you're in the region)
- Neighborhood DAOs - Governance tokens for residents only
- Proof-of-visit NFTs - Collectibles for visiting locations
- Delivery verification - Escrow that releases when package arrives
- Location-based games - Territory control, geocaching with tokens
- Proximity voting - Vote weight based on distance
See What You Can Build for detailed examples.
| Document | Description |
|---|---|
| SPEC.md | Technical specification - Architecture, API, SDK, schemas, security |
| QUICKSTART.md | Developer tutorial - Build a location-gated NFT |
| GOAL.md | Vision and core concepts |
| WHAT-YOU-CAN-BUILD.md | Use cases and patterns |
The developer-templates/ directory contains copy-paste templates and runnable examples:
- Templates – Basic EAS resolver, location-gated NFT, geofenced token, delivery verification escrow (Solidity).
- Examples – Foundry deployment and tests, React/Next.js frontend, Node E2E workflow, React Native pattern.
- Tests – Contract tests (Foundry) and SDK integration test examples (Vitest).
See developer-templates/README.md for quick start and prerequisites.
Developer App → Astral SDK → Compute Service (EigenCompute TEE) → Policy Attestation
↓
PostGIS (in-container)
The compute service runs in EigenCompute's TEE environment with PostGIS inside the container, enabling verifiable geospatial computation.
See SPEC.md for detailed architecture.
Version: 0.1.0 (MVP)
This is an MVP focused on developer experience and learning. Building as part of the EigenLayer Open Innovation Program.
Trust Model:
- Centralized service with known signer running in TEE (EigenCompute)
- Future: Additional verifiability options (AVS consensus, ZK proofs)
This project is in active development. Feedback and contributions welcome!