paybound (Python)
Let AI agents pay on BNB Smart Chain without giving them unlimited authority.
Your agent makes the payment decisions. It cannot pay out of the vault beyond the approval you signed: this recipient, up to this amount, this many times. (This covers funds held in the vault; keep the agent's own wallet to gas only.)
A person approves one exact payment; the vault pays only that and records every refusal on chain. Python client for the same SpendGuardVault contract as the npm package paybound; approval digests are identical across both.
pip install paybound
from web3 import Web3
from paybound import deploy_vault, new_approval, sign_approval, submit, request_for
w3 = Web3(Web3.HTTPProvider("https://data-seed-prebsc-1-s1.bnbchain.org:8545")) # BSC testnet
vault = deploy_vault(w3, OWNER_KEY, guardian=GUARDIAN, approvers=[APPROVER], agents=[AGENT])
approval = new_approval(agent=AGENT, token=STABLECOIN, recipient=SUPPLIER, amount=3400 * 10**18)
signed = {"approval": approval, "signatures": [sign_approval(APPROVER_KEY, vault, 97, approval)]}
submit(w3, AGENT_KEY, vault, signed, {**request_for(approval), "recipient": SCAMMER}) # Refused: RecipientMismatch
submit(w3, AGENT_KEY, vault, signed, request_for(approval)) # Executed
submit(w3, AGENT_KEY, vault, signed, request_for(approval)) # Refused: UsesExhausted
Also: approval_digest, check_request (dry run), read_log, REASONS. BSC testnet (97) and local chains only; testnet software, not audited. Apache-2.0. Built by Aqta, aqta.ai/seal.
What you see when you run the quickstart (examples/quickstart):
vault 0x… holds 10,000 test USD
A scam email changes the wallet
+--------------------------------------------------------------------------+
| Spend Guard Refused |
+--------------------------------------------------------------------------+
| Decision Recipient is not the one approved |
| Code RecipientMismatch |
| Tried to pay 3,400 to 0x2222…2222 |
| Approved 3,400 to 0x1111…1111, 1 use |
| Money moved none |
| Evidence 0x297e…8c09 on chain |
+--------------------------------------------------------------------------+
The agent asks for more
+--------------------------------------------------------------------------+
| Spend Guard Refused |
+--------------------------------------------------------------------------+
| Decision Amount is above the approval |
| Code AmountAboveApproval |
| Tried to pay 5,000 to 0x1111…1111 |
| Approved 3,400 to 0x1111…1111, 1 use |
| Money moved none |
| Evidence 0x8708…1222 on chain |
+--------------------------------------------------------------------------+
The real invoice
Metadata
Release files for paybound 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paybound-0.1.0.tar.gz | 27.5 kB | Without provenance | Details for paybound-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paybound-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for paybound-0.1.0-py3-none-any.whl |
Total release size: 53.6 kB
Release files / paybound-0.1.0.tar.gz
| Download URL | paybound-0.1.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c17b2e70c03e49490aa8bc6bbf88cad468fe2c06a7fb28a69828b8eac73ee9f6
|
|
BLAKE2b-256 checksum How to use checksums |
2b128743a85c9aa72b8dde2db77b62563e68e12b5a0391b6f5a9e9edcc2851e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / paybound-0.1.0-py3-none-any.whl
| Download URL | paybound-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1253077e7795e20fa5fa50d975cd533596498b526720fa270fe082d76ec8f03
|
|
BLAKE2b-256 checksum How to use checksums |
375b4a2adfd9a86c23585a217537daa12394e43367093155e9f63ade443688c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Security for paybound 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.