The Server SDK is currently experimental and not ready for production use.
Signing and Sending Transactions
This guide covers how to sign and send transactions using the Phantom Server SDK across different blockchain networks.Overview
The SDK provides a simple, unified interface that handles both signing AND sending transactions:The
signAndSendTransaction
method does two things automatically:- Signs the transaction with the wallet’s private key
- Submits the signed transaction to the blockchain network
Basic Solana Transfer
Here’s a complete example of sending SOL from one address to another:Complete Example with Priority Fees
Based on the SDK demo, here’s how to send a transaction with priority fees:Key Points to Remember
- The SDK handles both signing AND sending - You don’t need to manually submit transactions
- Always use fresh blockhashes - Get a new blockhash right before creating the transaction
- Extract signatures from the result - The SDK returns the signed transaction, not the signature directly
- Handle confirmations separately - The SDK sends the transaction but doesn’t wait for confirmation
- Use proper error handling - Network issues and blockchain errors can occur