x402 Payment Protocol SDK for Python
Project description
x402
Python SDK for the x402 payment protocol — supports TRON and EVM (BSC) networks.
Installation
pip install bankofai-x402
Optional extras:
pip install "bankofai-x402[tron]"
pip install "bankofai-x402[fastapi]"
pip install "bankofai-x402[flask]"
pip install "bankofai-x402[all]"
Quick Start
from bankofai.x402.clients import X402Client
client = X402Client()
If you want automatic handling of HTTP 402 responses, use X402HttpClient:
import httpx
from bankofai.x402.clients import X402Client, X402HttpClient
x402_client = X402Client()
http_client = httpx.AsyncClient()
client = X402HttpClient(http_client=http_client, x402_client=x402_client)
Supported Schemes
exact_permit: Standard x402 payment scheme using TIP-712/EIP-712 permits.exact_gasfree: (TRON) Pay with USDT/USDD without TRX gas using the GasFree protocol.exact: (EVM) Native direct payment using ERC-3009.
Links
- Repository: https://github.com/BofAI/x402
- Issues: https://github.com/BofAI/x402/issues
- Documentation: https://docs.bankofai.io/
- Contributing: CONTRIBUTING.md
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
bankofai_x402-0.5.6b0.tar.gz
(225.2 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 bankofai_x402-0.5.6b0.tar.gz.
File metadata
- Download URL: bankofai_x402-0.5.6b0.tar.gz
- Upload date:
- Size: 225.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1ad22e24573aa2a74abf7b7143432f2c7c31b731f098da924b2f6250c41a95d
|
|
| MD5 |
c128c2e950f757f30d9a3d010271e9dc
|
|
| BLAKE2b-256 |
4f1f9858ebe00a7faf4fd40d12672753fb252d75fe7e7720a61e973a8a4351b1
|
File details
Details for the file bankofai_x402-0.5.6b0-py3-none-any.whl.
File metadata
- Download URL: bankofai_x402-0.5.6b0-py3-none-any.whl
- Upload date:
- Size: 96.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c994e816d2d99a535698bc430d078b2dc2ed31fbdf79e5887b3560fd7065091
|
|
| MD5 |
ac70633dcdcb6272524a840a125e3b0c
|
|
| BLAKE2b-256 |
985f6a13151bf7d8394e737ad94019e44bab71b4dc002519aa1fa789b5f3cd57
|