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.1.tar.gz
(6.3 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.1.tar.gz.
File metadata
- Download URL: x402_rwa-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aea60364fb2352d796d2803f5c49c1db2efb83cf880519b00ecf3522c7d245fb
|
|
| MD5 |
1518415f482f836845dab2c9ee6b428f
|
|
| BLAKE2b-256 |
5f21aada884bc6a785207334d81af76fc57d4a66ebb0aa490529d73c034c721c
|
File details
Details for the file x402_rwa-0.1.1-py3-none-any.whl.
File metadata
- Download URL: x402_rwa-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 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 |
2fdb5eeca4f83ef8c9666a018537c0c10fe0dee3de3593c89df843b640f987b4
|
|
| MD5 |
116df8c39470c5da7de27dac3c57ed94
|
|
| BLAKE2b-256 |
29787ce76d51adc0e1f82e25b9a45f4d2ceb8b3a3e170dfc48c7a98befa3bc1f
|