dflow-phantom-connect
Что он делает
Этот скилл охватывает создание веб- и мобильных приложений на Solana, которые подключаются к кошельку Phantom. Он также охватывает DFlow, который обеспечивает спотовый обмен токенов, актуальные цены и рыночные данные. Он нужен разработчикам, которые добавляют в приложение вход через кошелёк, платежи или торговлю.
Когда использовать
- ✓Когда вы хотите, чтобы пользователи подключали кошелёк Phantom в приложении на React, React Native или обычном JavaScript.
- ✓Когда вы хотите добавить страницы с доступом по токену, минт NFT или криптоплатежи в Solana.
- ✓Когда вы хотите, чтобы приложение обменивало токены или показывало актуальные цены через DFlow.
Ссылка на скилл
https://github.com/internet-court/internet-court-skill/blob/main/vendored/dflow/dflow-phantom-connect/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Я хочу, чтобы моё веб-приложение позволяло пользователям подключить кошелёк 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, у каждого свой SDK Phantom.
Может ли он также заниматься минтом 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
- Лицензия
- —
- Обновлён
- 26.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
internet-court
7.0kПомогает агенту безопасно платить, нанимать или работать с другим ИИ-агентом или платной услугой и указывает нужное специализированное руководство.
genlayer-erc7710-connector
7.0kПомогает агенту связать результат ИИ-проверки с системой разрешений, чтобы плохая оценка могла ограничить или отозвать разрешения агента.
genlayer-intelligent-contracts
7.0kПомогает агенту задать правила, доказательства и результаты ИИ-судьи, который проверяет, выполнил ли другой агент свой мандат.
x402-erc7710
7.0kПомогает агенту платить за веб-сервисы по одному запросу и настраивать регулярные расходы, которые остаются в пределах бюджета разрешения.
Похожие скиллы
angular-developer
280kПомогает агенту писать код на Angular и советовать по структуре проекта. Полезен для новых проектов, создания частей кода и улучшения производительности.
frontend-a11y
280kПомогает агенту делать веб-интерфейсы доступными для всех, чтобы сайты и приложения работали с программами чтения с экрана и клавиатурой.
frontend-patterns
280kАгент применяет современные паттерны фронтенд-разработки: оптимизирует производительность, управляет состоянием и следует практикам React и Next.js.