txshield-npm
v1.0.1
Published
Transaction & smart contract security analysis tool
Readme
🛡️ TxShield SDK
TxShield SDK is a lightweight client for interacting with the TxShield backend APIs.
It enables developers to run transaction simulations, perform honeypot checks, and detect phishing risks in real time.
📦 Installation
npm install txshield-npm
⚡ Quick Start
const createTxShield = require("txshield-npm");
const txshield = createTxShield({
baseUrl: "https://your-backend-url.com", // 🔗 Replace with your backend API
withCredentials: true
});
(async () => {
try {
// 🔹 Simulation
const sim = await txshield.simulateTransaction({
userAddress: "0xabc...",
recepientAddress: "0x123...",
amount: "1",
currencySymbol: "ETH"
});
console.log("Simulation:", sim);
// 🔹 Honeypot Detection
const honeypot = await txshield.honeypotChecks({
contractAddress: "0xdef...",
userAddress: "0xabc...",
recepientAddress: "0x123...",
value: "1",
currencySymbol: "ETH"
});
console.log("Honeypot:", honeypot);
// 🔹 Phishing Detection
const phishing = await txshield.phishingChecks({
userAddress: "0xabc...",
recepientAddress: "0x123...",
currencySymbol: "ETH"
});
console.log("Phishing:", phishing);
} catch (err) {
console.error("TxShield Error:", err.message);
}
})();