📄️ Error Handling
The GalaSwap SDK uses a custom error class GSwapSDKError for many error conditions. This provides consistent error handling and additional context for debugging.
📄️ Branded Types
The GalaSwap SDK uses TypeScript branded types to prevent common mistakes when working with prices and amounts. These types help avoid, for example, mixing up regular prices with square root prices, which can lead to calculation errors.