跳到正文
Skillpedia
API 与服务器(后端)7.0k · #13654

near-intents

它能做什么

这项技能涵盖使用 NEAR Intents 1Click API 进行的跨链代币兑换。该 API 可在 EVM 链、Solana、NEAR、TON、Stellar 和 Tron 之间工作,适合开发兑换组件、跨链桥页面或多链转账脚本的开发者。

适用场景

  • ✓当你想构建一个在链之间转移代币的兑换组件的时候。
  • ✓当你需要在不同区块链之间转账的跨链桥界面时。
  • ✓当你想要一个服务器脚本,用来获取兑换报价并跟踪其状态的时候。

技能链接

https://github.com/internet-court/internet-court-skill/blob/main/vendored/near/near-intents/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/internet-court/internet-court-skill/blob/main/vendored/near/near-intents/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我希望我的网站上有一个兑换组件,让用户在 Solana 和以太坊之间转移代币。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会获取受支持代币的列表,请求报价,然后在源链上构建一笔存款交易。API 会提供存款地址,并自动交付兑换得到的代币。智能体会检查状态,直到兑换完成。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

  1. Use assetId from /v0/tokens - never construct manually
  2. dry: true = preview only, dry: false = get deposit address (valid ~10 min)
  3. Poll status until terminal: SUCCESS, FAILED, REFUNDED, INCOMPLETE_DEPOSIT
  4. Chain-to-chain is default - depositType and recipientType default to chain endpoints

Index

  1. Examples (HIGH)

  2. API Reference (CRITICAL)

  3. Chain Deposits (HIGH)

  4. React Hooks (MEDIUM)

    • react-hooks - Reusable hooks for tokens, quotes, status polling
  5. Advanced (LOW)

  6. References

    • concepts - Swap lifecycle, statuses, CEX warning, authentication

Resources

常见问题

我在哪里获取代币标识符?

该技能要求使用代币列表端点中的 assetId,绝不要手动构建。

dry 模式有什么作用?

dry 报价只预览兑换。非 dry 报价会返回一个存款地址,该地址大约 10 分钟内有效。

涵盖哪些链?

EVM 链、Solana、NEAR、TON、Stellar 和 Tron。

详情

作者的原始描述

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.

repo: internet-court/internet-court-skill

热度

GitHub 星标
7.0k
排名
#13654
许可证
—
更新时间
2026/10/26

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能