solana-pulse
Check a Solana transaction before you sign it. One call, right before the signature:
from solana_pulse import check_before_sign
check_before_sign(swap_tx) # raises PulseBlocked unless Pulse answers OK
signed = VersionedTransaction(swap_tx.message, [keypair])
If your bot or agent signs transactions that someone else built (Jupiter's /swap or Ultra /order, PumpPortal, Bags,
a launchpad API), the key signs whatever comes back. check_before_sign dry-runs the unsigned transaction on live
mainnet first and stops anything that isn't what you meant: an extra transfer out of the wallet, a different output
token, a drainer approval, or a transaction that would simply fail.
check_tx: decodes each step, dry-runs it, and answers OK, REVIEW or BLOCK with each wallet's SOL and token changes.tx_matches: confirms a transfer or swap does exactly what you asked: token, amount and recipient, nothing hidden.token_safety: SAFE, CAUTION or AVOID for a token, with reasons, from a real sell test.
Every answer comes from live mainnet data and names its source. "OK" means none of the traps Pulse knows about are present; no check can promise a transaction is safe.
Install
pip install solana-pulse
No dependencies: the standard library only. Works with solders, solana-py, raw bytes or base64.
Use
from solana_pulse import check_before_sign, PulseBlocked, PulseUnavailable
# A Jupiter swap: also confirm it sells exactly what you asked and pays the bought token back to your wallet.
check = check_before_sign(
tx, # base64, bytes, or a solders VersionedTransaction (unsigned is fine)
expected={"action": "swap", "sell": "SOL", "amount": "0.5", "buy": USDC_MINT},
)
print(check["summary"]) # e.g. "OK: Your wallet sends: 0.5 SOL ..."
# A transfer built from "send 5 USDC to X":
check_before_sign(tx, expected={"token": USDC_MINT, "amount": "5", "to": recipient})
check_before_sign raises:
| Error | When |
|---|---|
PulseBlocked |
Pulse answered BLOCK, or REVIEW (unless allow_review=True), or the transfer/swap doesn't match expected. .verdict and .check hold Pulse's full answer. |
PulseUnavailable |
Pulse couldn't be reached or couldn't check. Not checked is never treated as safe. |
PulsePaymentRequired |
Today's free calls are used up. .terms holds the x402 payment terms. |
Lower-level calls return Pulse's answer as a dict: check_tx(tx), tx_matches(tx, expected), token_safety(mint), or
the same methods on PulseClient(api_key=..., base_url=..., timeout=...).
Cost
Each tool gives 25 free calls a day per caller, with no key. After that a call costs $0.02 USDC (check_tx, tx_matches,
token_safety), paid per request with x402, or set PULSE_API_KEY. Calls that
fail are never charged.
Tests
python -m unittest discover -s tests
The tests replay real answers recorded from the live service (scripts/record_fixtures.py); no network needed.
Part of Solana Pulse (principles). MIT license.
Metadata
Release files for solana-pulse 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 |
|---|---|---|---|---|
| solana_pulse-0.1.0.tar.gz | 13.4 kB | With provenance | Details for solana_pulse-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solana_pulse-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for solana_pulse-0.1.0-py3-none-any.whl |
Total release size: 20.0 kB
Release files / solana_pulse-0.1.0.tar.gz
| Download URL | solana_pulse-0.1.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00c77a188caa6582716cfaf5aafa104087f3630e62a49a5fd5f52c7a51511ab1
|
|
BLAKE2b-256 checksum How to use checksums |
1bf7bcdc89291b974c3cfdf064bf15809c8b0d1d610e82f0da017ddbf08a6f04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / solana_pulse-0.1.0-py3-none-any.whl
| Download URL | solana_pulse-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5cd832285e38c922f942360e46f1d2d8e4a6e95c5b7dc0106a08281f70ab456
|
|
BLAKE2b-256 checksum How to use checksums |
e246d4385b08676cd8aea28bd041aaa1f3be1217eb783c8d8b5cf58d8cc95ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for solana-pulse 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for solana_pulse-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA 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.