The secondary /inbox entrypoint provides a set of hooks to help integrate XMTP SDK features with the Lens SDK. The hooks are intended to be used together with hooks provided by @xmtp/react-sdk package. You can find more in their GitHub repository

Usage

Wrap your app with LensProvider, together with the XMTPProvider, as described in their docs.

import { XMTPProvider } from "@xmtp/react-sdk";

function App() {
return (
<WagmiConfig config={config}>
<LensProvider config={lensConfig}>
<XMTPProvider>
<YourRoutes />
</XMTPProvider>
</LensProvider>
</WagmiConfig>
);
}

Now you can use all the hooks from @xmtp/react-sdk package as well as from this folder.

You import them like this:

import { useConversations } from '@xmtp/react-sdk';
import { useXmtpClient, useEnhanceConversations } from '@lens-protocol/react-web/inbox';

Index

Hooks - Inbox

Type Aliases