What's New
connect_with_private_key() — Server-side EVM signer without browser wallet
create_authorization() — Create signed EIP-3009 X-PAYMENT headers programmatically
- New
[signer] optional dependency: pip install uvd-x402-sdk[signer]
- Fixed
supported_networks default config to include all 21 chains (was missing Scroll, SKALE, Algorand, Sui)
Usage
from uvd_x402_sdk import X402Client
from decimal import Decimal
import os
client = X402Client(recipient_address="0xMerchant...")
client.connect_with_private_key(os.environ['PRIVATE_KEY'], 'skale-base')
header = client.create_authorization(
pay_to="0xRecipient...",
amount_usd=Decimal("0.01"),
)
# Use header as X-PAYMENT in HTTP requests
Install
pip install uvd-x402-sdk[signer]==0.18.0