Skip to main content

Crate xmtp_sys

Crate xmtp_sys 

Source
Expand description

Raw FFI bindings to libxmtp_ffi — the XMTP messaging protocol static library.

All types and functions are auto-generated by bindgen from the C header xmtp_ffi.h produced by cbindgen. Do not edit manually.

§Build

The build script (build.rs) automatically:

  1. Downloads the pre-built static library from GitHub Releases (or uses a local path).
  2. Runs bindgen on the included xmtp_ffi.h header.
  3. Configures the linker to link the static library + system dependencies.

For local development, set XMTP_FFI_DIR to point at the xmtp-ffi crate root (e.g. ../xmtp-ffi) — it must contain include/xmtp_ffi.h and a built static lib.

Structs§

XmtpFfiApiStats
MLS API call statistics (request counts).
XmtpFfiArchiveOptions
Options for device sync archive operations.
XmtpFfiAuthHandle
XmtpFfiAvailableArchiveList
XmtpFfiClient
XmtpFfiClientOptions
Options for creating a client. All string fields are borrowed (not freed by this library).
XmtpFfiConsentRecord
A consent record exposed to C.
XmtpFfiConversation
XmtpFfiConversationDebugInfo
Conversation debug info (epoch, fork status, commit logs, cursors).
XmtpFfiConversationList
XmtpFfiCreateGroupOptions
Options for creating a new group conversation.
XmtpFfiCursor
A single cursor entry (originator + sequence).
XmtpFfiDisappearingSettings
Options for message disappearing settings.
XmtpFfiEnrichedMessage
An enriched (decoded) message exposed to C. Contains metadata + the original encoded content bytes for upper-layer decoding.
XmtpFfiEnrichedMessageList
XmtpFfiGroupMemberList
XmtpFfiGroupMetadata
Group metadata (creator + conversation type).
XmtpFfiGroupPermissions
Group permissions (policy type + policy set).
XmtpFfiHmacKey
A single HMAC key (42-byte key + epoch).
XmtpFfiHmacKeyMap
XmtpFfiIdentityStats
Identity API call statistics (request counts).
XmtpFfiInboxStateList
XmtpFfiInboxUpdateCount
Inbox update count entry (inbox_id → count).
XmtpFfiInboxUpdateCountList
XmtpFfiKeyPackageStatus
Key package status for an installation.
XmtpFfiKeyPackageStatusList
XmtpFfiLastReadTimeEntry
Last-read-time entry (inbox_id → timestamp_ns).
XmtpFfiLastReadTimeList
XmtpFfiListConversationsOptions
Options for listing conversations.
XmtpFfiListMessagesOptions
Options for listing messages.
XmtpFfiMessage
XmtpFfiMessageList
XmtpFfiPermissionPolicySet
Permission policy set for a conversation.
XmtpFfiPreferenceUpdate
A preference update exposed to C.
XmtpFfiSendOpts
Options for sending a message.
XmtpFfiSignatureRequest
XmtpFfiStreamHandle

Enums§

XmtpFfiConsentEntityType
Consent entity type.
XmtpFfiConsentState
Consent state for an entity.
XmtpFfiConversationType
Conversation type.
XmtpFfiDeliveryStatus
Message delivery status.
XmtpFfiGroupPermissionsPreset
Group permissions preset.
XmtpFfiMessageKind
Message kind.
XmtpFfiPermissionPolicy
Permission policy value.
XmtpFfiPreferenceUpdateKind
Preference update kind.

Functions§

xmtp_auth_handle_create
Create a new gateway auth handle. Caller must free with xmtp_auth_handle_free.
xmtp_auth_handle_free
xmtp_auth_handle_id
Get the unique ID of an auth handle.
xmtp_auth_handle_set
Set a credential on an auth handle. name is an optional HTTP header name (null = “authorization”). value is the header value (required). expires_at_seconds is the Unix timestamp when the credential expires.
xmtp_available_archive_exported_at_ns
Get the exported_at_ns at index.
xmtp_available_archive_list_free
Free an available archive list.
xmtp_available_archive_list_len
xmtp_available_archive_pin
Get the pin string at index. Returns a borrowed pointer; do NOT free.
xmtp_client_account_identifier
Get the account identifier string used to create this client. Caller must free with xmtp_free_string.
xmtp_client_add_identifier_signature_request
Create a signature request to add a new identifier. Caller must free with xmtp_signature_request_free.
xmtp_client_api_aggregate_statistics
Get aggregate statistics as a debug string. Caller must free with xmtp_free_string.
xmtp_client_api_identity_statistics
Get identity API call statistics. Writes to out.
xmtp_client_api_statistics
Get MLS API call statistics. Writes to out.
xmtp_client_app_version
Get the app version string set during client creation. Returns null if no app version was set. Caller must free with xmtp_free_string.
xmtp_client_apply_signature_request
Apply a signature request to the client.
xmtp_client_can_message
Check which identifiers can receive messages. identifiers is an array of C strings, kinds is a parallel array of identifier kinds. Results are written to out_results (1 = can message, 0 = cannot).
xmtp_client_change_recovery_identifier_signature_request
Create a signature request to change the recovery identifier. Caller must free with xmtp_signature_request_free.
xmtp_client_clear_all_statistics
Clear all API call statistics.
xmtp_client_create
Create a new XMTP client. Caller must free with xmtp_client_free.
xmtp_client_create_dm
Find or create a DM by identifier. Caller must free result with xmtp_conversation_free.
xmtp_client_create_dm_by_inbox_id
Create a DM by target inbox ID. Caller must free result with xmtp_conversation_free.
xmtp_client_create_group
Create a new group conversation, optionally adding members by inbox ID. Pass null/0 for member_inbox_ids/member_count to create an empty group. Caller must free result with xmtp_conversation_free.
xmtp_client_create_group_by_identity
Create a new group, adding members by identity (address/passkey). identifiers and kinds are parallel arrays of length count. Caller must free result with xmtp_conversation_free.
xmtp_client_create_group_optimistic
Create a group without syncing members (optimistic / offline-capable). Caller must free with xmtp_conversation_free.
xmtp_client_create_inbox_signature_request
Create an inbox registration signature request (if needed). Returns null via out if no signature is needed. Caller must free with xmtp_signature_request_free.
xmtp_client_delete_message_by_id
Delete a message by its hex-encoded ID. Returns the number of deleted rows.
xmtp_client_fetch_inbox_states
Fetch inbox states for multiple inbox IDs. inbox_ids is a null-terminated array of C strings with count elements. Returns an opaque FfiInboxStateList via out. Caller must free with xmtp_inbox_state_list_free.
xmtp_client_fetch_inbox_updates_count
Fetch the number of identity updates for multiple inbox IDs. Caller must free the result with xmtp_inbox_update_count_list_free.
xmtp_client_fetch_key_package_statuses
Fetch key package statuses for a list of installation IDs (hex-encoded). Caller must free with xmtp_key_package_status_list_free.
xmtp_client_fetch_own_inbox_updates_count
Fetch the number of identity updates for the client’s own inbox.
xmtp_client_find_dm_by_inbox_id
Find or create a DM by inbox ID. Caller must free result with xmtp_conversation_free.
xmtp_client_free
xmtp_client_get_consent_state
Get consent state for a single entity. Result written to out_state.
xmtp_client_get_conversation_by_id
Get a conversation by hex-encoded group ID. Caller must free result with xmtp_conversation_free.
xmtp_client_get_enriched_message_by_id
Get an enriched (decoded) message by its hex-encoded ID. Caller must free with xmtp_enriched_message_list_free (single-item list).
xmtp_client_get_inbox_id_by_identifier
Look up an inbox ID by account identifier using the client’s connection. identifier_kind: 0 = Ethereum, 1 = Passkey. Returns null if not found. Caller must free with xmtp_free_string.
xmtp_client_get_message_by_id
Get a message by its hex-encoded ID. Caller must free with xmtp_message_free.
xmtp_client_hmac_keys
Get HMAC keys for all conversations (including duplicate DMs). Returns a map via out. Caller must free with xmtp_hmac_key_map_free.
xmtp_client_inbox_id
Get the client’s inbox ID. Caller must free with xmtp_free_string.
xmtp_client_inbox_state
Get the inbox state for this client as a single-element list. Caller must free with xmtp_inbox_state_list_free.
xmtp_client_installation_id
Get the client’s installation ID (hex). Caller must free with xmtp_free_string.
xmtp_client_installation_id_bytes
Get the client’s installation ID as raw bytes. Writes length to out_len. Caller must free with xmtp_free_bytes.
xmtp_client_is_registered
Check if the client identity is registered. Returns 1 = yes, 0 = no, -1 = error.
xmtp_client_list_conversations
List conversations. Caller must free result with xmtp_conversation_list_free.
xmtp_client_process_streamed_welcome_message
Process a raw welcome message received via push notification. Returns a list of conversation handles. Caller must free with xmtp_conversation_list_free.
xmtp_client_reconnect_db
Reconnect to the database.
xmtp_client_register_identity
Register the client identity with an optional signature request. Pass null for sig_req if no external signature is needed.
xmtp_client_release_db_connection
Release the database connection pool.
xmtp_client_revoke_all_other_installations
Create a signature request to revoke all other installations. Returns null via out if there are no other installations. Caller must free with xmtp_signature_request_free.
xmtp_client_revoke_identifier_signature_request
Create a signature request to revoke an identifier. Caller must free with xmtp_signature_request_free.
xmtp_client_revoke_installations_signature_request
Create a signature request to revoke specific installations by their IDs. installation_ids is an array of byte arrays, each id_len bytes long. Caller must free with xmtp_signature_request_free.
xmtp_client_set_consent_states
Set consent states for multiple entities. entity_types: 0 = GroupId, 1 = InboxId. states: 0 = Unknown, 1 = Allowed, 2 = Denied.
xmtp_client_sign_with_installation_key
Sign text with the client’s installation key. Writes signature bytes to out and length to out_len. Caller must free out with xmtp_free_bytes.
xmtp_client_sync_all
Sync all conversations, optionally filtering by consent states. consent_states is a parallel array of consent state values (0=Unknown, 1=Allowed, 2=Denied). Pass null and 0 to sync all.
xmtp_client_sync_preferences
Sync preferences (device sync groups only).
xmtp_client_sync_welcomes
Sync welcomes (process new group invitations).
xmtp_client_verify_signed_with_installation_key
Verify a signature produced by xmtp_client_sign_with_installation_key. Returns 0 on success (valid), -1 on error (invalid or bad args).
xmtp_conversation_add_members
Add members by inbox IDs.
xmtp_conversation_add_members_by_identity
Add members by external identifiers (address/passkey). identifiers and kinds are parallel arrays of length count.
xmtp_conversation_added_by_inbox_id
xmtp_conversation_app_data
xmtp_conversation_consent_state
Get conversation consent state. Writes to out_state (0=Unknown, 1=Allowed, 2=Denied).
xmtp_conversation_count_messages
Count messages matching the given filter options. Pass null for opts to count all messages.
xmtp_conversation_created_at_ns
Get the conversation created-at timestamp in nanoseconds.
xmtp_conversation_debug_info
Get debug info for this conversation. Caller must free string fields with xmtp_free_string.
xmtp_conversation_debug_info_free
Free a conversation debug info struct (its string fields and cursor array).
xmtp_conversation_disappearing_settings
Get the current message disappearing settings. Returns 0 on success (writes to out), -1 if not set or on error.
xmtp_conversation_dm_peer_inbox_id
Get the DM peer’s inbox ID. Caller must free with xmtp_free_string. Returns null if not a DM or on error.
xmtp_conversation_duplicate_dms
Find duplicate DM conversations for this DM. Returns a conversation list. Caller must free with xmtp_conversation_list_free.
xmtp_conversation_free
xmtp_conversation_group_description
xmtp_conversation_group_image_url
xmtp_conversation_group_metadata
Get the full group metadata (creator inbox ID + conversation type). Caller must free with xmtp_group_metadata_free.
xmtp_conversation_group_name
xmtp_conversation_group_permissions
Get the group permissions (policy type + full policy set). Caller must free with xmtp_group_permissions_free.
xmtp_conversation_hmac_keys
Get HMAC keys for this conversation (including duplicate DMs). Returns a map via out. Caller must free with xmtp_hmac_key_map_free.
xmtp_conversation_id
Get the conversation’s hex-encoded group ID. Caller must free with xmtp_free_string.
xmtp_conversation_is_active
Check if the conversation is active. Returns 1=active, 0=inactive, -1=error.
xmtp_conversation_is_admin
xmtp_conversation_is_disappearing_enabled
Check if message disappearing is enabled. Returns 1=enabled, 0=disabled, -1=error.
xmtp_conversation_is_super_admin
xmtp_conversation_last_read_times
Get per-inbox last read times for a conversation. Caller must free with xmtp_last_read_time_list_free.
xmtp_conversation_leave
Leave the group.
xmtp_conversation_list_admins
xmtp_conversation_list_enriched_messages
List enriched (decoded) messages for a conversation. Fetches both enriched metadata and raw content bytes in a single call. Caller must free with xmtp_enriched_message_list_free.
xmtp_conversation_list_free
xmtp_conversation_list_get
Get a conversation from a list by index. Caller must free with xmtp_conversation_free.
xmtp_conversation_list_is_commit_log_forked
Get the commit log fork status for a conversation list item. Returns -1=unknown/error, 0=not forked, 1=forked.
xmtp_conversation_list_last_message
Get the last message for a conversation list item as an opaque FfiMessage handle. Returns 0 on success (writes to out), -1 on error or if no last message exists. Caller must free with xmtp_message_free.
xmtp_conversation_list_last_message_sent_at_ns
Get the sent_at_ns of the last message for a conversation list item. Returns 0 if no last message exists, or -1 on error.
xmtp_conversation_list_len
xmtp_conversation_list_members
List group members. Caller must free with xmtp_group_member_list_free.
xmtp_conversation_list_messages
List messages in this conversation. Caller must free with xmtp_message_list_free.
xmtp_conversation_list_super_admins
xmtp_conversation_membership_state
Get the membership state of the current user in this conversation. 0=Allowed, 1=Rejected, 2=Pending, 3=Restored, 4=PendingRemove, -1=error.
xmtp_conversation_paused_for_version
Check if the conversation is paused for a version upgrade. Writes the version string to out if paused, or null if not paused. Caller must free out with xmtp_free_string. Returns 0 on success, -1 on error.
xmtp_conversation_prepare_message
Prepare a message for later publishing (optimistic send workflow). Stores the message locally without publishing. Returns message ID (hex) via out_id. Caller must free out_id with xmtp_free_string.
xmtp_conversation_process_streamed_group_message
Process a raw group message received via push notification. Returns a list of stored messages. Caller must free with xmtp_message_list_free.
xmtp_conversation_publish_messages
Publish all queued (unpublished) messages in this conversation.
xmtp_conversation_publish_stored_message
Publish a previously prepared message by its hex-encoded ID.
xmtp_conversation_remove_disappearing_settings
Remove (disable) message disappearing settings for this conversation.
xmtp_conversation_remove_members
Remove members by inbox IDs.
xmtp_conversation_remove_members_by_identity
Remove members by external identifiers (address/passkey).
xmtp_conversation_send
Send raw encoded content bytes. Returns the message ID (hex) via out_id. Caller must free out_id with xmtp_free_string. Pass null for opts to use defaults (should_push = true).
xmtp_conversation_send_optimistic
Send raw encoded content bytes optimistically (returns immediately, publishes in background). Returns the message ID (hex) via out_id. Caller must free with xmtp_free_string.
xmtp_conversation_stream_messages
Stream messages for a single conversation. Callback receives owned *mut FfiMessage.
xmtp_conversation_sync
Sync this conversation with the network.
xmtp_conversation_type
Get the conversation type. Returns FfiConversationType value, or -1 on error.
xmtp_conversation_update_admin_list
Add/remove admin or super admin. action: 0=AddAdmin, 1=RemoveAdmin, 2=AddSuperAdmin, 3=RemoveSuperAdmin.
xmtp_conversation_update_app_data
xmtp_conversation_update_consent_state
Update conversation consent state.
xmtp_conversation_update_disappearing_settings
Update the message disappearing settings for this conversation.
xmtp_conversation_update_group_description
xmtp_conversation_update_group_image_url
xmtp_conversation_update_group_name
xmtp_conversation_update_permission_policy
Update a permission policy on this conversation. update_type: 1=AddMember, 2=RemoveMember, 3=AddAdmin, 4=RemoveAdmin, 5=UpdateMetadata. policy: 1=Allow, 2=Deny, 3=AdminOnly, 4=SuperAdminOnly. metadata_field_name: Only used when update_type=5 (e.g. “group_name”). Pass null otherwise.
xmtp_device_sync_archive_metadata
Read metadata from an archive file without loading its full contents. out_elements is a bitmask: bit 0 = Messages, bit 1 = Consent. out_start_ns / out_end_ns are 0 if not set. All output pointers are nullable.
xmtp_device_sync_create_archive
Export an archive to a local file. key must be at least 32 bytes (encryption key).
xmtp_device_sync_import_archive
Import a previously exported archive from a file. key must be at least 32 bytes (encryption key).
xmtp_device_sync_list_available_archives
List archives available for import in the sync group. days_cutoff limits how far back to look. Caller must free with xmtp_available_archive_list_free.
xmtp_device_sync_process_archive
Process a sync archive matching the given pin. Pass null for pin to process the latest archive.
xmtp_device_sync_send_archive
Send a sync archive to the sync group with the given pin.
xmtp_device_sync_send_request
Send a device sync request to retrieve records from another installation.
xmtp_device_sync_sync_all
Manually sync all device sync groups. Writes the number of synced/eligible groups to the output pointers.
xmtp_enriched_message_list_free
Free an enriched message list (including owned strings and content bytes).
xmtp_enriched_message_list_get
xmtp_enriched_message_list_len
xmtp_free_bytes
Free a byte buffer previously returned by this library.
xmtp_free_string
Free a string previously returned by this library.
xmtp_free_string_array
Free a string array returned by this library.
xmtp_generate_inbox_id
Generate an inbox ID from an identifier. Caller must free with xmtp_free_string. nonce defaults to 1 if 0 is passed.
xmtp_get_inbox_id_for_identifier
Get the inbox ID for an identifier by querying the network. api_url is the gRPC host, is_secure controls TLS. Writes the inbox ID to out (caller must free with xmtp_free_string). Writes null to out if no inbox ID is found.
xmtp_group_member_account_identifiers
Get member account identifiers at index. Returns a borrowed pointer to the internal string array. Do NOT free individual strings. Use out_count to get the number of identifiers.
xmtp_group_member_consent_state
Get member consent state at index: 0=Unknown, 1=Allowed, 2=Denied, -1=error.
xmtp_group_member_inbox_id
Get member inbox ID at index. Caller must free with xmtp_free_string.
xmtp_group_member_installation_ids
Get member installation IDs (hex) at index. Returns a borrowed pointer to the internal string array.
xmtp_group_member_list_free
Free a group member list.
xmtp_group_member_list_len
xmtp_group_member_permission_level
Get member permission level at index: 0=Member, 1=Admin, 2=SuperAdmin, -1=error.
xmtp_group_metadata_free
Free a group metadata struct.
xmtp_group_permissions_free
xmtp_hmac_key_map_free
Free an HMAC key map (including all owned data).
xmtp_hmac_key_map_group_id
Get the group ID (hex) at index. Returns a borrowed pointer; do NOT free.
xmtp_hmac_key_map_keys
Get the HMAC keys at index. Writes count to out_count. Returns a borrowed pointer to the key array; do NOT free individual keys.
xmtp_hmac_key_map_len
Get the number of entries in an HMAC key map.
xmtp_inbox_state_identifiers
Get identifiers array at index. Returns a borrowed pointer; do NOT free.
xmtp_inbox_state_inbox_id
Get inbox ID at index. Caller must free with xmtp_free_string.
xmtp_inbox_state_installation_ids
Get installation IDs (hex) at index. Returns a borrowed pointer; do NOT free.
xmtp_inbox_state_list_free
Free an inbox state list.
xmtp_inbox_state_list_len
xmtp_inbox_state_recovery_identifier
Get recovery identifier at index. Caller must free with xmtp_free_string.
xmtp_inbox_update_count_list_free
Free an inbox update count list.
xmtp_inbox_update_count_list_get
xmtp_inbox_update_count_list_len
xmtp_init_logger
Initialize the tracing logger. Call at most once. level is a C string like “debug”, “info”, “warn”, “error”, or “off”. Pass null for default (“info”). Returns 0 on success.
xmtp_is_address_authorized
Check whether an Ethereum address belongs to an inbox. Returns 1 = authorized, 0 = not authorized. Sets last error on failure.
xmtp_is_installation_authorized
Check whether an installation (by its public key bytes) belongs to an inbox. Returns 1 = authorized, 0 = not authorized. Sets last error on failure.
xmtp_key_package_status_list_free
Free a key package status list.
xmtp_key_package_status_list_get
xmtp_key_package_status_list_len
xmtp_last_error_length
Get the length of the last error message (including NUL terminator). Returns 0 if no error.
xmtp_last_error_message
Copy the last error message into buf. Returns bytes written (excluding NUL), or -1 if buf is null or too small.
xmtp_last_read_time_list_free
xmtp_last_read_time_list_get
xmtp_last_read_time_list_len
xmtp_libxmtp_version
Get the libxmtp version string. Caller must free with xmtp_free_string.
xmtp_message_content_bytes
Get raw decrypted content bytes at index. Writes length to out_len. The returned pointer is borrowed from the list — do NOT free it.
xmtp_message_delivery_status
Get delivery status at index: 0=Unpublished, 1=Published, 2=Failed, -1=error.
xmtp_message_free
xmtp_message_id
Get message ID (hex) at index. Caller must free with xmtp_free_string.
xmtp_message_kind
Get message kind at index: 0=Application, 1=MembershipChange, -1=error.
xmtp_message_list_free
xmtp_message_list_len
xmtp_message_sender_inbox_id
Get sender inbox ID at index. Caller must free with xmtp_free_string.
xmtp_message_sent_at_ns
Get sent-at timestamp (ns) at index.
xmtp_signature_request_add_ecdsa
Add an ECDSA signature to the request.
xmtp_signature_request_add_passkey
Add a passkey signature to the request. All four byte arrays are required and must not be null.
xmtp_signature_request_add_scw
Add a smart contract wallet (SCW) signature to the request. account_address is the EVM account address (hex string). chain_id is the EVM chain ID (e.g. 1 for mainnet). block_number is optional; pass 0 to omit.
xmtp_signature_request_free
xmtp_signature_request_text
Get the human-readable signature text. Caller must free with xmtp_free_string.
xmtp_single_message_content_bytes
Get raw content bytes from a single message handle. The returned pointer is borrowed — valid only while the message handle is alive.
xmtp_single_message_group_id
Get the group ID (hex) from a single message handle. Caller must free with xmtp_free_string.
xmtp_single_message_id
Get the message ID (hex) from a single message handle. Caller must free with xmtp_free_string.
xmtp_single_message_sender_inbox_id
Get the sender inbox ID from a single message handle. Caller must free with xmtp_free_string.
xmtp_single_message_sent_at_ns
Get the sent-at timestamp (ns) from a single message handle.
xmtp_stream_all_messages
Stream all messages across conversations. Callback receives owned *mut FfiMessage. consent_states / consent_states_count: optional filter (null/0 = all).
xmtp_stream_consent
Stream consent state changes. Callback receives a borrowed array of consent records (*const FfiConsentRecord) — valid only during the callback invocation.
xmtp_stream_conversations
Stream new conversations. Callback receives owned *mut FfiConversation (caller must free). on_close(error, ctx): null error = normal close; non-null = borrowed error string. Caller must end with xmtp_stream_end and free with xmtp_stream_free.
xmtp_stream_end
Signal a stream to stop. Does NOT free the handle — call xmtp_stream_free afterwards. Safe to call multiple times.
xmtp_stream_free
Free a stream handle. Must be called after xmtp_stream_end. Calling this on an active (non-ended) stream will also end it.
xmtp_stream_is_closed
Check if a stream has finished. Returns 1 if closed, 0 if active.
xmtp_stream_message_deletions
Stream message deletion events. Callback receives a borrowed hex message ID (*const c_char) — valid only during the callback invocation. Now includes on_close for API consistency with other stream functions.
xmtp_stream_preferences
Stream preference updates (consent changes + HMAC key rotations). Callback receives a borrowed array (*const FfiPreferenceUpdate) — valid only during callback.
xmtp_verify_signed_with_public_key
Verify a signature produced by sign_with_installation_key using an arbitrary public key. Does not require a client handle. signature_bytes must be exactly 64 bytes, public_key must be exactly 32 bytes.

Type Aliases§

XmtpFnConsentCallback
Callback for consent stream events. records is borrowed — valid only during the callback invocation.
XmtpFnConversationCallback
Callback for conversation stream events.
XmtpFnMessageCallback
Callback for message stream events.
XmtpFnMessageDeletionCallback
Callback for message deletion stream events. message_id is a borrowed hex string — valid only during the callback.
XmtpFnPreferenceCallback
Callback for preference stream events. updates is borrowed — valid only during the callback invocation.