Your Solana bot signs whatever the API sends back. Here's a one-line check (npm + PyPI).
Over the last few weeks I read the signing code of a lot of open-source Solana bots and agents: trading bots, copy traders, launchpad tools, AI agents with a wallet. The same pattern shows up again and again: const tx = VersionedTransaction . deserialize ( Buffer . from ( body . swapTransaction , "base64" ) ) ; tx . sign ( [ wallet ] ) ; // signs whatever came back await connection .…
Many open-source Solana bots and agents share a common practice: they deserialize a signed transaction, sign it with a wallet, and send it to the network using a connection. This approach is used for various purposes, such as trading bots, copy traders, launchpad tools, and AI agents with a wallet. The process involves building the transaction based on someone else's code (e.g., Jupiter's /swap or Ultra's order, PumpPortal, a launchpad API) and then signing it without verifying the contents first.
While this method works well most of the time, it can lead to unintended consequences if the response is incorrect due to a bad config, compromised endpoint, proxy, or other issues. To address this concern, the author created a one-line check using the solana-pulse package that can be easily integrated into JavaScript/TypeScript or Python projects.
This check sends the unsigned transaction to Solana Pulse, which decodes the transaction, dry-runs it on the live mainnet, and returns either OK, REVIEW, or BLOCK with the wallet's SOL and token changes. If the transaction is deemed safe, it can be signed and sent to the network. The solana-pulse tool has been tested on 200 real mainnet transactions, with zero false BLOCKs, and it successfully caught 9 out of 9 attack cases in a public benchmark.
It also confirmed 80 of 80 transfers and 26 of 27 swaps. To use the tool, install it via npm or pip, and then use the checkBeforeSign function to verify the transaction before signing it.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.