Building a custom plugin
Any proof-of-location system can integrate with the Astral SDK by implementing theLocationProofPlugin interface. This guide walks through the interface contract, which methods to implement, and how to test your plugin.
The interface
Step 1: Implement the interface
Step 2: Register with the SDK
runtimes array. If not, register() throws.
Step 3: Use through the SDK
Once registered, your plugin works with the standard stamps and proofs pipeline:Which methods to implement
Common patterns:
- API-based service (like WitnessChain): implement
collect(),create(),verify() - Mobile app export (like ProofMode): implement
create(),verify()(collection happens on-device) - Full control: implement all four methods
Runtime compatibility
Declare which environments your plugin supports:Location Protocol v0.2 compliance
Stamps must conform to LP v0.2. Key requirements forUnsignedLocationStamp: