xrpl-x402-payer
CLI, HTTP proxy, and MCP payer for canonical XRPL x402 v2 resources.
xrpl-x402 pay https://merchant.example/premium \
--asset XRP --max-spend 1000
Without explicit asset options, the upstream spend policy accepts recognized
pegged assets only and caps each payment at USD 1. XRP, USDC, and custom IOUs
require explicit issuer-aware XRPLAssetSpendLimit entries and caps.
Receipts persist the standard SettleResponse together with immutable accepted
requirements. Signed payloads and payment identifiers are kept only in a locked
attempt sidecar next to the receipt JSONL. The sidecar is atomically replaced
before a paid HTTP request or MCP tool call is dispatched. Matching callers
share one per-fingerprint claim, so concurrent processes reuse the exact payload.
settlement_pending is stored as pending and never counted as paid; paid
attempt payloads are pruned by subsequent journal activity after a short
concurrent-caller reuse window.
Install xrpl-x402-payer[mcp] and run xrpl-x402 mcp for the local payer tool
service. Direct MCP clients should wrap a raw initialized MCP session with
wrap_mcp_client_with_xrpl_payment(..., recovery_scope=...). The required scope
must be a stable, non-secret label for the endpoint and authenticated principal,
for example https://mcp.example/sse|principal:user-42; only its SHA-256 digest
is persisted. Never put a bearer token, API key, cookie, or wallet seed in the
scope.
paid = wrap_mcp_client_with_xrpl_payment(
raw_session,
signer,
recovery_scope="https://mcp.example/sse|principal:user-42",
)
result = await paid.call_tool("generate_report", {"topic": "XRPL"})
The upstream create_x402_mcp_client re-export remains available as a raw
convenience, but it does not use this package's local receipt/attempt journal and
therefore cannot provide the same crash or cross-process recovery guarantees.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xrpl_x402_payer-0.2.0.tar.gz.
File metadata
- Download URL: xrpl_x402_payer-0.2.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ff9050901d02dc2ab22e29e31868d712f7dbd464a75bb7298d260a982b00e6
|
|
| MD5 |
68ebcdf611197f14dbf318f40a75f328
|
|
| BLAKE2b-256 |
6810a70c84b617f8d2f5ecea252dbe0da9b98ef095147c3b956513848a04546c
|
Provenance
The following attestation bundles were made for xrpl_x402_payer-0.2.0.tar.gz:
Publisher:
publish-package.yml on lgcarrier/xrpl-x402-stack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrpl_x402_payer-0.2.0.tar.gz -
Subject digest:
c6ff9050901d02dc2ab22e29e31868d712f7dbd464a75bb7298d260a982b00e6 - Sigstore transparency entry: 2704877683
- Sigstore integration time:
-
Permalink:
lgcarrier/xrpl-x402-stack@00a6ffce2c9e1cffefa5e2ba057401782e0b3b00 -
Branch / Tag:
refs/tags/payer-v0.2.0 - Owner: https://github.com/lgcarrier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yml@00a6ffce2c9e1cffefa5e2ba057401782e0b3b00 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xrpl_x402_payer-0.2.0-py3-none-any.whl.
File metadata
- Download URL: xrpl_x402_payer-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0255d2c2d44daee967f510076a46c17e004d641a0d743405c39f8f00ae40fd6d
|
|
| MD5 |
7a245dbaf4bdc46acc10488c2872a5f5
|
|
| BLAKE2b-256 |
b75c152fef11932f2bcba1b50fc10fffd8149535afd5213887b27f9224d1b195
|
Provenance
The following attestation bundles were made for xrpl_x402_payer-0.2.0-py3-none-any.whl:
Publisher:
publish-package.yml on lgcarrier/xrpl-x402-stack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrpl_x402_payer-0.2.0-py3-none-any.whl -
Subject digest:
0255d2c2d44daee967f510076a46c17e004d641a0d743405c39f8f00ae40fd6d - Sigstore transparency entry: 2704878657
- Sigstore integration time:
-
Permalink:
lgcarrier/xrpl-x402-stack@00a6ffce2c9e1cffefa5e2ba057401782e0b3b00 -
Branch / Tag:
refs/tags/payer-v0.2.0 - Owner: https://github.com/lgcarrier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yml@00a6ffce2c9e1cffefa5e2ba057401782e0b3b00 -
Trigger Event:
push
-
Statement type: