Skip to main content
Import OfflineProtocol from @offline-protocol/mesh-sdk. These signatures match v0.27.0. Read the integration guide for prerequisites and complete usage.

Methods on this page

sendMedia

Sends a media attachment (image, video, audio, file, etc.) to a recipient. The platform reads the file and passes the raw bytes as a base64 string. The SDK chunks the data and sends each chunk via internet-preferred transport. returns: File ID for tracking progress

sendFile

Sends a generic file to a recipient (convenience for sendMedia with ContentType.File). returns: File ID for tracking progress

sendImage

Sends an image to a recipient. returns: File ID for tracking progress

sendVoiceNote

Sends a voice note to a recipient. returns: File ID for tracking progress

sendVideoNote

Sends a video note to a recipient. returns: File ID for tracking progress

sendVideo

Sends a video to a recipient. returns: File ID for tracking progress

getFileProgress

Gets the progress of a file transfer returns: File progress information, or null if not found

cancelFileTransfer

Cancels an active file transfer returns: True if cancelled, false if not found

processFileChunk

Processes a file chunk. Use this for custom file transfer handling.

finalizeFile

Finalizes a file transfer. Call this after all chunks have been processed.

Parameter and result types

Import these types from the same SDK package. Event payloads and configuration types are linked below.

SendMediaParams

ContentType

MediaMetadata

ReplyContext

ForwardInfo

SendFileParams

FileProgress