Installation
Install the Magic Router SDK using your preferred package manager:Basic Setup
Import the SDK functions you need:Understanding the Fundamentals
Before diving into usage examples, it’s important to understand the core concepts behind Magic Router SDK. These concepts explain why certain methods exist and how they optimize your transaction flow.Core Concepts
Learn about account delegation, blockhash management, and validator selection in the Magic Router ecosystem.
Basic Usage Examples
Preparing Transactions (Browser Wallets)
UseprepareMagicTransaction
when working with browser wallets that handle signing:
Sending Transactions (Local Signers)
UsesendMagicTransaction
when you have local signers or session keys: