Migration Guide: v0.1.x to v0.2.0
This guide covers the breaking changes and migration steps for upgrading from Astral SDK v0.1.x to v0.2.0.Overview of Changes
What Changed
- Namespaced API: Methods are organized under
location.offchain.*,location.onchain.*, andcompute.* - New Compute Module: The
compute.*namespace provides verifiable geospatial operations - Simplified Configuration: Single
AstralConfigfor initialization
What Stayed the Same
- Core attestation types (
UnsignedLocationAttestation,OffchainLocationAttestation,OnchainLocationAttestation) - Location format support (GeoJSON, WKT, H3, coordinates)
- EAS integration and schema encoding
Package Changes
Before (v0.1.x)
After (v0.2.0)
Initialization Changes
Before (v0.1.x)
After (v0.2.0)
Method Migration Table
Location Module
Offchain Workflow
Onchain Workflow
Compute Module
Code Migration Examples
Example 1: Creating an Offchain Attestation
Before (v0.1.x)
After (v0.2.0)
Example 2: Creating an Onchain Attestation
Before (v0.1.x)
After (v0.2.0)
Example 3: Geospatial Computation
Before (v0.1.x)
After (v0.2.0)
Example 4: Full Workflow
Before (v0.1.x)
After (v0.2.0)
Configuration Changes
Before (v0.1.x)
After (v0.2.0)
Legacy Support
If you need to maintain backward compatibility during migration, the v0.1.x API is available viaAstralSDKLegacy:
TypeScript Import Changes
Before (v0.1.x)
After (v0.2.0)
Need Help?
If you encounter issues during migration:- Check the SDK Overview for complete API reference
- Review the Location Module and Compute Module documentation
- Join our Telegram community for support
- Open an issue on GitHub
Back: SDK Overview
Return to SDK overview