@cloudpayx/x402-pay 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/package.json +3 -7
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# cpX x402 Pay
|
|
1
|
+
# cpX x402 Pay | XRPL Agent Payment SDK
|
|
2
2
|
|
|
3
|
-
**Purpose:** Let an unaffiliated, self-funded agent participate in the XRPL x402 economy without a cloudpayX registration, dashboard, Supabase session, or required wallet brand. This is
|
|
3
|
+
**Purpose:** Let an unaffiliated, self-funded agent participate in the XRPL x402 economy without a cloudpayX registration, dashboard, Supabase session, or required wallet brand. This is an XRPL-native SDK for autonomous agents purchasing x402-protected resources.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The SDK supports wallet-agnostic signing, three-asset payment policies, spending controls, guarded signing, and validated-ledger reconciliation. Agents must use compatible XRPL signers and maintain sufficient funds.
|
|
6
6
|
|
|
7
7
|
## Source
|
|
8
8
|
|
|
@@ -76,19 +76,19 @@ This module rejects scientific notation and prices above its exact cap. Limits a
|
|
|
76
76
|
- Explicit assets and exact amount caps; opt-in seller-neutral recipient policy or allowlist.
|
|
77
77
|
- Explicit `autonomous` opt-in or application-provided authorization callback, with fail-closed exceptions.
|
|
78
78
|
- A self-funded agent retains *unrestricted authority over its own signer*. A local SDK is **not a trust boundary** against an agent holding the key: it can bypass these checks. Hardware signers, dedicated wallets, and controlled signer services are needed for stronger enforcement.
|
|
79
|
-
- **
|
|
79
|
+
- **Security protections:** Spending budgets, duplicate-payment protection, resource-host validation, anti-SSRF controls, replay protection, fee budgeting, guarded signing, and validated-ledger reconciliation are covered by the SDK's security tests. These controls apply when payments use the guarded SDK interface.
|
|
80
80
|
- The live x402 facilitator/service should validate transaction signatures and bind invoice, amount, asset, destination and network, as described in the XRPL exact scheme spec.
|
|
81
81
|
|
|
82
82
|
## Operational conditions for USDC and RLUSD
|
|
83
83
|
|
|
84
84
|
The agent wallet must have the required XRPL token trustline/balance/authorization (where applicable) and enough XRP for transaction fees and reserves. A valid policy decision **does not** guarantee a successful token payment or a resource response. The resource server must advertise a compatible x402 `accepts` entry; the SDK does not auto-swap XRP into stablecoins.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
XRPL-issued assets require sufficient balances, applicable trustlines, and XRP for fees and reserves. Payment success and resource delivery depend on the network and seller. An agent with unrestricted access to its own signing keys can bypass local SDK policies.
|
|
87
87
|
|
|
88
88
|
**Official issuers:** [Ripple RLUSD](https://docs.ripple.com/products/stablecoin/developer-resources/rlusd-on-the-xrpl) and [Circle XRPL USDC](https://www.circle.com/blog/now-available-usdc-on-the-xrpl).
|
|
89
89
|
|
|
90
|
-
##
|
|
90
|
+
## Integration guidance
|
|
91
91
|
|
|
92
|
-
Use a
|
|
92
|
+
Use a dedicated, limited-balance XRPL wallet when integrating a new signer or seller. Validate the complete payment and resource-delivery flow before granting unattended spending authority. For stronger enforcement, keep signing authority outside the agent's direct control.
|
|
93
93
|
|
|
94
94
|
Specifications: https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_xrpl.md
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudpayx/x402-pay",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "0.2.2",
|
|
5
4
|
"type": "module",
|
|
6
|
-
"description": "
|
|
5
|
+
"description": "XRPL-native x402 payment SDK for autonomous AI agents. Secure, wallet-agnostic XRP, RLUSD and Circle USDC payments with spending policies and verified settlement.",
|
|
7
6
|
"dependencies": {
|
|
8
7
|
"@x402/core": "2.28.0",
|
|
9
8
|
"@x402/fetch": "2.28.0",
|
|
@@ -40,8 +39,5 @@
|
|
|
40
39
|
"scripts/trusted-xrpl-recovery.mjs",
|
|
41
40
|
"types/",
|
|
42
41
|
"README.md"
|
|
43
|
-
]
|
|
44
|
-
"publishConfig": {
|
|
45
|
-
"access": "public"
|
|
46
|
-
}
|
|
42
|
+
]
|
|
47
43
|
}
|