Agent-Native RWA Settlement SDK - Acquire tokenized assets in one function call
Project description
x402-rwa
Agent-Native RWA Settlement SDK. Acquire tokenized Real World Assets in one function call.
Installation
pip install x402-rwa
Quick Start
from x402_rwa import X402Agent
# Initialize with your RPC and wallet
agent = X402Agent(
rpc_url="https://mainnet.base.org",
private_key="0x..."
)
# One line to acquire 100 Treasury Bills
tx_hash = agent.acquire_asset(
server_url="http://your-clearinghouse.com/api/v1/trade",
asset_id="TBILL-26",
amount=100
)
print(f"https://basescan.org/tx/{tx_hash}")
How It Works
The SDK handles the complete x402 flow:
- Negotiation - HTTP GET returns 402 with pricing headers
- Proof Generation - ZK compliance proof via SP1
- Settlement - Atomic on-chain swap (USDC → RWA)
x402 Protocol
GET /api/v1/trade/buy/TBILL-26?amount=100
→ 402 Payment Required
X-402-Price: 98000000
X-402-Payment-Address: 0x...
X-402-Compliance-Circuit: 0x...
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
x402_rwa-0.1.0.tar.gz
(4.8 kB
view details)
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 x402_rwa-0.1.0.tar.gz.
File metadata
- Download URL: x402_rwa-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c8c374d76141df241085c19cc00f6d186146b4f2151eb6ccd79e22d92b07032
|
|
| MD5 |
60bec0ff52b9251fd93ca0ba0fe52ce3
|
|
| BLAKE2b-256 |
ce56d4c6c716a533e57491fd98af23c6c68963e76372f485c1c0a7e8a4007b71
|
File details
Details for the file x402_rwa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: x402_rwa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72aea16f9a1a1a8859412ef674b4774f30717b5744f39f60a99d23b2ac65ccb3
|
|
| MD5 |
95a08a37189772cd5f913ef87fecfb8e
|
|
| BLAKE2b-256 |
377ba03aac20b63cd1a17c3a8cd8e46c22b4f35694bc08695997a5f39622115f
|