Conversations
Class: Conversations
Conversations allows you to view ongoing 1:1 messaging sessions with another wallet
Constructors
constructor
• new Conversations(client
)
Parameters
Name | Type |
---|---|
client | Client |
Defined in
conversations/Conversations.ts:19
Methods
list
▸ list(): Promise
<Conversation
[]>
List all conversations with the current wallet found in the network, deduped by peer address
Returns
Promise
<Conversation
[]>
Defined in
conversations/Conversations.ts:26
newConversation
▸ newConversation(peerAddress
): Promise
<Conversation
>
Creates a new conversation for the given address. Will throw an error if the peer is not found in the XMTP network
Parameters
Name | Type |
---|---|
peerAddress | string |
Returns
Promise
<Conversation
>
Defined in
conversations/Conversations.ts:154
stream
▸ stream(): Promise
<Stream
<Conversation
>>
Returns a stream of any newly created conversations. Will dedupe to not return the same conversation twice in the same stream. Does not dedupe any other previously seen conversations
Returns
Promise
<Stream
<Conversation
>>
Defined in
conversations/Conversations.ts:56
streamAllMessages
▸ streamAllMessages(): Promise
<Stream
<Message
>>
Returns a stream for all new messages from existing and new conversations.