Installation
Agent modules
Wallet management
- Environment variables (
XENARCH_PRIVATE_KEY,XENARCH_RPC_URL,XENARCH_NETWORK) ~/.xenarch/config.json~/.xenarch/wallet.json
Gate checking
Payment execution
- Checks USDC balance
- Checks ETH for gas
- Approves USDC on the splitter contract (unlimited, to avoid repeated approvals)
- Calls
splitter.split(collector, amount)with 150k gas limit
- Max $1.00 per transaction
- Splitter must be in the trusted allowlist
- USDC uses 6 decimals
Payment verification
Payment history
Publisher modules
XenarchMiddleware (ASGI)
Gates all bot traffic site-wide:- Human requests pass through (zero overhead)
- Bots with valid
Authorization: Bearertoken pass through - Bots without token get HTTP 402 with gate details
require_payment decorator
Gates individual routes:Token verification
Verify access tokens locally (no API call):Bot detection
Environment variables
| Variable | Default | Description |
|---|---|---|
XENARCH_PRIVATE_KEY | — | Wallet private key |
XENARCH_RPC_URL | https://mainnet.base.org | Base RPC endpoint |
XENARCH_API_BASE | https://xenarch.dev | Platform API base |
XENARCH_NETWORK | base | base or base-sepolia |
Contract addresses
| Network | Splitter | USDC |
|---|---|---|
| Base Mainnet | 0xC6D3a6B6fcCD6319432CDB72819cf317E88662ae | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Base Sepolia | 0x7ecfe8f83eab6ba170063d1f1fe7c33695a9ce1d | 0xc5aDdd66Da733101A5468857Aa3C6689Af9d1DDc |