@lens-protocol/react-web
Version:
Lens Protocol SDK for React web applications
34 lines (33 loc) • 910 B
TypeScript
import { Profile } from '@lens-protocol/react';
import { useStartConversation } from '@xmtp/react-sdk';
/**
* @experimental
*/
export type StartLensConversationRequest = {
/**
* Profile to start a conversation with
*/
peerProfile: Profile;
};
/**
* @experimental
*/
export type UseStartLensConversationResult = ReturnType<typeof useStartConversation>;
/**
* Start a new XMTP conversation between two Lens profiles.
*
* You MUST be authenticated via `useLogin` to use this hook.
*
* @example
* ```tsx
* const { startConversation, isLoading, error } = useStartLensConversation({
* peerProfile,
* });
*
* const newConversation = await startConversation(peerProfile.ownedBy.address, firstMessage);
* ```
* @category Inbox
* @group Hooks
* @experimental
*/
export declare function useStartLensConversation(args: StartLensConversationRequest): UseStartLensConversationResult;