본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)7.0k · #13625

dflow-phantom-connect

하는 일

이 스킬은 Phantom 지갑에 연결되는 Solana 웹 및 모바일 앱을 만드는 방법을 다룹니다. 또한 현물 토큰 스왑, 실시간 가격, 시장 데이터를 처리하는 DFlow도 다룹니다. 앱에 지갑 로그인, 결제, 거래를 추가하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓React, React Native 또는 순수 JavaScript 앱에서 사용자가 Phantom 지갑을 연결하게 하고 싶을 때.
  • ✓Solana에 토큰 게이팅 페이지, NFT 민팅, 암호화폐 결제를 추가하고 싶을 때.
  • ✓DFlow로 앱에서 토큰을 스왑하거나 실시간 가격을 보여 주고 싶을 때.

스킬 링크

https://github.com/internet-court/internet-court-skill/blob/main/vendored/dflow/dflow-phantom-connect/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/internet-court/internet-court-skill/blob/main/vendored/dflow/dflow-phantom-connect/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 웹 앱에서 사용자가 Phantom 지갑을 연결하고 DFlow로 토큰을 스왑할 수 있게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 여러분의 프레임워크와 작업에 맞는 참고 자료를 고르고, 지갑을 연결하고 메시지나 트랜잭션에 서명을 요청하며, DFlow에 견적과 스왑을 요청하는 코드를 작성합니다. 코드를 쓰기 전에 관련된 참고 자료를 모두 읽습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Phantom Connect + DFlow Skill

Instructions

Step 1: Identify What the User Wants to Build

Determine the domain, then route to the right references.

Wallet connection and Solana interactions:

  • Connecting a Phantom wallet (React, React Native, vanilla JS)
  • Signing messages or transactions
  • Token-gated access
  • NFT minting
  • Crypto payments
  • Solana transfers (SOL or SPL tokens)

DFlow trading & market data:

  • Spot token swaps (quote, sign, submit, confirm)
  • Live prices, order-book depth, or priority-fee streaming

Many tasks combine both (for example, a swap UI needs wallet connection AND DFlow trading). Read all relevant references before writing code.

Step 2: Read the Relevant References

Phantom Connect SDKs (wallet connection, signing, auth):

  • references/react-sdk.md: React hooks, components, theming, PhantomProvider
  • references/react-native-sdk.md: Expo config, polyfills, deep links, mobile auth
  • references/browser-sdk.md: BrowserSDK init, events, wallet discovery, vanilla JS

Solana patterns (transactions, gating, minting, payments):

  • references/transactions.md: SOL/SPL transfers, signing, fee estimation
  • references/token-gating.md: client-side and server-side token-gated access
  • references/nft-minting.md: mint pages, Metaplex Core, compressed NFTs
  • references/payments.md: SOL/USDC payments, checkout with backend verification

DFlow (swaps, streaming):

  • references/dflow-crypto-trading.md: spot swaps via /order (atomic units, base58 mints, quote-without-wallet, priority/platform/sponsor fees)
  • references/dflow-websockets.md: real-time quote, order-book, and priority-fee streaming (browser proxies through the backend)

Step 3: Ask the Right Questions

Before implementing, ask questions based on the domain:

For Phantom Connect tasks:

  • Which platform? (React, React Native, vanilla JS)
  • Do they need social login (Google/Apple) or extension only?

For DFlow tasks:

  • Do you have a DFlow API key? (Yes: prod host with x-api-key. No: dev host, rate-limited. Prod key: pond.dflow.net/get-started/api-key.) It's one key for everything DFlow.
  • Client environment? (web, mobile, backend, CLI) Browser apps keep the key on the backend and proxy DFlow HTTP and WebSocket through it.
  • Platform fees? If yes, what bps and which builder-owned fee account (which must already exist)?

Step 4: Implement

Follow the patterns in the reference files. Key rules by domain:

Phantom Connect:

  • All SDK details (provider setup, hooks, components, auth providers) are in the SDK reference files. Read them before writing Phantom integration code.

DFlow:

  • Trades are synchronous: one /order call returns a signed-ready transaction that you sign, submit, and confirm.
  • As a security best practice, keep the DFlow API key on the backend, not in browser code. Browser apps proxy DFlow HTTP (/order serves no CORS) and the WebSocket streams through their backend.
  • Dev endpoints (dev-quote-api.dflow.net) work without a key but are rate-limited; production requires a key from pond.dflow.net/get-started/api-key. In production, quote and book stream access is granted per key.

Step 5: Handle Errors

Each reference file contains domain-specific error handling. Key cross-cutting concerns:

  • User rejects a transaction or signature request
  • Wallet not connected when a signed action is attempted
  • DFlow API returns 429 (rate limited): retry with backoff or get a production API key
  • route_not_found from DFlow: a likely cause is insufficient liquidity for the pair at that size; also check the mint addresses and that amount is in atomic units

Examples

Example 1: React wallet connection

User says: "Add Phantom wallet login to my Next.js app"

Actions:

  1. Read references/react-sdk.md
  2. Install @phantom/react-sdk
  3. Wrap app in PhantomProvider with desired auth providers and appId
  4. Use useModal hook for a connect button
  5. Use useAccounts to display the connected wallet address

Result: Working wallet connection with social login and extension support

Example 2: Token-gated page

User says: "Build a page that only BONK holders can see"

Actions:

  1. Read references/react-sdk.md and references/token-gating.md
  2. Set up wallet connection
  3. Query the BONK token balance for the connected wallet
  4. Conditionally render content based on balance threshold
  5. For production: add server-side signature verification

Result: Pa

자주 묻는 질문

지갑 연결은 어떤 프레임워크를 지원하나요?

React, React Native, 순수 브라우저 JavaScript를 지원하며, 각각 별도의 Phantom SDK가 있습니다.

NFT 민팅과 결제도 다룰 수 있나요?

네. 이 스킬은 NFT 민팅, 토큰 게이팅, SOL 또는 USDC 결제에 대한 참고 자료를 포함합니다.

DFlow 스왑은 어떻게 작동하나요?

견적 받기, 서명, 제출, 스왑 확인의 단계를 따릅니다.

상세 정보

작성자의 원본 설명

Build Solana wallet-connected apps with Phantom Connect SDKs and DFlow spot trading. Use when user asks to connect a Phantom wallet, integrate Phantom in React, React Native, or vanilla JS, sign messages or transactions, build token-gated pages, mint NFTs, accept crypto payments, or swap/stream tokens with DFlow. Covers @phantom/react-sdk, @phantom/react-native-sdk, @phantom/browser-sdk, and DFlow spot trading and market-data streaming. Do NOT use for Ethereum or EVM wallet integrations, or non-DFlow DEX routing.

repo: internet-court/internet-court-skill

인기도

GitHub 스타
7.0k
순위
#13625
라이선스
—
업데이트
2026. 10. 26.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