# Chat With Owner

## Chat With Owner

To implement a "Chat With Owner" type feature as demonstrated at [nft.walletchat.fun](https://nft.walletchat.fun) :

1. Ensure your NPM package is up to date `yarn upgrade react-wallet-chat`
2. Import the ChatWithOwner button:

```tsx
import { ChatWithOwner } from 'react-wallet-chat'
```

3. The owner address is the message recipient, and is set via the *ownerAddress* parameter.  Here is a code snipped to render a Chat WIth Owner button and the underlying functionality:

<pre class="language-tsx"><code class="lang-tsx">{<a data-footnote-ref href="#user-content-fn-1">token?.owner</a> &#x26;&#x26; (
  &#x3C;ChatWithOwner
    ownerAddress=<a data-footnote-ref href="#user-content-fn-1">{token?.owner}</a>
    render={&#x3C;Button css={buttonCss} color="gray3" />}
  />
)}
</code></pre>

4. Add the following to the main App code, in this case the *activeConnector* is from the WAGMI package, and could be substituted as needed to get the wallet name/type.

<pre class="language-tsx"><code class="lang-tsx">&#x3C;WalletChatProvider>
  <a data-footnote-ref href="#user-content-fn-2">&#x3C;FunctionalComponent {...pageProps} /></a>

  &#x3C;WalletChatWidget
    connectedWallet={
      address &#x26;&#x26; activeConnector &#x26;&#x26; chainId
        ? {
            walletName: activeConnector.name,
            account: address,
            chainId: chain.id,
          }
        : undefined
    }
  />
&#x3C;/WalletChatProvider>
</code></pre>

[^1]: *token?.owner* can be replaced with the owner object and address of the integrating site

[^2]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.walletchat.fun/developer-docs/integrating-the-widget/chat-with-owner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
