xrpl-dev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseXRPL Development Skill
XRPL开发技能
What this Skill is for
本技能的用途
Use this Skill when the user asks for:
- XRPL dApp development (any language/framework)
- Scaffolding a new XRPL project
- Frontend wallet connection (Crossmark, Xaman, GemWallet)
- Account creation, funding, and management
- Transaction building, signing, and submission
- Token operations (TrustLines, issued currencies, MPTs)
- NFT operations (XLS-20 NFTokens)
- DEX interactions (offers, order books, path finding)
- AMM (Automated Market Maker) operations
- Cross-chain interoperability (Axelar bridge, XRPL EVM sidechain)
- Payment channels, escrows, and checks
- Security review of XRPL transactions and integrations
用户询问以下内容时可使用本技能:
- XRPL dApp开发(任何语言/框架)
- 搭建新XRPL项目脚手架
- 前端钱包连接(Crossmark、Xaman、GemWallet)
- 账户创建、注资与管理
- 交易构建、签名与提交
- 代币操作(TrustLine、发行货币、MPT)
- NFT操作(XLS-20 NFTokens)
- DEX交互(报价、订单簿、路径查找)
- AMM(自动做市商)操作
- 跨链互操作性(Axelar桥、XRPL EVM侧链)
- 支付通道、托管与支票
- XRPL交易与集成的安全评审
Default stack decisions (opinionated)
默认技术栈决策(带主观倾向)
-
Scaffolding: create-xrp
- For new projects, start with .
npx create-xrp my-app - Scaffolds a Turborepo monorepo with Next.js (React) or Nuxt (Vue).
- Pre-configured: wallet connection, network switching, Tailwind CSS, transaction UI.
xrpl-connect - Smart contract support is experimental — skip it by default.
- For new projects, start with
-
Client SDK: xrpl.js first (JavaScript/TypeScript)
- Use for all new JS/TS client code.
xrpl - For Python projects, use .
xrpl-py - For Java/Kotlin, use .
xrpl4j
- Use
-
Frontend: xrpl-connect first
- Use for all wallet connection and signing UX.
xrpl-connect - Framework-agnostic web component (), works with React, Vue, Next.js, Nuxt, vanilla JS.
<xrpl-wallet-connector> - Built-in adapters for Xaman, Crossmark, GemWallet, WalletConnect, and Ledger.
- Event-driven handles connection state, session persistence, and auto-reconnect.
WalletManager
- Use
-
Network: testnet for development
- Always default to testnet ().
wss://s.altnet.rippletest.net:51233 - Use devnet for experimental/amendment features.
- Never hardcode mainnet endpoints in development code.
- Always default to testnet (
-
Transaction signing: local or wallet-delegated
- For backend/scripts: sign locally, never send secrets over the network.
- For frontend: delegate signing to the connected wallet.
- For production backends: prefer custodial signing services or hardware wallets.
-
Account management: reserves-aware
- Always check and communicate reserve requirements before operations.
- Base reserve (currently 10 XRP) + owner reserve (2 XRP per owned object).
- Warn users when operations will lock up reserves.
-
Error handling: explicit
- Always check status, not just submission
validated.tesSUCCESS - Handle codes (claimed-but-failed) differently from
tec*/tef*codes.tem* - Implement retry logic for and
terQUEUED.tefPAST_SEQ
- Always check
-
脚手架:create-xrp
- 对于新项目,使用启动。
npx create-xrp my-app - 会生成基于Turborepo的单体仓库,支持Next.js(React)或Nuxt(Vue)。
- 预配置:钱包连接、网络切换、Tailwind CSS、交易UI。
xrpl-connect - 智能合约支持尚处于实验阶段——默认跳过。
- 对于新项目,使用
-
客户端SDK:优先使用xrpl.js(JavaScript/TypeScript)
- 所有新的JS/TS客户端代码使用库。
xrpl - Python项目使用。
xrpl-py - Java/Kotlin项目使用。
xrpl4j
- 所有新的JS/TS客户端代码使用
-
前端:优先使用xrpl-connect
- 所有钱包连接和签名交互都使用实现。
xrpl-connect - 提供框架无关的Web组件(),可兼容React、Vue、Next.js、Nuxt、原生JS。
<xrpl-wallet-connector> - 内置Xaman、Crossmark、GemWallet、WalletConnect和Ledger的适配器。
- 事件驱动的可处理连接状态、会话持久化和自动重连。
WalletManager
- 所有钱包连接和签名交互都使用
-
网络:开发环境使用测试网
- 始终默认使用测试网()。
wss://s.altnet.rippletest.net:51233 - 实验性/新增功能使用开发网。
- 永远不要在开发代码中硬编码主网端点。
- 始终默认使用测试网(
-
交易签名:本地签名或钱包委托签名
- 后端/脚本场景:本地签名,永远不要通过网络发送密钥。
- 前端场景:将签名委托给已连接的钱包。
- 生产后端:优先使用托管签名服务或硬件钱包。
-
账户管理:预留金感知
- 操作前始终检查并告知用户预留金要求。
- 基础预留金(当前为10 XRP)+ 所有者预留金(每个所属对象2 XRP)。
- 当操作会锁定预留金时要向用户发出警告。
-
错误处理:显式处理
- 始终检查状态,而不仅是提交返回的
validated。tesSUCCESS - 区分处理错误码(已申报但失败)和
tec*/tef*错误码。tem* - 为和
terQUEUED错误实现重试逻辑。tefPAST_SEQ
- 始终检查
Operating procedure (how to execute tasks)
操作流程(如何执行任务)
1. Classify the task layer
1. 划分任务层级
- Scaffolding — new project setup
- Frontend/wallet layer — wallet connection, signing UX, displaying state
- Client/scripts layer — building or sending transactions, querying ledger state
- Token/asset layer — TrustLines, issued currencies, NFTs, MPTs
- DEX/AMM layer — offers, order books, AMM pools, path finding
- Interoperability layer — Axelar bridge, EVM sidechain
- Security review — cross-cutting concern
- 脚手架层——新项目搭建
- 前端/钱包层——钱包连接、签名交互、状态展示
- 客户端/脚本层——构建或发送交易、查询账本状态
- 代币/资产层——TrustLine、发行货币、NFT、MPT
- DEX/AMM层——报价、订单簿、AMM流动性池、路径查找
- 互操作层——Axelar桥、EVM侧链
- 安全评审——跨领域关注点
2. Pick the right building blocks
2. 选择合适的构建模块
- New projects: to scaffold (Next.js or Nuxt)
npx create-xrp - Frontend: (WalletManager + web component) +
xrpl-connectfor state queriesxrpl - JS/TS backend/scripts: package
xrpl - Python projects:
xrpl-py - Cross-chain: Axelar GMP via XRPL Payment memos
- 新项目:使用搭建脚手架(Next.js或Nuxt)
npx create-xrp - 前端:(WalletManager + Web组件)+
xrpl-connect用于状态查询xrpl - JS/TS后端/脚本:包
xrpl - Python项目:
xrpl-py - 跨链:通过XRPL支付备忘录使用Axelar GMP
3. Implement with XRPL-specific correctness
3. 遵循XRPL专属正确性规范实现
Always be explicit about:
- network (mainnet / testnet / devnet) + WebSocket endpoint
- account reserves (base + owner reserves) and their implications
- transaction fees (auto-filled vs explicit, fee escalation)
- sequence numbers (auto-filled vs explicit, for multi-tx workflows)
- (always set for reliable submission)
LastLedgerSequence - flags and field requirements per transaction type
- trust line limits and issuer relationships
- NFT transfer fees and broker mechanics
始终明确说明以下内容:
- 网络(主网/测试网/开发网)+ WebSocket端点
- 账户预留金(基础+所有者预留金)及其影响
- 交易手续费(自动填充 vs 显式设置、手续费 escalate 机制)
- 序列号(自动填充 vs 显式设置,适用于多交易工作流)
- (为保证可靠提交必须设置)
LastLedgerSequence - 每种交易类型的标志和字段要求
- TrustLine限额和发行方关系
- NFT转账手续费和经纪商机制
4. Add tests
4. 添加测试
- Unit test transaction building and serialization.
- Integration test against testnet (use faucet for funding).
- Frontend: test wallet connection and signing flows with mocked providers.
- 对交易构建和序列化做单元测试。
- 对接测试网做集成测试(使用水龙头注资)。
- 前端:使用模拟提供商测试钱包连接和签名流程。
5. Deliverables expectations
5. 交付物要求
When you implement changes, provide:
- exact files changed + diffs
- commands to install/build/test
- a short "risk notes" section for anything touching signing, fees, reserves, or asset transfers
实现变更后,需要提供:
- 确切的变更文件+差异内容
- 安装/构建/测试的命令
- 针对签名、手续费、预留金或资产转账相关内容的简短「风险说明」章节
Content Sources
内容来源
This skill incorporates best practices from:
- The Official XRPL Documentation — the authoritative reference for protocol specifications, transaction types, and API details.
- The foundational course materials: xrpl-training-2026-january.
本技能整合了以下来源的最佳实践:
- XRPL官方文档——协议规范、交易类型、API详情的权威参考。
- 基础课程资料:xrpl-training-2026-january。
Progressive disclosure (read when needed)
渐进式披露内容(按需阅读)
- Client SDK patterns (xrpl.js): client-sdk.md
- Frontend & wallet integration: frontend.md
- Tokens & TrustLines: tokens.md
- NFTs (XLS-20): nfts.md
- DEX & AMM: dex-amm.md
- Payments, escrows & channels: payments.md
- Cross-chain interoperability: interoperability.md
- Security checklist: security.md
- Resources & references: resources.md
- A framework-agnostic wallet connection toolkit for the XRP Ledger xrpl-connect
- 客户端SDK模式(xrpl.js):client-sdk.md
- 前端与钱包集成:frontend.md
- 代币与TrustLine:tokens.md
- NFT(XLS-20):nfts.md
- DEX与AMM:dex-amm.md
- 支付、托管与通道:payments.md
- 跨链互操作性:interoperability.md
- 安全检查清单:security.md
- 资源与参考:resources.md
- XRP Ledger的框架无关钱包连接工具包 xrpl-connect