The SDK can parse structured data from EIP-712 messages, which ensures that users understand information related to asset security before signing. This includes ERC20 approval, NFT listing, and other relevant details.
yarn add @scamsniffer/eip712-readability
import { Security, parseRequest } from "@scamsniffer/eip712-readability";
const eip721TypedMessage = ....;
const parsedMessage = parseRequest(eip721TypedMessage);
if (parsedMessage.kind === "nft") {
// Built-in price-based NFT Listing check
const hasIssueMesssages = await Security.checkNFTMessages([parsedMessage.detail]);
if (hasIssueMesssages.length) {
console.log("Suspicious messages detected")
}
}
- Permit2
- ERC20 Permit
- Dai Permit
- Seaport
- Seaport-1.4
- Blur
- LooksRare
- Element
- ZeroEx-V4