Skip to main content

What it is

The Widget is the fastest way to put TrustGate in front of a user. It is a small piece of script that renders a live trust badge right inside your interface. You add one line, point it at what you want scored, and a badge appears where you placed it. No backend to stand up. No wallet connection to request. No badge to design and maintain. The read, the styling, and the live updates are handled for you. The embedder never pays. TrustGate settles the upstream ERC-20 query from a server wallet. There are two scripts. Do not mix them up. They do not interfere. You can use both on different pages.

Single-token widget

Two modes:
  • Input mode. Tag a text field with data-trustgate="token-shield". After the user stops typing for 800ms, a badge appears below the input.
  • Inline mode. Tag any element with data-trustgate="token-shield" and data-trustgate-address="0x...". A compact badge renders immediately after it.
data-trustgate-style="full" shows score and tier (87 ยท HIGH_ELITE). minimal (the default) shows the tier only. The widget only scores ERC-20s. NFT contracts, other contracts, and wallets return NTT and render nothing. Official issuer tokens return VERIFIED. Invalid addresses render nothing. The host input is never restyled. Backing endpoint: GET /api/widget/score/{address}. Open CORS. Default 8 requests per minute per client IP. Cached addresses do not re-spend. Full attributes and examples: Widget integration.

Discovery widget

The script collects every slot, makes one POST /api/batch call, and fills compact marks (58 MID). Flags are off by default so nothing widens your rows. Turn them on with data-trustgate-flags="on". You can also mark a search-results container and let the script badge, and optionally reorder, client-side. Reorder is opt-in. See Discovery and Optional reorder.

Why reach for it first

Most teams do not want to build a trust UI from scratch, and they should not have to. Drop it next to a token on a swap screen, beside a name in a list, or anywhere an address shows up and a user is about to make a call.
The Widget is the non-invasive principle in its purest form. It is a badge that reports a signal. It never touches your wallet flow, never interrupts a user, and never takes over your interface.

Get it

Widget integration guide

Script tags, attributes, modes, rate limits, end to end.

Prefer raw data?

Skip the badge and consume the score yourself.