One-shot BankofAI x402 CLI built on top of the bankofai-x402 SDK. Two commands:
server— start a local x402 payment server (advertises payment terms, accepts a signed payload, settles).client <url>— pay an x402-protected URL when the server returns402 Payment Required.
Full flag matrix and example output: FEATURES.md.
pip install bankofai-x402-tools
x402-tools --helpOr from source:
cd python/x402-tools
pip install -e .
x402-tools --help# Start a server that charges 1.25 USDT on TRON Nile
x402-tools server --pay-to TJWdoJk8KyrfxZ2iDUqz7fwpXaMkNqPehx \
--decimal 1.25 --network tron:nile
# In another shell — pay it
x402-tools client http://127.0.0.1:4020/pay \
--max-decimal 1.25 --network tron:nile --token USDTUnlike the TypeScript version which implements its own HTTP server and facilitator client, the Python CLI directly uses the SDK's X402Server and FacilitatorClient from bankofai-x402:
from bankofai.x402.server import X402Server
from bankofai.x402.facilitator import FacilitatorClient
server = X402Server() # No duplication
facilitator = FacilitatorClient(base_url) # SDK providedThis avoids code duplication and keeps the CLI thin (just argument parsing + output formatting).
| Var | Purpose |
|---|---|
TRON_PRIVATE_KEY |
TRON wallet key for --wallet env |
EVM_PRIVATE_KEY |
EVM wallet key for --wallet env |
TRON_GRID_API_KEY |
Optional, forwarded to SDK for TronGrid |
cd python/x402-tools
pip install -e .[dev]
pytest
python -m bankofai.x402_tools.cli server --help