← 返回 Skills 市场
cyberforexblockchain

NEXUS Ap2 Batched Settle

作者 CyberForexBlockchain · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
25
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install nexus-ap2-batched-settle
功能描述
Atomically settle up to 20 AI agent payments in a single XRPL Batch transaction. Implements Google's AP2 (Agent Payments Protocol) with XLS-56 Batch on XRP L...
使用说明 (SKILL.md)

NEXUS AP2 Batched Settlement on XRPL

Google's Agent Payments Protocol (AP2) + XRP Ledger XLS-56 Batch | ~5s finality | Up to 20 mandates per tx | Non-custodial

When to use

Use this skill when an autonomous agent needs to:

  1. Pre-authorize payments for AI services using AP2 mandates (Cart for specific purchases, Intent for ongoing autonomous spending within a budget)
  2. Settle many payments at once — pay 5, 10, or 20 different AI services with one signed transaction instead of one tx per service
  3. Operate at low latency — XRPL settles in ~5 seconds with ~$0.000005 fees, dramatically reducing M2M friction vs other chains
  4. Maintain non-custodial control — buyer's wallet signs every tx; NEXUS never holds keys or funds

Why batched settlement matters

Without batching: agent makes 20 API calls → 20 separate XRPL transactions → 20 separate signatures, 20× the latency, 20× the fees.

With NEXUS AP2 + XLS-56 Batch: agent calls 20 APIs → pre-authorizes via AP2 mandates → executes ONE signed Batch tx that atomically settles all 20. ALLORNOTHING mode guarantees no partial settlement.

Steps

Step 1: Create an AP2 Mandate

For an Intent Mandate (agent autonomy, e.g. "spend up to 10 XRP this week"):

curl -X POST https://ai-service-hub-15.emergent.host/api/ap2/mandates/create \
  -H "Content-Type: application/json" \
  -d '{
    "mandate_type": "intent",
    "user_did": "did:agent:my-agent-id",
    "agent_id": "my-agent-id",
    "merchant_id": "nexus",
    "mandate_content": {
      "natural_language_intent": "Buy AI services up to 10 XRP this week",
      "max_price": 10.0,
      "currency": "XRP",
      "time_window_start": "2026-02-26T00:00:00Z",
      "time_window_end": "2026-03-05T23:59:59Z"
    },
    "user_signature": {
      "algorithm": "ECDSA",
      "signature_value": "sandbox_test_sig_001",
      "timestamp": "2026-02-26T12:00:00Z",
      "user_did": "did:agent:my-agent-id"
    }
  }'

Returns { "mandate_id": "ap2_intent_xxx", "expires_at": "...", ... }.

For a Cart Mandate (specific items, single purchase):

curl -X POST https://ai-service-hub-15.emergent.host/api/ap2/mandates/create \
  -H "Content-Type: application/json" \
  -d '{
    "mandate_type": "cart",
    "user_did": "did:agent:my-agent-id",
    "agent_id": "my-agent-id",
    "mandate_content": {
      "total_amount": 1.0,
      "currency": "XRP",
      "items": [{"sku": "llm-gateway", "name": "LLM Gateway Call", "price": 1.0, "quantity": 1}]
    },
    "user_signature": {"algorithm":"ECDSA","signature_value":"sandbox_test_sig_002","timestamp":"2026-02-26T12:00:00Z","user_did":"did:agent:my-agent-id"}
  }'

Step 2a (Single Settle): Settle One Mandate

curl -X POST https://ai-service-hub-15.emergent.host/api/ap2/payments/settle \
  -H "Content-Type: application/json" \
  -d '{
    "mandate_id": "ap2_intent_xxx",
    "mandate_type": "intent",
    "verification_record_id": "",
    "amount": 2.5,
    "currency": "XRP",
    "payer_address": "r\x3Cyour-xrpl-address>",
    "recipient_address": "rM86ChiqozvfHwLckKRq2yTtzKLwfBe2XA",
    "chain": "xrpl"
  }'

Returns unsigned_tx — an XRPL Payment JSON with hex-encoded ap2.mandate.id memo. Sign with your wallet (Xumm, Crossmark, hardware), broadcast, then confirm:

curl -X POST "https://ai-service-hub-15.emergent.host/api/ap2/payments/\x3Cmandate_id>/confirm?tx_hash=\x3CHASH>"

Step 2b (Batched Settle): Settle Up to 20 Mandates in One Tx

curl -X POST https://ai-service-hub-15.emergent.host/api/ap2/payments/batch \
  -H "Content-Type: application/json" \
  -d '{
    "mandate_ids": ["ap2_cart_001", "ap2_cart_002", "ap2_cart_003", "ap2_intent_001"],
    "payer_address": "r\x3Cyour-xrpl-address>",
    "chain": "xrpl",
    "mode": "ALLORNOTHING"
  }'

Returns an unsigned XLS-56 Batch transaction containing all inner Payments. Sign + broadcast once. After broadcast:

curl -X POST "https://ai-service-hub-15.emergent.host/api/ap2/payments/batch/\x3Cbatch_id>/confirm?tx_hash=\x3CHASH>"

Step 3 (Optional): Verify the broadcast

