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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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, PhantomProviderreferences/react-native-sdk.md: Expo config, polyfills, deep links, mobile authreferences/browser-sdk.md: BrowserSDK init, events, wallet discovery, vanilla JS
Solana patterns (transactions, gating, minting, payments):
references/transactions.md: SOL/SPL transfers, signing, fee estimationreferences/token-gating.md: client-side and server-side token-gated accessreferences/nft-minting.md: mint pages, Metaplex Core, compressed NFTsreferences/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
/ordercall 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 (
/orderserves 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_foundfrom DFlow: a likely cause is insufficient liquidity for the pair at that size; also check the mint addresses and thatamountis in atomic units
Examples
Example 1: React wallet connection
User says: "Add Phantom wallet login to my Next.js app"
Actions:
- Read
references/react-sdk.md - Install
@phantom/react-sdk - Wrap app in PhantomProvider with desired auth providers and appId
- Use
useModalhook for a connect button - Use
useAccountsto 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:
- Read
references/react-sdk.mdandreferences/token-gating.md - Set up wallet connection
- Query the BONK token balance for the connected wallet
- Conditionally render content based on balance threshold
- 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.
인기도
- GitHub 스타
- 7.0k
- 순위
- #13625
- 라이선스
- —
- 업데이트
- 2026. 10. 26.
댓글
- …
이 저장소의 다른 스킬
internet-court
7.0k에이전트가 다른 AI 에이전트나 유료 서비스와 안전하게 결제하거나 거래하도록 돕고, 적합한 전문 가이드를 알려 줍니다.
genlayer-erc7710-connector
7.0k에이전트가 GenLayer 검토 결과를 권한 시스템에 연결하도록 돕습니다. 나쁜 검토는 에이전트의 권한을 제한하거나 취소할 수 있습니다.
genlayer-intelligent-contracts
7.0k에이전트가 다른 에이전트가 위임받은 범위를 지켰는지 확인하는 AI 심판의 규칙, 증거, 결과를 정하도록 돕습니다.
x402-erc7710
7.0k에이전트가 웹 서비스 요금을 요청 한 건마다 결제하고, 권한 예산 안에서 지속적인 지출을 설정하도록 돕습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.