Skip to main content

Installation

Requires Python 3.12+. Published on PyPI.

Agent modules

Wallet management

Configuration priority:
  1. Environment variables (XENARCH_PRIVATE_KEY, XENARCH_RPC_URL, XENARCH_NETWORK)
  2. ~/.xenarch/config.json
  3. ~/.xenarch/wallet.json

Gate checking

Payment execution

The function:
  1. Checks USDC balance
  2. Checks ETH for gas
  3. Approves USDC on the splitter contract (unlimited, to avoid repeated approvals)
  4. Calls splitter.split(collector, amount) with 150k gas limit
Constraints:
  • 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:
Behavior:
  • Human requests pass through (zero overhead)
  • Bots with valid Authorization: Bearer token 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

Matches against 20+ known AI bot signatures (GPTBot, ClaudeBot, PerplexityBot, etc.).

Environment variables

Contract addresses