curl -X POST https://ai-service-hub-15.emergent.host/api/xrpl/verify \
  -H "Content-Type: application/json" \
  -d '{"tx_hash":"\x3CHASH>","currency":"XRP","expected_memo":"\x3Cmandate_id>"}'

Returns { valid: true, amount_drops, amount_xrp, currency, source, destination, memos: [...] }.

RLUSD Support

Want to settle in regulated USD stablecoin instead of XRP? RLUSD is supported natively.

One-time setup — establish a trust line to Ripple's RLUSD issuer:

curl -X POST https://ai-service-hub-15.emergent.host/api/xrpl/build/trust-line \
  -H "Content-Type: application/json" \
  -d '{"holder_address":"r\x3Cyour-address>","currency":"RLUSD"}'

Then use "currency": "RLUSD" in your mandates. RLUSD issuer is rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De.

External Endpoints

URL Method Purpose
/api/ap2/mandates/create POST Mint a new mandate
/api/ap2/mandates GET List mandates (filter by agent_id)
/api/ap2/payments/settle POST Settle one mandate
/api/ap2/payments/batch POST Atomic batched settlement
/api/ap2/payments/{id}/confirm POST Confirm broadcast tx
/api/ap2/config GET AP2 discovery (chains, tokens, batch spec)
/api/xrpl/config GET XRPL config (network, receiving address, assets)
/api/xrpl/verify POST Verify any XRPL Payment tx
/api/xrpl/build/escrow POST EscrowCreate template (FundsLocked → ResultSubmitted)

Security & Privacy

  • Non-custodial. NEXUS NEVER sees or signs with your XRPL seed. Every unsigned_tx returned must be signed locally in your wallet.
  • All requests over HTTPS/TLS to ai-service-hub-15.emergent.host.
  • Mandate signatures validated cryptographically (sandbox bypass available for testing via sandbox_ prefix).
  • Payment proofs verified on XRPL via Ripple public JSON-RPC nodes.

Model Invocation Note

This skill does NOT invoke any LLM. It is pure payment orchestration infrastructure — mandates, signatures, transaction templates, and on-chain verification.

Trust Statement

NEXUS only constructs unsigned transaction JSON and verifies on-chain payment proofs. Buyers retain full control of their wallets and funds. Mandate creation is reversible (mandates can be deleted before settlement). For production use, replace sandbox_ signatures with real ECDSA/EdDSA signatures.

Tags

ap2, xrpl, agent-payments-protocol, batched-settlement, xls-56, non-custodial, rlusd, xrp, m2m-payments, low-latency

安全使用建议
Install only if you intentionally want an agent payment workflow tied to the NEXUS service. Use testnet and sandbox signatures first, verify the endpoint and network, never share wallet seeds, and independently check every destination, amount, currency, issuer, mandate, and trust-line before signing or broadcasting any XRPL transaction.
能力标签
cryptofinancial-authorityrequires-walletcan-make-purchasescan-sign-transactionsrequires-sensitive-credentials
能力评估
Purpose & Capability
The payment purpose is clear and coherent: it creates AP2 mandates, builds unsigned XRPL settlement transactions, supports batched settlement, and verifies transactions. These are high-impact financial capabilities but are aligned with the stated purpose.
Instruction Scope
The README and SKILL.md include copy-paste payment, batch settlement, signing/broadcast, confirmation, and trust-line flows without prominent adjacent warnings that signing or submitting the returned transactions can move funds or alter wallet state.
Install Mechanism
The artifact contains only README.md and SKILL.md. Installation is via clawhub install or manual copy to the OpenClaw skills directory; no executable installer, package dependency, shell script, persistence hook, or hidden code was found.
Credentials
Network access to ai-service-hub-15.emergent.host is expected for this skill, but the examples transmit payment metadata, identifiers, mandate content, signatures, mandate IDs, and payer addresses to that external service. The declared NEXUS_PAYMENT_PROOF requirement is not clearly explained in the user-facing docs.
Persistence & Privilege
The skill states that NEXUS constructs unsigned transaction JSON and does not see XRPL seeds, which is a useful containment claim. However, the documented workflow still asks users to sign and broadcast transactions and create RLUSD trust lines, which can have persistent on-chain effects.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install nexus-ap2-batched-settle
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /nexus-ap2-batched-settle 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - AP2 Agent Payments Protocol + XRPL XLS-56 Batch atomic settlement (up to 20 mandates per tx, ~5s finality)
元数据
Slug nexus-ap2-batched-settle
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

NEXUS Ap2 Batched Settle 是什么?

Atomically settle up to 20 AI agent payments in a single XRPL Batch transaction. Implements Google's AP2 (Agent Payments Protocol) with XLS-56 Batch on XRP L... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 25 次。

如何安装 NEXUS Ap2 Batched Settle?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install nexus-ap2-batched-settle」即可一键安装,无需额外配置。

NEXUS Ap2 Batched Settle 是免费的吗?

是的,NEXUS Ap2 Batched Settle 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

NEXUS Ap2 Batched Settle 支持哪些平台?

NEXUS Ap2 Batched Settle 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 NEXUS Ap2 Batched Settle?

由 CyberForexBlockchain(@cyberforexblockchain)开发并维护,当前版本 v1.0.0。

💬 留言讨论