Skip to main content
The Server SDK is currently experimental and not ready for production use. Reach out to partnerships@phantom.com for access.

Critical security information

The private key for your organization is meant to be stored only on your server, in a secure environment.
  • Never expose this key in client-side code.
  • Never commit it to version control.
  • Store it securely using environment variables or secret management systems.

Installation

Install the Server SDK using your preferred package manager:

Prerequisites

Before using the SDK, you need:
  • Phantom organization credentials, provided when you create an organization with Phantom:
    • Organization ID
    • Organization private key (base58 encoded)
    • App ID
  • Node.js version 16 or higher.

Quick start

Step 1: Set up environment variables

Create an .env file in your project root:

Step 2: Initialize the SDK

Network support

The SDK supports multiple blockchain networks through the NetworkId enum:

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

Next steps

Troubleshooting

”organizationId and appId are required” error

Solutions:
  • Ensure all required config parameters are provided.
  • Check for typos in parameter names.

”Failed to create wallet” error

Solutions:
  • Verify your organization credentials are correct.
  • Check network connectivity to the API endpoint.
  • Ensure your organization has wallet creation permissions.

Transaction signing fails

Solutions:
  • Verify the wallet ID exists and belongs to your organization.
  • Check that the transaction is properly formatted.
  • Ensure you’re using the correct network ID.

”Unsupported network ID” error

Solutions:
  • Use one of the predefined NetworkId enum values.
  • Check that the network is supported for your operation.

Need help?

Support

Get help from developer support team

Example apps

Review the example apps

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.