Overview
Purchase permits are signed messages that authorize specific wallet addresses to purchase tokens for verified entities. They serve as the bridge between Sonar’s compliance verification and your onchain sale contract. Each permit proves that an entity has completed the required verification and is authorized to make a specific purchase with given funding bounds.Permit Architecture
Permits are short-lived (10 minutes) and single-use to ensure fresh compliance status and prevent replay attacks.Permit Types
Sonar generates different permit structures based on your sale configuration:- Basic Permit
- Allocation Permit
- Fixed6 Permit
Simple entity authorization without allocation data.
Common Issues
Signature Verification Failures Most permit issues stem from signature verification problems:- Wrong signer address: Ensure your contract has the correct Sonar signer address
- Struct encoding: Permit structure must exactly match Solidity definition
- Sale UUID mismatch: Verify your sale UUID matches exactly
- Generate permits just-in-time: Don’t fetch permits during page load
- Implement retry logic: Regenerate expired permits automatically
- Handle expired permit errors gracefully: Provide clear retry options
See Also
Smart Contract Integration
Learn how to validate permits in your sale contract
Permit Validation Recipes
Common patterns for implementing permit validation
Frontend Integration
Generate and use permits in your application
Allocation Management
How permits work with allocation limits
Permit Validation Recipes
Custom permit validation patterns and examples
Frontend Integration
Frontend permit generation and error handling
Allocation Management
How allocations are included in purchase permits