Migration Guide
Overview
Key Benefits of V2
Conceptual Differences
1. Direction Control
// V1: Confusing direction control
const quote = await client.fetchQuote({
btcAmount: "0.00008",
runeName: "GOLD•DUST",
sell: false, // What does this mean? Buy runes with BTC? Sell BTC for runes?
address: "bc1..."
});2. Order Management
3. PSBT Handling
4. Data Structure Consistency
Migration Examples
Example 1: Basic Rune Purchase
Example 2: Selling Runes for BTC
Migration Checklist
1. Update Method Names
2. Update Parameters
3. Update Response Handling
4. Update PSBT Signing
5. Simplify Error Handling
Common Pitfalls and Solutions
Pitfall 1: Single PSBT Assumption
Pitfall 2: Order Management Confusion
Pitfall 3: Direction Confusion
Last updated