near-intents
Skill này làm gì
Skill này bao quát hoán đổi token giữa nhiều blockchain bằng NEAR Intents 1Click API, hoạt động qua các chuỗi EVM, Solana, NEAR, TON, Stellar và Tron. Skill dành cho lập trình viên xây widget hoán đổi, trang cầu nối hoặc script chuyển tiền đa blockchain.
Khi nào nên dùng
- ✓Khi bạn muốn xây widget hoán đổi để chuyển token giữa các blockchain.
- ✓Khi bạn cần giao diện cầu nối để chuyển tài sản giữa các blockchain khác nhau.
- ✓Khi bạn muốn một script phía máy chủ lấy báo giá hoán đổi và theo dõi trạng thái.
Liên kết skill
https://github.com/internet-court/internet-court-skill/blob/main/vendored/near/near-intents/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn có một widget hoán đổi trên trang web để người dùng chuyển token giữa Solana và Ethereum.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent lấy danh sách token được hỗ trợ, yêu cầu báo giá, rồi tạo giao dịch nạp tiền trên blockchain nguồn. API cung cấp địa chỉ nạp và tự động giao token kết quả, còn agent kiểm tra trạng thái cho tới khi hoán đổi hoàn tất.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
NEAR Intents Integration
Cross-chain token swaps via 1Click REST API. Get a quote, API provides deposit addresses, you build the deposit transaction and receive the resulting token automatically.
Quick Start - Pick Your Path
| Use Case | Start Here |
|---|---|
| React App | react-swap-widget.md - Example showing the pattern |
| Node.js / Script | server-example.md - Example showing the pattern |
| API Reference | api-quote.md → api-tokens.md → api-status.md |
| Chain-specific Deposits | deposit-{chain}.md |
Integration Flow
GET /v0/tokens → POST /v0/quote (dry) → POST /v0/quote (wet) → Deposit TX → POST /v0/deposit/submit → GET /v0/status
Rule Categories
| Priority | Category | Files |
|---|---|---|
| 1 | Examples | react-swap-widget.md, server-example.md |
| 2 | API | api-quote.md, api-tokens.md, api-status.md, api-deposit-submit.md |
| 3 | Deposits | deposit-evm.md, deposit-solana.md, deposit-near.md, deposit-ton.md, deposit-tron.md, deposit-stellar.md |
| 4 | React Hooks | react-hooks.md |
| 5 | Advanced | intents-balance.md, passive-deposit.md |
Critical Knowledge
- Use
assetIdfrom /v0/tokens - never construct manually dry: true= preview only,dry: false= get deposit address (valid ~10 min)- Poll status until terminal:
SUCCESS,FAILED,REFUNDED,INCOMPLETE_DEPOSIT - Chain-to-chain is default -
depositTypeandrecipientTypedefault to chain endpoints
Index
Examples (HIGH)
- react-swap-widget - Minimum viable React swap implementation with wagmi
- server-example - Node.js script for server-side swaps
API Reference (CRITICAL)
- api-tokens - Fetch supported tokens, cache result
- api-quote - Get swap quote, dry=true for preview, dry=false for deposit address
- api-deposit-submit - Notify API after deposit to speed up processing
- api-status - Poll until terminal state (SUCCESS, FAILED, REFUNDED)
- api-any-input-withdrawals - Query withdrawals for ANY_INPUT quotes
Chain Deposits (HIGH)
- deposit-evm - Ethereum, Base, Arbitrum, Polygon, BSC transfers
- deposit-solana - Native SOL and SPL token transfers
- deposit-near - NEP-141 token transfers via wallet selector
- deposit-ton - Native TON transfers via TonConnect
- deposit-tron - Native TRX and TRC-20 transfers
- deposit-stellar - Stellar transfers (MEMO REQUIRED)
React Hooks (MEDIUM)
- react-hooks - Reusable hooks for tokens, quotes, status polling
Advanced (LOW)
- intents-balance - Hold balances in intents.near for faster swaps
- passive-deposit - QR code flow for manual transfers
References
- concepts - Swap lifecycle, statuses, CEX warning, authentication
Resources
Câu hỏi thường gặp
Lấy mã định danh token ở đâu?
Skill khuyên dùng assetId từ endpoint danh sách token và không tự tạo bằng tay.
Chế độ dry làm gì?
Báo giá dry chỉ xem trước việc hoán đổi. Báo giá không dry trả về một địa chỉ nạp có hiệu lực khoảng 10 phút.
Những blockchain nào được hỗ trợ?
Các chuỗi EVM, Solana, NEAR, TON, Stellar và Tron.
Chi tiết
Mô tả gốc của tác giả
Cross-chain token swap integration using NEAR Intents 1Click API. Use when building swap widgets, bridge interfaces, or multi-chain transfers across EVM, Solana, NEAR, TON, Stellar, and Tron.
Độ phổ biến
- Sao GitHub
- 7.0k
- Vị trí xếp hạng
- #13654
- Giấy phép
- —
- Cập nhật
- 26/10/2026
Bình luận
- …
Thêm skill từ kho mã này
internet-court
7.0kGiúp agent của bạn thanh toán, thuê hoặc giao dịch an toàn với một agent AI khác hoặc dịch vụ trả phí, và chỉ đến hướng dẫn chuyên sâu phù hợp.
genlayer-erc7710-connector
7.0kGiúp agent của bạn kết nối kết quả đánh giá AI với hệ thống quyền hạn, để một đánh giá xấu có thể hạn chế hoặc hủy quyền của agent.
genlayer-intelligent-contracts
7.0kGiúp agent của bạn xác định quy tắc, bằng chứng và đầu ra của một AI judge kiểm tra xem agent khác có làm đúng nhiệm vụ được ủy quyền hay không.
x402-erc7710
7.0kGiúp agent của bạn trả tiền cho dịch vụ web theo từng yêu cầu, và thiết lập chi tiêu định kỳ nằm trong ngân sách quyền hạn.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.