Phantom Connect and SDKs
What is Phantom Connect?
Phantom Connect is the recommended way to integrate Phantom into your app. It provides a unified authentication experience using social login (Google or Apple) or browser extension connection. Phantom Connect is available through our SDKs:- React SDK for React web apps
- React Native SDK for mobile apps
- Browser SDK for vanilla JavaScript
What’s the difference between embedded and extension wallets?
Embedded wallets are created through Phantom Connect using social login (Google or Apple). Users don’t need to install any browser extension—the wallet is managed by Phantom and accessible across devices. Extension wallets are traditional self-custody wallets where users install the Phantom browser extension or mobile app and manage their own recovery phrase. Phantom Connect supports both. SetproviderType: "embedded" for embedded wallets or providerType: "extension" to connect to installed Phantom wallets.
Which SDK should I use?
| Your app type | Recommended SDK |
|---|---|
| React web app | React SDK |
| Next.js app | React SDK |
| React Native / Expo mobile app | React Native SDK |
| Vanilla JavaScript / other frameworks | Browser SDK |
Do I need to set up Phantom Portal?
Yes. Before using any Phantom Connect SDK, you need to:- Create an account in Phantom Portal
- Create an app and configure your branding
- Verify your domain
- Get your App ID
Which blockchains does Phantom Connect support?
Phantom Connect supports Solana, Ethereum, Base, Polygon, Bitcoin, and Sui. You can enable multiple chains simultaneously by configuringaddressTypes in your SDK setup.
Can users connect with both social login and extension?
Yes. Phantom Connect handles both authentication methods. When a user connects, they can choose to sign in with Google/Apple (embedded wallet) or connect their existing Phantom extension wallet.Browser extension integration
Why can’t I access Phantom on my website?
Phantom will only inject its provider into websites that begin withhttps://, or if the host is localhost or 127.0.0.1. If your website only uses http://, Phantom will not inject its provider and you will not be able to access the methods found at window.phantom. Encrypting your web traffic and upgrading to https:// will restore functionality.
Phantom will also not inject its provider into any iframe.
Are hardware wallets supported?
Yes, Phantom currently supports Ledger hardware wallets and requires no special treatment on the application side.Tokens and NFTs
Why isn’t my token displaying properly?
Phantom supports the Token Metadata Standard established by Metaplex. When displaying tokens, Phantom will first categorize them according to their TokenStandard. If a token is consideredFungible, Phantom will display it on the Home tab. Otherwise, Phantom will display it as a Collectible. For more details, see Token Display documentation.
What types of NFTs are supported?
Phantom supports a range of NFT media types including images, audio files, video files, and 3D models. At this time, Phantom does not support HTML files. For a full list of the types of NFTs that Phantom can display, see Supported media types.Wallet behavior
How does Phantom import wallet addresses?
When importing addresses from an existing recovery phrase (also known as a seed phrase), Phantom will scan for 20 addresses in each of our three supported derivation paths (bip44change, bip44, and a deprecated path), for a total of 60 addresses. For the convenience of the user, Phantom will filter this list of addresses down to wallets that have ever had signatures (have ever been used). Phantom will then sort this filtered list based on how many signatures each wallet has had plus the amount of lamports it currently owns.
Why does Phantom prepend an additional instruction on standard SPL token transfers?
When transferring SPL tokens, Phantom will first double check if a token account exists for the recipient you are sending to. If one does not exist, Phantom will help you create an Associated Token Account on the recipient’s behalf. To do this check, Phantom calls a deployment of the Serum Assert Owner program. The program address of this deployment isDeJBGdMFa1uynnnKiwrVioatTuHmNLpyFKnmB5kaFdzQ and is available on Solana’s Devnet, Testnet, and Mainnet. This program has been in use since 2021. It was deployed by the Phantom team to keep this program address consistent across networks.
Troubleshooting
Why am I seeing a “new domain” warning?
When your app or website is newly launched, Phantom may show users a warning that the domain is new or has not been reviewed. This warning typically disappears automatically after a few days. If the warning persists for more than a week, see Domain and transaction warnings for next steps.Why is my transaction showing a security warning?
If Phantom can’t accurately simulate a transaction, users may see a warning message. This can happen when:- The transaction has multiple signers
- The transaction approaches Solana’s size limit
- The transaction would fail during simulation