Widget

Embed TrustGate in your DEX

One script tag, one data attribute. Any token-address input field becomes a live trust signal — no API key, no SDK, no React adapter required.

One-line install

Drop this once at the bottom of your <body> or in the <head>. The widget auto-detects token-address inputs anywhere on the page, including ones added later.

<script src="https://www.trustgated.xyz/widget.js"></script>

Live demo

The input below is a plain <input> with data-trustgate="token-shield". Paste any Arc testnet contract address and the badge updates 800ms after you stop typing. Try a verified ERC-20 or any deployed contract address.

Integration examples

HTML

<!-- 1. Load the widget once, anywhere on the page -->
<script src="https://www.trustgated.xyz/widget.js"></script>

<!-- 2. Tag any token-address input with data-trustgate -->
<label>
  Token address
  <input type="text" data-trustgate="token-shield" placeholder="0x..." />
</label>

React / Next.js

// app/_document.tsx (or anywhere in <head>)
import Script from "next/script";

export default function Document() {
  return (
    <>
      <Script
        src="https://www.trustgated.xyz/widget.js"
        strategy="afterInteractive"
      />
      {/* ...rest of the app */}
    </>
  );
}

// In any component:
export function TokenAddressField() {
  return (
    <input
      type="text"
      data-trustgate="token-shield"
      placeholder="0x..."
    />
  );
}

Plain JS (runtime injection)

// Load the widget at runtime if you can't add a <script> tag manually.
const s = document.createElement("script");
s.src = "https://www.trustgated.xyz/widget.js";
s.async = true;
document.head.appendChild(s);

// Mark any input you want scored — works for inputs added later too,
// the widget watches the DOM for new tagged fields.
const input = document.querySelector("#token-address");
input.setAttribute("data-trustgate", "token-shield");

What renders

  • HIGH_ELITE / HIGH — green badge, signals the contract has strong on-chain behaviour and a trusted deployer.
  • MEDIUM — yellow caution badge.
  • LOW — red low-trust badge.
  • NTT — Not a Tradeable Token. Returned for NFT contracts, non-token contracts, and wallet addresses.
  • Invalid or unknown address — no badge is rendered. The widget never replaces or styles the host input itself, so your DEX layout is untouched.

Free during Arc testnet

The widget endpoint at /api/widget/score/{address} is rate-limited to 60 requests per minute per IP and requires no API key. Pricing for mainnet integrations will be announced ahead of the Arc mainnet launch — testnet usage stays free.