Skip to content

bhupendra05/txlens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

txlens 🔎🟣

"Sign this transaction?" — but what does it actually DO? Wallet drainers rely on you blind-signing. txlens decodes a raw Solana transaction (base64) into plain English — every program, every instruction, the SOL/token amounts — and flags the dangerous ones (token approvals, authority changes, account closes). All offline; the bytes never leave your machine. Zero dependencies.

Python Solana Dependencies

$ txlens <base64-transaction>

🔎 txlens — legacy transaction · fee payer 7Np41oeY…
  3 instruction(s):

  1. Compute Budget — SetComputeUnitPrice: 20000 µlam/CU
  2. System Program — Transfer 0.5 SOL  →  9xQeWvG8…
  3. SPL Token — ⚠️ Approve: delegate FjKd2s… can move 1000000 tokens
        ⚠️ this grants someone authority over your tokens

What it does

Parses the Solana wire format from scratch — signatures, message header, account keys (base58), and each instruction — then maps known program IDs (System, SPL Token / Token-2022, Associated Token, Memo, Stake, Compute Budget) and decodes common instructions (Transfer, TransferChecked, Approve, Revoke, CloseAccount, SetAuthority, MintTo, Burn, SetComputeUnitPrice…).

⚠️ Risk flags on the operations drainers love: Approve, SetAuthority, CloseAccount.

Usage

txlens <BASE64_TX>
txlens --file tx.txt
echo "<BASE64_TX>" | txlens -
txlens <BASE64_TX> --json

Install

pip install txlens

License

MIT

About

Decode a raw Solana transaction into plain English before you sign — flags drainer-style ops. Offline, zero-dep.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages