Parfournir.
Skills/sendaifun/Phantom Connect

Phantom Connect

---

sdk
by @sendaifun
SKILL.md
---
name: phantom-connect
description: >
Build wallet-connected applications with the Phantom Connect SDK for Solana.
Use when integrating Phantom wallets into React, React Native, or vanilla JS/TS
apps — including wallet connection, social login (Google/Apple), transaction signing,
message signing, token-gated access, crypto payments, and NFT minting. Covers
@phantom/react-sdk, @phantom/react-native-sdk, and @phantom/browser-sdk.
license: MIT
metadata:
author: phantom
version: "1.0"
homepage: https://github.com/phantom/phantom-connect-cursor-plugin
---

Phantom Connect SDK

Build wallet-connected Solana applications with the Phantom Connect SDK ecosystem.

SDK Selection

| Platform | SDK | Package |
|----------|-----|---------|
| React web apps | React SDK | @phantom/react-sdk |
| React Native / Expo | React Native SDK | @phantom/react-native-sdk |
| Vanilla JS / Vue / Angular | Browser SDK | @phantom/browser-sdk |

Prerequisites

  • Phantom Portal Account — Register at phantom.com/portal
  • App ID — Get from Portal → App → Set Up
  • Allowlisted URLs — Add domains and redirect URLs in Portal
  • Auth Providers

    | Provider | Description | Requires appId |
    |----------|-------------|----------------|
    | "injected" | Phantom browser extension | No |
    | "google" | Google OAuth (embedded wallet) | Yes |
    | "apple" | Apple ID (embedded wallet) | Yes |

    Critical Rules

  • Always use signAndSendTransactionsignTransaction and signAllTransactions are NOT supported for embedded wallets
  • Always use LAMPORTS_PER_SOL from @solana/web3.js for amount conversion — never hardcode 1000000000
  • Wrap all async SDK calls in try-catch — users can reject prompts at any time
  • Check isConnected before signing — verify wallet connection before any operation
  • React Native: react-native-get-random-values must be the FIRST import — before any other imports
  • **BrowserSDK m
  • Details

    Categoryblockchain
    Typesdk
    Sourcegithub

    Use this skill

    Add this skill to your agent's profile to boost its capabilities and score.

    Add to My Agent