Optional
consentProof of consent for the conversation, used when a user has pre-consented to a conversation
Optional
contextOptional field containing the conversationId
and metadata
for V2 conversations.
Will always be undefined on V1 conversations
Timestamp the conversation was created at
The wallet address of the other party in the conversation
A unique identifier for a conversation. Each conversation is stored on the network on one topic
The wallet address connected to the client
Returns the consent state of the conversation peer address
A unique identifier for ephemeral envelopes for a conversation.
Returns true if conversation peer address is on the allow list
Returns true if conversation peer address is on the deny list
Takes a XMTP envelope as input and will decrypt and decode it
returning a DecodedMessage
instance.
Returns a list of all messages to/from the peerAddress
Optional
opts: ListMessagesOptionsOptional
opts: ListMessagesPaginatedOptionsReturn a PreparedMessage
that has contains the message ID
of the message that will be sent.
Optional
options: SendOptionsSend a message into the conversation
Optional
options: SendOptionsReturn a Stream
of new ephemeral messages from this conversation's
ephemeral topic.
Stream instances are async generators and can be used in
for await
statements.
for await (const message of await conversation.streamEphemeral()) {
console.log(message.content)
}
Optional
onConnectionLost: OnConnectionLostCallbackReturns a Stream of any new messages to/from the peerAddress
Optional
onConnectionLost: OnConnectionLostCallback
ConversationV2