# Iframe

The CabalSpy Widget visualizes Solana blockchain buy/sell transactions for a token mint address, embedded via an iframe.Iframe Integration<br>

1. **Add Iframe**

   ```html
   <iframe
     src="https://widget.YOUR IP:0000/widget?address=7c5fihdNoqGsDz3Dmp9F96LRqanAaKj79HjsDRNdbonk"
     allow="clipboard-write; clipboard-read"
     width="800"
     height="600"
     frameborder="0"
     style="border: none;"
   ></iframe>
   ```

   * URL: <https://widget.YOUR> IP:0000/widget?address={mint\_address}
   * Parameters: address (required, 32-44 alphanumeric characters).
   * Attributes: Set width/height; frameborder="0".<br>

**Transaction Display**

* Central Token Node: Circle with token symbol (e.g., $SOL, white text, dark gray background). Click for popup with buy/sell totals (green/red) and PNL.
* Wallet Nodes: Circles in a ring around token, sized by PNL (green border for profit, red for loss). Show profile image or shortened address. Click for popup with buy/sell amounts and PNL.
* Transaction Lines: Curved green lines (buys, token to wallet) or red lines (sells, wallet to token), thickness based on transaction count.
* Leaderboard: Trophy button (top-right) opens a table with wallet names, images, PNL (green/red), and links to CabalSpy.
* Real-Time Updates: New transactions update nodes, lines, and leaderboard dynamically via WebSocket.
* Errors: “No KOLs have invested” or “Error loading data” shown in a centered, semi-transparent black box.<br>

**Notes**

* Responsive, scales with iframe (min 400px, best ≥600px).
* Invalid addresses show error messages.
* Requires Font Awesome for icons.
