Send permissionless Telegram notifications via x402 protocol
Project description
x402-Notify Python SDK
Send permissionless Telegram notifications via x402 protocol.
Installation
pip install x402-notify
Quick Start
from x402_notify import NotifyClient
# Initialize with your wallet's private key
client = NotifyClient(wallet_key="0x...")
# Send notification - x402 payment handled automatically!
client.notify(
chat_id="123456789",
message="🚨 ETH dropped below $2000!"
)
How It Works
- SDK calls the gateway's
/notifyendpoint - Gateway returns
402 Payment Requiredwith payment details - SDK automatically sends ETH payment to gateway
- SDK retries request with payment proof
- Gateway delivers message to Telegram
No API keys. No subscriptions. Just crypto.
Configuration
client = NotifyClient(
wallet_key="0x...",
gateway_url="https://notify.x402.io", # Production gateway
rpc_url="https://sepolia.base.org", # Blockchain RPC
chain_id=84532, # Base Sepolia
)
Get Stats
stats = client.get_stats()
print(f"Total notifications sent: {stats['totalNotifications']}")
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_notify-0.1.0.tar.gz
(10.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_notify-0.1.0.tar.gz.
File metadata
- Download URL: x402_notify-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd9197ac5b2049e7e9c157b9b65b641934f222c8091b1848fa0fa6f4cee5f6e
|
|
| MD5 |
65616c6e2ef38a15fc5705d50afd83f7
|
|
| BLAKE2b-256 |
7d3206dcb6f382ae148bf39f25100d40708b8ddb65c1b13419b81286628d4bcd
|
File details
Details for the file x402_notify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: x402_notify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c43d2b436caabdd41333bb3c090a82589a02cfd09345360a31fe119f8eedee
|
|
| MD5 |
2b3af6e86609c51113fed62dfadaddc9
|
|
| BLAKE2b-256 |
86a3cdfbf733681145cf8b32211a547530aa76e19a16a39bdb3469b421a7d283
|