Skip to main content

Veto



One-line agent payments. Any rail.

pay() — authorize, sign, settle.
Veto runs the policy + risk engine; the rail does the rest.

PyPI license


Install

# Decision-only (no on-chain settlement) — lightest install
pip install veto-pay

# With EVM settlement (Base / Optimism / Arbitrum / Ethereum / Polygon)
pip install veto-pay[evm]

# With Solana settlement
pip install veto-pay[solana]

# Both
pip install veto-pay[all]

Quick start

from veto_pay import pay, VetoDenied

result = await pay(
    url="https://api.weather.x402.io/forecast",
    max_amount="$0.05",
    rail="auto",            # auto | evm | solana
)
print(result.tx_hash)       # on-chain tx hash on success
print(result.receipt)       # signed Veto receipt — verify offline if you want

If Veto denies, you get a typed exception:

try:
    await pay(url=url, max_amount="$10000")
except VetoDenied as e:
    print(e.reason_codes)   # ['AMOUNT_CAP_EXCEEDED']
    print(e.receipt)        # signed receipt explaining the deny

What it does

  1. Authorize — POST /api/v1/authorize with the spend intent. Veto's 8-stage engine runs (policy / prompt-injection / typosquat / OFAC / address-poisoning / intent / anomaly / baseline / decision).
  2. Branch on decision:
    • deny → raises VetoDenied(reason_codes=...). No tx is made.
    • escalate → raises VetoDenied (escalations require human review before they can settle).
    • allow → continue.
  3. Settle on the rail:
    • EVM: calls VetoGuardedAccount.executeWithMandate(struct, sig, amount) on the agent's smart wallet.
    • Solana: builds a 2-instruction tx (Ed25519 verify + veto_guarded_program::execute_with_mandate) and submits to the Solana RPC.
  4. Returns the receipt + on-chain tx hash.

Configuration

Environment variables (or pass as kwargs):

Variable Required for Description
VETO_API_KEY always Bearer token from the Veto dashboard
VETO_AGENT_ID always UUID of the agent (created by veto agent init)
VETO_BASE_URL optional Override the Veto API base. Default https://veto-ai.com.
WALLET_PRIVATE_KEY EVM + Solana settle Agent's private key. EVM: 0x-hex. Solana: base58.
WALLET_CONTRACT EVM settle The deployed VetoGuardedAccount address. Set by veto agent init.
RPC_URL EVM settle EVM RPC endpoint. Auto-detected from chain= if unset.
SOLANA_RPC_URL Solana settle Solana RPC. Defaults to Devnet.
VETO_GUARDED_PROGRAM_ID Solana settle Program ID of the deployed Solana program.
VETO_RAIL optional evm or solana — overrides the auto detection.

Decision-only mode

For cooperative-mode integrations (no on-chain settlement, just verdict + receipt):

result = await pay(
    url=url, max_amount="$0.05", decision_only=True
)
# result.tx_hash is None; result.decision + result.receipt are populated.

Useful when:

  • The rail handles settlement upstream (e.g., pay.sh's hosted x402 facilitator)
  • You're running a dry-run before flipping enforcement on
  • You're auditing decisions without enforcing them

Tests

pip install -e .[dev,evm,solana]
pytest

Public artifacts

Artifact Repository
This package veto-protocol/veto-pay
Companion JS veto-protocol/veto-pay-js
Veto CLI veto-protocol/veto-cli
EVM contract veto-protocol/contracts
Solana program veto-protocol/solana-program
Off-chain verifier (TS) veto-protocol/mandate-verifier

License

MIT.


One line. Any rail. Safe transactions.
Built by Investech Global LLC · part of the veto-protocol family.

Metadata

Release files for veto-pay 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veto-pay 0.6.2
File Size Uploaded Provenance Actions
veto_pay-0.6.2.tar.gz 17.2 kB Without provenance Details for veto_pay-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for veto-pay 0.6.2
File Interpreter ABI Platform Actions
veto_pay-0.6.2-py3-none-any.whl Python 3 none any Details for veto_pay-0.6.2-py3-none-any.whl

Total release size: 37.1 kB

Release files / veto_pay-0.6.2.tar.gz

Download URL veto_pay-0.6.2.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
60960c86d7dea17cf1cb0551b3da27ed87e2a6a43f323b1b6401583d825f5033
BLAKE2b-256 checksum
How to use checksums
26783920b9ebd0447239e8f03b7a990850432a93655a7b24be469b68b5f6fd99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / veto_pay-0.6.2-py3-none-any.whl

Download URL veto_pay-0.6.2-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2783eb047053c63af22b33a7b1e709ad2b3d2f642c56c827843edb4f65c6340d
BLAKE2b-256 checksum
How to use checksums
44d914f25f72cd6f4ba7da9e2d75bafc29bc56a6544e90383fa4f28c6e009c00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Security for veto-pay 0.6.2

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.

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page