async function searchAsset(content) {
const response = await fetch(
"https://app.chainpatrol.io/api/v2/asset/search",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY_HERE",
},
body: JSON.stringify({
content,
}),
}
);
return response.json();
}
searchAsset("https://example-phishing.com")
.then((result) => console.log("Search result:", result))
.catch((error) => console.error("Error:", error));