Location records are the inputs to geospatial operations. They represent spatial data — points, polygons, routes, or any geometry — that Astral can compute against.
Verification in progress — We are actively verifying that deployed schemas conform to Location Protocol v0.2. There may be inconsistencies between the documentation, deployed schemas, and the spec. See GitHub issue #11 for status.
Location Attestations serve as inputs to geospatial operations:
Copy
// As direct UID (onchain attestation)const result = await astral.compute.distance( '0xabc123...', // UID of first location '0xdef456...' // UID of second location);// As UID + URI (offchain attestation)const result = await astral.compute.contains( { uid: '0xabc123...', uri: 'ipfs://Qm...' }, userLocationUID);// As inline attestation objectconst result = await astral.compute.within( { attestation: signedOffchainAttestation }, landmarkUID, 500);
You can also use raw GeoJSON without creating an attestation first:
Copy
// Raw GeoJSON as inputconst result = await astral.compute.contains( { type: 'Polygon', coordinates: [[[...]]] // SF Bay Area boundary }, userLocationUID);
Raw GeoJSON is not attested. The Policy Attestation proves “Astral computed the relationship between inputs A and B” but does NOT prove who signed those geometries. Use raw GeoJSON for reference geometries (official boundaries) or prototyping.