The Magic Router SDK is a TypeScript library that simplifies transaction preparation and routing for MagicBlock’s Ephemeral Rollups infrastructure. Instead of manually determining whether transactions should execute on Solana mainnet or an Ephemeral Rollup, the SDK handles this complexity automatically through intelligent metadata analysis.
The SDK automatically fetches the correct blockhash for your transaction’s writable accounts, ensuring compatibility with both Ephemeral Rollups and Solana mainnet.
Validator Discovery
Automatically identifies and connects to the closest available validator for optimal transaction performance.
Flexible Signing Options
Supports both browser wallet integration and programmatic signing with local signers or session keys.
Account Analysis
Built-in utilities to extract and analyze writable accounts from transactions for intelligent routing decisions.