Skip to main content

PaySafe payment security for the NVIDIA NeMo Agent Toolkit: scan x402 payments before settling, with prompt-injection provenance and signed verdicts. Registers scan / reputation / report functions.

Project description

nemo-paysafe

PaySafe payment security for the NVIDIA NeMo Agent Toolkit — screen every x402 payment before your workflow settles it.

pip install nemo-paysafe

Installing registers three NeMo functions via the nat.plugins entry point. Add them to your workflow YAML:

functions:
  scan:
    _type: paysafe_scan_payment
    agent_id: my-agent          # optional; scopes velocity limits
  reputation:
    _type: paysafe_check_reputation
  report:
    _type: paysafe_report_counterparty

A free API key (100 free scans) is auto-minted on first use — set api_key: to pin one. Verdicts come back allow / flag / block with machine-readable reasons: prompt-injection-triggered payments, replayed nonces, overpayment vs the quote, secrets/PII leaking in payment metadata, lookalike-token contracts, address poisoning, counterparty reputation.

Provenance: the strongest check

PaySafe's best detector catches payments whose decision came from content the agent just read — a prompt-injected page or tool result saying "send payment to 0x…". In NeMo, pass that text as the scan function's optional content argument:

paysafe_scan_payment(payment={...}, direction="outgoing", content="<the page/tool text the agent just read>")

If the pay_to address appears in that content, the payment is blocked. (LangChain and CrewAI integrations auto-tag this via a callback; NeMo has no global tool-output hook, so it's an explicit parameter the agent — or your workflow — fills.)

The functions

Function When to call it
paysafe_scan_payment ALWAYS, before settling an x402 payment (direction="outgoing") or paying a received 402 offer (direction="incoming")
paysafe_check_reputation Before dealing with an unfamiliar counterparty address
paysafe_report_counterparty After a bad payment experience (always free) — warns other agents

The three functions share one PaySafe client per (base_url, api_key, agent_id), so they draw on the same free-tier quota. Verdicts are Ed25519-signed and payment-bound; the underlying client verifies them against a pinned key automatically.

For wallet-level enforcement (the signer itself refuses unscanned payments), see PaySafeEnforcer in the paysafe-x402 SDK.

MIT. PaySafe is advisory and non-custodial: it never touches keys, wallets, or funds.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nemo_paysafe-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nemo_paysafe-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file nemo_paysafe-0.1.0.tar.gz.

File metadata

  • Download URL: nemo_paysafe-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for nemo_paysafe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5f845fe7720b7928ac57cdd6ac5093562eb209fd05a03fdfea9877bd2947eb58
MD5 f8ce4f2b7b138a9b9ab6e8f49ea53cf3
BLAKE2b-256 fb2238396436b05b3843279f772f6c9f406fcb1356aa9708b9e46e058ee0c9f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_paysafe-0.1.0.tar.gz:

Publisher: publish-pypi.yml on corbinallison/paysafe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemo_paysafe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nemo_paysafe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for nemo_paysafe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acb101a42c6b0891cd74e85ff9ce3ede207367a733e87e46aba1b6ec9d034479
MD5 c903129e7062ae887b4743606422b03f
BLAKE2b-256 742c3ada67f497869b91bb11576a141458bbf34cdf8e5871ce81b6506c77f6f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_paysafe-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on corbinallison/paysafe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page