oceanalt-agentkit-hook (Python)
A synchronous before-payment check for Coinbase AgentKit x402 payments. Before anything is signed, it asks OceanAlt for a decision on the payee: allow, review or decline.
- With the x402 SDK hook (
on_before_payment_creation, used by AgentKit #1577) it returnsAbortResultto block andNoneto allow. The SDK only blocks onAbortResult; a returned dict or a coroutine would let the payment through, so this package never returns those to the SDK. - With a dict context shaped like AgentKit #1454 it returns
{"abort": True, "reason": ..., "code": ...}to block andNoneto allow.
Defaults are fail-closed: review, an unreachable service, a timeout (3 s) and a missing payTo all block. Change with on_review, on_error, on_missing_pay_to, timeout_s.
from oceanalt_agentkit_hook import oceanalt_before_payment
client.on_before_payment_creation(oceanalt_before_payment())
It calls the free POST https://oceanalt.com/api/decide, sending the payee, network, asset, amount and the paid URL without its query string, so the service can also check the payee against that origin's own quote. Without a key the free endpoint allows 2,000 calls a month per source, then answers 402, which blocks payments under the default on_error="block". For production agents, get a free key at https://oceanalt.com/en/api-keys (email only, 5,000 calls a month) and pass it as api_key. OceanAlt holds no keys and moves no money. Not affiliated with Coinbase. MIT.
Metadata
Release files for oceanalt-agentkit-hook 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oceanalt_agentkit_hook-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for oceanalt_agentkit_hook-0.1.0-py3-none-any.whl |
Release files / oceanalt_agentkit_hook-0.1.0-py3-none-any.whl
| Download URL | oceanalt_agentkit_hook-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3daf2262a8ff55efba5492660d10e00a91375b08ae84d57258e20e2e0ee8f852
|
|
BLAKE2b-256 checksum How to use checksums |
ed6f0c16a2ce0912f5ac133cc1fb99ed62faa09ff07948485730fbaeea4d3b00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for oceanalt-agentkit-hook 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.