mcpField
X
xrpl

xrpl

github.com/peersyst開発3171 回インストール23 週間前に更新
リポジトリ

xrpl について

xrplは、xrpl.jsを使った安全なアプリケーション開発を支援するルールベースのコーディングスキルです。セキュリティ、ウォレット、トランザクション、金額、接続の指針を示し、公式資料や実行可能なサンプルへ案内します。

主な機能

  1. 01タスク別のルール索引
  2. 02決済とトランザクションの安全対策
  3. 03ウォレットと署名の指針
  4. 04金額処理とページネーションの実践
  5. 05ドキュメントとコードサンプルへのリンク

活用シーン

  1. 01安全な入金処理を実装
  2. 02XRPLトランザクションを構築して送信
  3. 03XRPL連携のセキュリティを点検

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/peersyst/xrplskills --skill xrpl

インストール後、Claude Code で/xrplを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

metadata.json
rules/
amounts.md
client.md
read-pagination-marker.md
security-lastledgersequence.md
security-partial-payment.md
security-validate-destination-tag.md
security-validate-meta.md
tx-autofill-before-sign.md
tx-handle-tec-codes.md
tx-idempotent-retry.md
tx-submitandwait.md
wallet-prefer-ed25519.md
wallet-regular-key-for-hot-wallets.md
wallet-secure-entropy.md

README(原文)English

プロジェクトの README より

この README の日本語訳はまだありません。以下は英語の原文です。日本語の紹介はページ上部をご覧ください。

xrpl

Each rule under rules/ is self-contained: an incorrect example, a correct example, and links to upstream xrpl.js source, xrpl.org docs, and (where available) an XRPL Developer Portal code sample. Use the index below to jump to the rule that fits the task.

This skill is not an API reference. For exhaustive type signatures, see js.xrpl.org. For XLS protocol specs, use the companion xrpl-standards skill — when work touches AMM, MPT, NFToken, Credentials, Batch, etc., load both skills.

Read first: Security

These four rules are non-negotiable. Funds have been lost over every one of them.

  • security-partial-payment — always credit delivered_amount, never Amount on incoming payments. Partial-payment inflation is the canonical XRPL exchange exploit.
  • security-validate-meta — a preliminary tesSUCCESS does not mean the tx was applied. Only validated-ledger meta is authoritative.
  • security-lastledgersequence — never submit without LastLedgerSequence. Without it a transaction can replay weeks later.
  • security-validate-destination-tag — honor requireDestTag; a missing tag on a custodial destination loses funds.

What to read when

Map the user's task to the rules to consult before writing code.

User's task or phraseRead these rules
"Credit an incoming payment", "deposit handler", "watch for payments"security-partial-payment, security-validate-meta, read-pagination-marker
"Sign and submit", "send a transaction", "send XRP"tx-autofill-before-sign, tx-submitandwait, security-lastledgersequence, tx-handle-tec-codes
"Set up an exchange deposit address", "custodial account"security-validate-destination-tag, wallet-regular-key-for-hot-wallets
"Generate a wallet", "key management"wallet-secure-entropy, wallet-prefer-ed25519, wallet-regular-key-for-hot-wallets
"Connect to rippled", "websocket", "reconnect"client
"Balance math", "convert XRP / drops", "IOU value"amounts
"Retry a failed tx", "tec error"tx-handle-tec-codes, tx-idempotent-retry, tx-submitandwait
"List trust lines / NFTs / offers", "account_lines", "account_objects"read-pagination-marker
"Audit our XRPL integration"Read all security-* rules first, then amounts and wallet-*.

Full rule index

Impact tags below match each rule file's frontmatter (CRITICAL, HIGH, MEDIUM).

Security
Amounts & numbers
  • amounts — CRITICAL — Drops + BigInt for XRP, bignumber.js for IOUs, never JS number; respect the 15-digit IOU mantissa
Client & connection
  • client — HIGH — One shared Client per app, wss:// over https://, trust the built-in reconnect, always disconnect on shutdown
Wallet & signing
Transactions & submission

Code samples

The rules in this skill explain what to do and why. When you need a runnable, end-to-end example — how to actually construct, sign, and submit a transaction — go to the XRPL Developer Portal code samples. They are maintained by XRPLF and stay current with xrpl.js. Prefer them over inventing example code.

TaskSample
Construct and send an XRP paymentsend-xrp
Add a memo to a paymentsend-a-memo
Handle a partial payment safelypartial-payment
Watch an account for incoming paymentsmonitor-payments-websocket
Submit a transaction with finality and retriesreliable-tx-submission, submit-and-verify
Pre-flight a destination's requireDestTagrequire-destination-tags
Walk paginated account_* responsesmarkers-and-pagination, walk-owner-directory
Configure regular keys / disable masterassign-regular-key, disable-master-key
Sign offline / multisignsecure-signing, multisigning
Use Tickets for parallel submissionuse-tickets
Issued currencies / IOUsissue-a-token, freeze, clawback
AMMcreate-amm, amm-clob
NFTokennon-fungible-token, nft-modular-tutorials
MPT (Multi-Purpose Tokens)mpt-generator, mpt-sender, issue-mpt-with-metadata
Escrow, Checks, Payment Channelsescrow, checks, claim-payment-channel
Credentials, DIDcredential, issue-credentials, verify-credential, did
Getting started from zeroget-started, quickstart

When the user asks "how do I send a payment / mint an NFT / set up an escrow" and the answer requires runnable code, fetch the matching sample and adapt it — do not paraphrase the structure from memory.

How to Use

Once you have picked a rule from the table above, read its file:

Read <skill-dir>/rules/<rule-name>.md

<skill-dir> resolves to wherever the skill is installed — ~/.claude/skills/xrpl/ for a user-level Claude Code install, .claude/skills/xrpl/ for a project-level install, /mnt/skills/user/xrpl/ on claude.ai, or a plugin-managed path. Don't hard-code the directory; rely on the path the host resolves.

Each rule file contains:

  • Frontmatter — title, impact (CRITICAL / HIGH / MEDIUM), tags, and where applicable xrpl_js_source, upstream_docs, code_sample. Fields with no good link are omitted; treat any of these as optional metadata.
  • Why it matters — one or two sentences explaining the failure mode.
  • Incorrect example — what the broken code typically looks like.
  • Correct example — the idiomatic fix.
  • Notes — edge cases, related amendments, version caveats.
  • See also — explicit links back to upstream xrpl.js source files, xrpl.org protocol docs, and (where it exists) a dev-portal code sample.

Companion skill: xrpl-standards

If the task touches a specific XLS amendment (AMM, MPT, NFToken, Credentials, Batch, DID, Clawback, Permissioned DEX, etc.), load the xrpl-standards skill alongside this one. That skill holds the raw spec text — field definitions, transaction formats, ledger objects, failure conditions — that this skill deliberately does not duplicate.

Authoritative external resources

コメント