# Integrating the Widget

## Custom Integration Steps

1. Install NPM package "react-wallet-chat"

`yarn add react-wallet-chat` if using **yarn** instead of **npm**

2. On any page you wish to have the chat widget active, import:

`import {`WalletChatProvider, `WalletChatWidget} from 'react-wallet-chat'`

And include in your page source:

`<WalletChatWidget />`

3. Add the WalletChat Widget with connectedWallet parameter to include the address, activeConnector and chainId.\
   PS: in this case the *activeConnector* is from the WAGMI package, and could be substituted as needed to get the wallet name/type.

```tsx
<WalletChatProvider>
    <FunctionalComponent {...pageProps} />

    <WalletChatWidget
      connectedWallet={
          address && activeConnector && chainId
            ? {
            walletName: activeConnector.name,
            account: address,
            chainId: chain.id,
          }
        : undefined
      }
    />
<WalletChatProvider>
```


---

# 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.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.
