The Server SDK is currently experimental and not ready for production use. Reach out to partnerships@phantom.com for access.
Overview
The Phantom Server SDK enables backend applications to securely create and manage wallets, sign transactions, and interact with multiple blockchains programmatically. This enterprise-grade solution is designed for server-side applications that require secure, scalable wallet infrastructure.What is the Phantom Server SDK?
The Server SDK is a Node.js library that provides programmatic access to Phantom’s wallet infrastructure from your backend services. Unlike browser-based wallet interactions, the Server SDK allows you to:- Create and manage wallets on behalf of your users
- Sign transactions without sending, or sign and submit in one step
- Sign messages for authentication and verification
- Submit transactions to multiple blockchains
Key features
- Works with Solana, Ethereum, Polygon, Sui, Bitcoin, Base, and other major blockchains.
- Enterprise-grade security with cryptographic authentication and secure key management.
- Full API access for wallet creation, transaction signing, and blockchain interactions.
- Built to handle high-volume apps with efficient wallet management and pagination.
Use cases
The Server SDK is ideal for:- Gaming platforms: Create seamless blockchain gaming experiences without requiring users to manage wallets.
- DeFi apps: Automate complex DeFi interactions and transaction flows.
- NFT marketplaces: Enable smooth NFT minting and trading experiences.
- Enterprise solutions: Build blockchain apps for businesses with compliance requirements.
Documentation overview
Get started
Learn the basics of the Server SDK, installation, and initial setup.Get started →
Integration guide
Follow our comprehensive guide to integrate the SDK into your backend app.Integration guide →
Create wallets
Learn how to programmatically create and manage wallets for your users.Create wallets →
Sign transactions
Understand how to sign and submit transactions across different blockchains.Sign transactions →
Sign messages
Learn how to sign arbitrary messages for authentication and verification.Sign messages →
API reference
Complete reference documentation for all SDK methods and types.API reference →
Prerequisites
- Register your app: Sign up or log in to the Phantom Portal and register your app.
- Get your App ID:
- In the portal, expand your app in the left navigation, then select Set Up.
- Your App ID appears at the top of the page.
Quick start
Step 1: Set up environment variables
Create a.env file in your project root:
Step 2: Initialize the SDK
Usage examples
Creating a wallet
Signing and sending transactions
Solana-native Web3.js transaction objects
Ethereum/EVM-transaction objects
Raw formats-hex strings and bytes
Signing messages
Managing wallets
Network support
The Server SDK uses theNetworkId enum to identify blockchain networks for signing transactions and messages.
Solana networks
NetworkId.SOLANA_MAINNET: Solana mainnet-betaNetworkId.SOLANA_DEVNET: Solana devnetNetworkId.SOLANA_TESTNET: Solana testnet
Ethereum networks
NetworkId.ETHEREUM_MAINNET: Ethereum mainnetNetworkId.ETHEREUM_SEPOLIA: Sepolia testnet
Polygon networks
NetworkId.POLYGON_MAINNET: Polygon mainnet (Chain ID: 137)NetworkId.POLYGON_AMOY: Polygon Amoy testnet (Chain ID: 80002)
Base networks
NetworkId.BASE_MAINNET: Base mainnet (Chain ID: 8453)NetworkId.BASE_SEPOLIA: Base Sepolia testnet (Chain ID: 84532)
Arbitrum networks
NetworkId.ARBITRUM_ONE: Arbitrum One (Chain ID: 42161)NetworkId.ARBITRUM_SEPOLIA: Arbitrum Sepolia testnet (Chain ID: 421614)
Monad networks
NetworkId.MONAD_MAINNET: Monad mainnet (Chain ID: 143)NetworkId.MONAD_TESTNET: Monad testnet (Chain ID: 10143)
Future support
NetworkId.BITCOIN_MAINNET: Bitcoin mainnetNetworkId.BITCOIN_TESTNET: Bitcoin testnetNetworkId.SUI_MAINNET: Sui mainnetNetworkId.SUI_TESTNET: Sui testnetNetworkId.SUI_DEVNET: Sui devnet
Support
- Documentation issues: Open an issue on our GitHub repository.
- Access requests: Contact partnerships@phantom.com.
- Technical support: Available for enterprise customers.
Ready to get started? Check out our Get started guide to begin building with the Phantom Server SDK.
What you can do
Get started
Install and initialize the Server SDK in your backend
Create wallets
Programmatically create and manage wallets for your users
Sign transactions
Sign and send transactions across multiple blockchains
Sign messages
Sign messages for authentication and verification
Integration guide
Complete guide to integrating the Server SDK
API reference
Complete API documentation for all SDK methods
Additional resources
SDK overview
Compare all Phantom SDKs and choose the right one
Request access
Contact us to get access to the Server SDK
Developer support
Get help from our developer support team