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.2.0.tar.gz
(7.4 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.2.0.tar.gz.
File metadata
- Download URL: x402_rwa-0.2.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
945b2b1e56a4735a15351055cc3392be33a34500bcbd5bce457a1e6aae02dab0
|
|
| MD5 |
0a391162c6cea5c82093134afbb51309
|
|
| BLAKE2b-256 |
5fdf7bbb65ff6df4c164b4f1c368989b6150418aad0b8ad1342e442c4e2a83db
|
File details
Details for the file x402_rwa-0.2.0-py3-none-any.whl.
File metadata
- Download URL: x402_rwa-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.3 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 |
37392dc3bcfe965d40b1bb989e8c4bdac0fefdcb708787da3099d3686eb2c269
|
|
| MD5 |
475ad91ae0e40db9b8534cca8914e796
|
|
| BLAKE2b-256 |
6a0d763074a6411bca5ac5a9bd7d62468dbf0f8bf5c61aab417e4ef69dbab568
|