Package Exports
- token-sniffer-lite
- token-sniffer-lite/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (token-sniffer-lite) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
token-sniffer-lite (Advanced Developer Version)
๐ง A flexible, chain-agnostic tool to detect risky EVM token contracts using custom RPC and explorer config.
๐ Installation
npm install token-sniffer-lite
โ๏ธ usage
import { sniffToken } from "token-sniffer-lite";
const config = {
rpcUrl: "https://bsc-dataseed.binance.org/",
explorerApiKey: "YOUR_BSCSCAN_API_KEY",
explorerApiBase: "https://api.bscscan.com/api",
chainName: "bsc" // Optional
};
const address = "0xabc123..."; // Token contract address
const result = await sniffToken(address, config);
console.log(result);๐งช Example Output
{
"isVerified": true,
"hasBlacklist": false,
"canMint": true,
"hasHiddenFees": true,
"honeypotRisk": false,
"ownerControlsAll": true,
"isRenounced": false,
"liquidityLocked": false,
"score": 30
}What it Checks
| Feature | Description |
| ------------------ | ------------------------------------------------------------------------- |
| `isVerified` | Checks if contract is verified on explorer (Etherscan, BscScan, etc.) |
| `canMint` | Flags if the contract has public minting functions |
| `hasBlacklist` | Checks for blacklist functions that can restrict users |
| `hasHiddenFees` | Flags presence of tax/fee setter functions (`setFee()`, `setTax()`, etc.) |
| `honeypotRisk` | Simulates a `transfer()` to detect honeypots (buy-only traps) |
| `ownerControlsAll` | Owner has permission to mint, blacklist, tax, etc. |
| `isRenounced` | Checks if contract ownership has been renounced |
| `liquidityLocked` | ๐ง Not implemented yet โ will check LP lock/burn |
| `score` | Final score out of 100 (higher = safer) |