Skip to main content
The Server SDK is currently experimental and not ready for production use. Reach out to partnerships@phantom.com for access.
This guide covers how to sign and send transactions using the Phantom Server SDK across different blockchain networks.

Overview

The SDK provides two methods for handling transactions:
  • signAndSendTransaction signs the transaction and submits it to the network in one step.
  • signTransaction signs the transaction and returns it without submitting. Use this when you need to broadcast the transaction yourself or inspect the signed payload before sending.

Sign without sending

Use signTransaction when you want to sign a transaction without broadcasting it. This is useful when:
  • You want to broadcast via your own RPC endpoint or a relay service.
  • You need to inspect the signed transaction before sending.
  • You are collecting multiple signatures before submission.

Solana example

Ethereum example

Sign and send

Use signAndSendTransaction when you want the SDK to handle both signing and network submission.

Basic Solana transfer

The following is a complete example of sending SOL from one address to another:

Complete example with priority fees

Based on the SDK demo, the following example shows how to send a transaction with priority fees:

Best practices

  • 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.

Next steps

Disclaimers

The Server SDK is a beta version, and Phantom will not be liable for any losses or damages suffered by you or your end users. Any suggestions, enhancement requests, recommendations, or other feedback provided by you regarding the Server SDK will be the exclusive property of Phantom. By using this beta version and providing feedback, you agree to assign any rights in that feedback to Phantom.