---
description: Event hooks (call backs)
---

# Event Hooks

Events for listening to user interaction. Add one or more hooks per event type into your solution.&#x20;



<table><thead><tr><th>hook name (string)</th><th>data returned</th></tr></thead><tbody><tr><td>tokens-selected</td><td><p></p><pre class="language-typescript"><code class="lang-typescript">data: object
  selectedTokens: object
    issuer: string
      tokens: array
        token: object
</code></pre></td></tr><tr><td>tokens-loaded</td><td><pre class="language-typescript"><code class="lang-typescript">data: object
    loadedCollections: int
</code></pre></td></tr><tr><td>network-change</td><td><p></p><pre class="language-typescript"><code class="lang-typescript">string
</code></pre></td></tr><tr><td>token-proof</td><td><p>Single token:</p><p></p><pre class="language-typescript"><code class="lang-typescript">data: object
  proof: string
  tokenId: string
  type: string
  error: Object
  issuer: string
</code></pre><p></p><p>Multiple tokens:</p><pre class="language-typescript"><code class="lang-typescript">issuers: object keys
  issuerName: object key 
    tokenUID: object
      proof: string
      tokenId: string
      type: string
</code></pre></td></tr><tr><td>connected-wallet</td><td><p></p><pre class="language-typescript"><code class="lang-typescript">address: string
blockchain: string
chainId: string | number
ethers: module
provider: module
providerType: string
</code></pre></td></tr><tr><td>error</td><td>Error data</td></tr><tr><td>view-changed</td><td>n/a</td></tr><tr><td>tokens-refreshed</td><td>n/a</td></tr><tr><td>opened-overlay</td><td>n/a</td></tr><tr><td>closed-overlay</td><td>n/a</td></tr><tr><td>loaded</td><td>n/a</td></tr><tr><td>disconnected-wallet</td><td>n/a</td></tr><tr><td>user-cancel</td><td><pre class="language-typescript"><code class="lang-typescript">eventType: string 
</code></pre></td></tr><tr><td>page-redirecting</td><td><pre class="language-typescript"><code class="lang-typescript">collectionId: string
tokenOrigin: string
</code></pre></td></tr></tbody></table>



Example usage:

```
negotiator.on("loaded", () => {
    // do something here when the Token Negotiator has loaded
});
```



Do you have an use case for an event hook we don't currently provide? Please reach out to us on [discord](https://discord.com/invite/CfvmYFyujW) or via sayhi@smarttokenlabs.com&#x20;
