Phantom Developer Guide: Building with the Crypto Wallet

·

Phantom is a leading self-custodial cryptocurrency wallet that enables users to securely manage digital assets and seamlessly interact with decentralized applications (dApps). It provides a unified experience across multiple major blockchain networks.

This guide is designed for developers seeking to integrate their applications with the Phantom wallet ecosystem.

Core Features and Supported Networks

Phantom empowers users by generating and securely managing their private keys. These keys are used to store funds and cryptographically sign transactions, ensuring users maintain full control over their assets.

The wallet offers broad multi-chain support, allowing interaction with dApps and assets on several leading networks:

This multi-chain capability allows developers to reach a wide user base without being limited to a single blockchain.

Available Platforms for Integration

Developers can build experiences for Phantom users across different platforms:

How Phantom Integrates with Web Applications

Phantom enables dApp connectivity through a secure, injected provider. When a user with the Phantom extension visits a website, the wallet injects a phantom object into the JavaScript context of that site.

This injected provider serves as the primary bridge for communication. Through it, a web application can:

This process ensures that user interactions are secure and require explicit approval, maintaining the self-custodial principles of the wallet.

Connecting with Mobile Applications

For native mobile applications, integration is achieved through universal links and deep links. This method allows an external mobile app to prompt its user to open Phantom to perform specific actions.

The deep linking workflow typically follows these steps:

  1. The user initiates an action (e.g., a connection or signing request) within a third-party mobile app.
  2. The app triggers a deep link that opens the Phantom mobile application.
  3. The user reviews and approves the action directly within Phantom.
  4. Upon completion, Phantom redirects the user back to the original referring application.

This seamless flow is essential for providing a smooth user experience in the mobile ecosystem. To explore the complete technical specifications for implementing these deep links, you can review the official deep linking documentation.

Getting Started as a Developer

This documentation portal provides comprehensive guides, API references, and best practices for integrating with Phantom. Whether you are building a new dApp, a decentralized exchange (DEX), or an NFT platform, these resources will help you get started.

For developers working specifically within the Solana ecosystem, a dedicated guide is available to help you begin your integration journey.

Frequently Asked Questions

What is a self-custodial wallet?
A self-custodial wallet like Phantom gives you complete ownership and control of your private keys and, consequently, your digital assets. Unlike custodial wallets held by exchanges, you are solely responsible for securing your funds, with no third party having access.

Which blockchains can I build for using Phantom's SDK?
The Phantom wallet SDK supports integration with Solana, Ethereum, Polygon, Base, and Bitcoin. This allows you to build dApps that can interact with users' assets across these major networks through a single, unified interface.

How does the injected provider work in a browser?
The Phantom browser extension adds a secure phantom object to the window scope of websites. Your dApp can detect this object and use it to request connections, transactions, and signatures from the user's wallet, all without compromising their private keys.

What are deep links used for in mobile integration?
Deep links are used to create a handoff between a third-party mobile application and the Phantom wallet app. They enable actions like signing a transaction to be completed securely within Phantom before the user is returned to your app with the result.

Where can I get help if I encounter issues during development?
For technical integration issues and development questions, the Phantom team maintains active developer forums on GitHub where you can seek help from the community and core contributors.

Is there a cost or fee for integrating with Phantom?
Integrating your application with Phantom is free. There are no associated SDK costs or fees for using the wallet's connection protocols. Standard network gas fees still apply for on-chain transactions.