diff --git a/classes/Client.html b/classes/Client.html index b5e340887..17920b0ad 100644 --- a/classes/Client.html +++ b/classes/Client.html @@ -1,4 +1,4 @@ -
Determines whether the current user can send messages to a specified peer.
This method checks if the specified peer has signed up for XMTP and ensures that the message is not addressed to the sender (no self-messaging).
The address of the peer to check for messaging eligibility.
A Promise resolving to true if messaging is allowed, and false otherwise.
-Decrypts an encrypted local attachment.
+Decrypts an encrypted local attachment.
This asynchronous method takes an encrypted local attachment and decrypts it.
The encrypted local attachment to be decrypted.
A Promise that resolves to the decrypted local attachment.
Throws an error if the attachment is not a local file URI (must start with "file://").
-Encrypts a local attachment for secure transmission.
+Encrypts a local attachment for secure transmission.
This asynchronous method takes a file, checks if it's a local file URI, and encrypts the attachment for secure transmission.
The local attachment to be encrypted.
A Promise that resolves to the encrypted local attachment.
Throws an error if the attachment is not a local file URI (must start with "file://").
-Exports the key bundle associated with the current XMTP address.
This method allows you to obtain the unencrypted key bundle for the current XMTP address. Ensure the exported keys are stored securely and encrypted.
A Promise that resolves to the unencrypted key bundle for the current XMTP address.
-Retrieves a list of batch messages based on the provided queries.
+Retrieves a list of batch messages based on the provided queries.
This method pulls messages associated from multiple conversation with the current address and specified queries.
An array of queries to filter the batch messages.
A Promise that resolves to a list of batch messages.
The error is logged, and the method gracefully returns an empty array.
-Sends a prepared message.
The prepared local message to be sent.
A Promise that resolves to a string identifier for the sent message.
Throws an error if there is an issue with sending the prepared message.
-Static
canStatic
canStatic method to determine if the address is currently in our network.
This method checks if the specified peer has signed up for XMTP.
The address of the peer to check for messaging eligibility.
Optional
opts: Partial<NetworkOptions>Optional configuration options for the Client.
-Static
createStatic
createCreates a new instance of the Client class using the provided signer.
The signer object used for authentication and message signing.
Optional
opts: Partial<NetworkOptions> & { Optional configuration options for the Client.
A Promise that resolves to a new Client instance.
See XMTP Docs for more information.
-Static
createCreates a new instance of the Client class from a provided key bundle.
+Static
createCreates a new instance of the Client class from a provided key bundle.
This method is useful for scenarios where you want to manually handle private key storage, allowing the application to have access to XMTP keys without exposing wallet keys.
The key bundle used for address generation.
Optional
opts: Partial<NetworkOptions> & { Optional configuration options for the Client.
A Promise that resolves to a new Client instance based on the provided key bundle.
-Static
createCreates a new instance of the XMTP Client with a randomly generated address.
+Static
createCreates a new instance of the XMTP Client with a randomly generated address.
Optional
opts: Partial<NetworkOptions> & { Optional configuration options for the Client.
A Promise that resolves to a new Client instance with a random address.
-Generated using TypeDoc
Generated using TypeDoc
Static
fromGenerated using TypeDoc
Static
fromGenerated using TypeDoc
Optional
context?: ConversationContextOptional
conversationID?: stringOptional
contextOptional
conversationIDOptional
context?: ConversationContextOptional
conversationID?: stringOptional
contextOptional
conversationIDRetrieves the consent state for the current conversation.
This asynchronous method determine the consent state for the current conversation, indicating whether the user has allowed, denied, or is yet to provide consent.
A Promise that resolves to the consent state, which can be "allowed," "denied," or "unknown."
-Decodes an encrypted message, yielding a DecodedMessage
object.
Decodes an encrypted message, yielding a DecodedMessage
object.
This asynchronous method takes an encrypted message and decodes it.
The result is a DecodedMessage
object containing the decoded content and metadata.
The encrypted message to be decoded.
A Promise that resolves to a DecodedMessage
object.
Throws an error if there is an issue with decoding the message.
-Lists messages in a conversation with optional filters.
+Lists messages in a conversation with optional filters.
Optional
limit: numberOptional limit to the number of messages to return.
Optional
before: number | DateOptional timestamp to filter messages before.
Optional
after: number | DateOptional timestamp to filter messages after.
@@ -34,7 +34,7 @@A Promise that resolves to an array of decoded messages.
Throws an error if there is an issue with listing messages.
Support pagination and conversation ID in future implementations.
-Prepares a message to be sent, yielding a PreparedLocalMessage
object.
Prepares a message to be sent, yielding a PreparedLocalMessage
object.
Instead of immediately sending a message, you can prepare it first using this method.
This yields a PreparedLocalMessage
object, which you can send later.
This is useful to help construct a robust pending-message queue
@@ -44,18 +44,18 @@
Support pagination and conversation ID in future implementations
The content of the message. It can be either a string or a structured MessageContent object.
A Promise that resolves to a PreparedLocalMessage
object.
Throws an error if there is an issue with preparing the message.
-Sends a message to the current conversation.
The content of the message. It can be either a string or a structured MessageContent object.
Optional
opts: SendOptionsA Promise that resolves to a string identifier for the sent message.
Throws an error if there is an issue with sending the message.
Support specifying a conversation ID in future implementations.
-Sends a prepared local message.
This asynchronous method takes a PreparedLocalMessage
and sends it.
Prepared messages are created using the prepareMessage
method.
The prepared local message to be sent.
A Promise that resolves to a string identifier for the sent message.
Throws an error if there is an issue with sending the prepared message.
-Sets up a real-time message stream for the current conversation.
This method subscribes to incoming messages in real-time and listens for new message events. When a new message is detected, the provided callback function is invoked with the details of the message. Additionally, this method returns a function that can be called to unsubscribe and end the message stream.
@@ -66,4 +66,4 @@Support specifying a conversation ID in future implementations.< When a new message is detected, the provided callback function is invoked with the details of the message. Additionally, this method returns a function that can be called to unsubscribe and end the message stream.
A function that, when called, unsubscribes from the message stream and ends real-time updates.
-Generated using TypeDoc
Generated using TypeDoc
Static
fromStatic
fromGenerated using TypeDoc
Static
fromStatic
fromGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Static
registerStatic
subscribeGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
context: ConversationContextGenerated using TypeDoc
Optional
context: ConversationContextGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
limit: numberOptional
before: number | DateOptional
after: number | DateOptional
direction: "SORT_DIRECTION_ASCENDING" | "SORT_DIRECTION_DESCENDING"Generated using TypeDoc
Optional
limit: numberOptional
before: number | DateOptional
after: number | DateOptional
direction: "SORT_DIRECTION_ASCENDING" | "SORT_DIRECTION_DESCENDING"Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
filename?: stringOptional
mimeGenerated using TypeDoc
Optional
filename?: stringOptional
mimeGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
attachment?: StaticAttachmentContentOptional
encoded?: stringOptional
reaction?: ReactionContentOptional
readOptional
remoteOptional
reply?: ReplyContentOptional
text?: stringOptional
unknown?: UnknownContentGenerated using TypeDoc
Optional
attachment?: StaticAttachmentContentOptional
encoded?: stringOptional
reaction?: ReactionContentOptional
readOptional
remoteOptional
reply?: ReplyContentOptional
text?: stringOptional
unknown?: UnknownContentGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
direction?: "SORT_DIRECTION_ASCENDING" | "SORT_DIRECTION_DESCENDING"Optional
endOptional
pageOptional
startGenerated using TypeDoc
Optional
direction?: "SORT_DIRECTION_ASCENDING" | "SORT_DIRECTION_DESCENDING"Optional
endOptional
pageOptional
startGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
contentOptional
filename?: stringGenerated using TypeDoc
Optional
contentOptional
filename?: stringGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Const
Generated using TypeDoc
Const
Generated using TypeDoc
Determines whether the current user can send messages to a specified peer.
+