Valtu now has an official Python SDK. Install it with:
pip install valtu
It works on Python 3.9 and later and has one dependency, cryptography.
What's in it
- A signed API client. Every request is signed with your API key, and reads and idempotent writes are retried safely.
- Webhook verification.
construct_eventchecks the Ed25519 or HMAC signature and the timestamp before you trust a delivery. - Attestation checks.
verify_attestationchecks a hardware-signed attestation from our enclaves: the certificate chain, the signature, your nonce and the image measurement. - Exact amounts.
to_base_unitsandfrom_base_unitsconvert without floating point, and refuse floats.
A first payout
from valtu import Valtu, deposit_address
valtu = Valtu.from_env()
wallet = valtu.wallets.for_customer("cus_42")
print(deposit_address(wallet, "tron"))
amount = valtu.assets.to_base_units("USDT-TRC20", "25.50")
valtu.transfers.create(wallet_id=payouts_wallet_id, asset="USDT-TRC20", amount=amount, to=address, external_id="payout_981")
Keyword arguments are snake_case; the SDK sends the API's camelCase for you.
Open source
The source is on GitHub at Valtu-Wallet/valtu-python, and releases are published to PyPI straight from it. The TypeScript wallet kit is at Valtu-Wallet/wallet-kit.
Start with the integration guide and a free test workspace.