import * as _xmtp_wasm_bindings from '@xmtp/wasm-bindings'; import { ContentTypeId as ContentTypeId$1, DeliveryStatus, GroupMessageKind, Reaction, DecodedMessage as DecodedMessage$1, LeaveRequest, ReadReceipt, Attachment, RemoteAttachment, TransactionReference, WalletSendCalls, Actions, Intent, MultiRemoteAttachment, GroupUpdated, DeletedMessage, Backend, LogLevel, Identifier, Conversations as Conversations$1, ConsentState, ListConversationsOptions, CreateGroupOptions, CreateDmOptions, Conversation as Conversation$1, ConversationType, Message, Client as Client$1, Consent, ConsentEntityType, UserPreferenceUpdate, SignatureRequestHandle, KeyPackageStatus, ArchiveOptions, AvailableArchiveInfo, ArchiveMetadata, GroupSyncSummary, GroupMember, PermissionUpdateType, PermissionPolicy, MetadataField, EncodedContent, SendMessageOpts, Reply, ListMessagesOptions, MessageDisappearingSettings, HmacKey, ConversationDebugInfo, GroupPermissionsOptions, PermissionPolicySet, GroupMetadata, ApiStats, IdentityStats, InboxState } from '@xmtp/wasm-bindings'; export { Action, ActionStyle, Actions, ApiStats, ArchiveMetadata, ArchiveOptions, Attachment, AvailableArchiveInfo, Backend, BackendBuilder, BackupElementSelectionOption, Consent, ConsentEntityType, ConsentState, ContentType, ConversationDebugInfo, ConversationListItem, ConversationType, CreateDmOptions, CreateGroupOptions, Cursor, DeliveryStatus, EncryptedAttachment, GroupMember, GroupMembershipState, GroupMessageKind, GroupMetadata, GroupPermissions, GroupPermissionsOptions, GroupSyncSummary, GroupUpdated, HmacKey, Identifier, IdentifierKind, IdentityStats, Inbox, InboxState, Installation, Intent, KeyPackageStatus, LeaveRequest, Lifetime, ListConversationsOptions, ListConversationsOrderBy, ListMessagesOptions, LogLevel, LogOptions, Message, MessageDisappearingSettings, MessageSortBy, MetadataField, MetadataFieldChange, MultiRemoteAttachment, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType, Reaction, ReactionAction, ReactionSchema, ReadReceipt, RemoteAttachment, Reply, SendMessageOpts, SignatureRequestHandle, SortDirection, TransactionMetadata, TransactionReference, UserPreferenceUpdate, WalletCall, WalletSendCalls } from '@xmtp/wasm-bindings'; import { ContentCodec, ContentTypeId } from '@xmtp/content-type-primitives'; type ResolveValue = { value: T; done: boolean; }; interface AsyncStreamProxy extends AsyncIterable { next(): Promise>; return(): Promise>; end(): Promise>; isDone: boolean; } declare const DEFAULT_RETRY_DELAY = 10000; declare const DEFAULT_RETRY_ATTEMPTS = 6; type StreamOptions = { /** * Called when the stream ends */ onEnd?: () => void; /** * Called when a stream error occurs */ onError?: (error: Error) => void; /** * Called when the stream fails */ onFail?: () => void; /** * Called when the stream is restarted */ onRestart?: () => void; /** * Called when the stream is retried */ onRetry?: (attempts: number, maxAttempts: number) => void; /** * Called when a value is emitted from the stream */ onValue?: (value: V) => void; /** * The number of times to retry the stream * (default: 6) */ retryAttempts?: number; /** * The delay between retries (in milliseconds) * (default: 10000) */ retryDelay?: number; /** * Whether to retry the stream if it fails * (default: true) */ retryOnFail?: boolean; /** * Whether to disable network sync before starting the stream * (default: false) */ disableSync?: boolean; }; type StreamCallback = (error: Error | null, value: T | undefined) => void; type StreamFunction = (callback: StreamCallback, onFail: () => void) => Promise<() => void>; type StreamValueMutator = (value: T) => V | Promise; /** * Creates a stream from a stream function * * If the stream fails, an attempt will be made to restart it. * * This function is not intended to be used directly. * * @param streamFunction - The stream function to create a stream from * @param streamValueMutator - An optional function to mutate the value emitted from the stream * @param options - The options for the stream * @param args - Additional arguments to pass to the stream function * @returns An async iterable stream proxy * @throws {StreamInvalidRetryAttemptsError} if the retryAttempts option is less than 0 and retryOnFail is true * @throws {StreamFailedError} if the stream fails and can't be restarted */ declare const createStream: (streamFunction: StreamFunction, streamValueMutator?: StreamValueMutator, options?: StreamOptions) => Promise>; declare class CodecRegistry { #private; constructor(codecs: ContentCodec[]); /** * Gets the codec for a given content type * * @param contentType - The content type to get the codec for * @returns The codec, if found */ getCodec(contentType: ContentTypeId): ContentCodec | undefined; } /** * Represents a decoded XMTP message * * @class * @property {unknown} content - The decoded content of the message * @property {ContentTypeId} contentType - The content type of the message content * @property {string} conversationId - Unique identifier for the conversation * @property {DeliveryStatus} deliveryStatus - Current delivery status of the message ("unpublished" | "published" | "failed") * @property {bigint} expiresAtNs - Timestamp when the message will expire (in nanoseconds) * @property {Date} expiresAt - Timestamp when the message will expire * @property {string} fallback - Optional fallback text for the message * @property {string} id - Unique identifier for the message * @property {GroupMessageKind} kind - Type of message ("application" | "membership_change") * @property {bigint} numReplies - Number of replies to the message * @property {DecodedMessage[]} reactions - Reactions to the message * @property {string} senderInboxId - Identifier for the sender's inbox * @property {Date} sentAt - Timestamp when the message was sent * @property {bigint} sentAtNs - Timestamp when the message was sent (in nanoseconds) */ declare class DecodedMessage { content: ContentTypes | undefined; contentType: ContentTypeId$1; conversationId: string; deliveryStatus: DeliveryStatus; expiresAtNs?: bigint; expiresAt?: Date; fallback?: string; id: string; kind: GroupMessageKind; numReplies: bigint; reactions: DecodedMessage[]; senderInboxId: string; sentAt: Date; sentAtNs: bigint; constructor(codecRegistry: CodecRegistry, message: DecodedMessage$1); } type XmtpEnv = "local" | "dev" | "production" | "testnet-staging" | "testnet-dev" | "testnet" | "mainnet"; /** * Network options */ type NetworkOptions = { /** * Specify which XMTP environment to connect to. (default: `dev`) */ env?: XmtpEnv; /** * apiUrl can be used to override the `env` flag and connect to a * specific endpoint */ apiUrl?: string; /** * gatewayHost can be used to override the gateway endpoint */ gatewayHost?: string; /** * Custom app version */ appVersion?: string; }; /** * Device sync options */ type DeviceSyncOptions = { /** * historySyncUrl can be used to override the `env` flag and connect to a * specific endpoint for syncing history */ historySyncUrl?: string | null; /** * Disable device sync */ disableDeviceSync?: boolean; }; type ContentOptions = { /** * Allow configuring codecs for additional content types */ codecs?: ContentCodec[]; }; /** * Storage options */ type StorageOptions = { /** * Path to the local DB * * There are 3 value types that can be used to specify the database path: * * - `undefined` (or excluded from the client options) * The database will be created in the current working directory and is based on * the XMTP environment and client inbox ID. * Example: `xmtp-dev-.db3` * * - `null` * No database will be created and all data will be lost once the client disconnects. * * - `string` * The given path will be used to create the database. * Example: `./my-db.db3` */ dbPath?: string | null; /** * Encryption key for the local DB */ dbEncryptionKey?: Uint8Array; }; type OtherOptions = { /** * Enable structured JSON logging */ structuredLogging?: boolean; /** * Enable performance metrics */ performanceLogging?: boolean; /** * Logging level */ loggingLevel?: LogLevel; /** * Disable automatic registration when creating a client */ disableAutoRegister?: boolean; }; type ClientOptions = (NetworkOptions | { backend: Backend; }) & DeviceSyncOptions & ContentOptions & StorageOptions & OtherOptions; type EnrichedReply = { referenceId: string; content: T; contentType: () => Promise; inReplyTo: DecodedMessage | null; }; type BuiltInContentTypes = string | LeaveRequest | Reaction | ReadReceipt | Attachment | RemoteAttachment | TransactionReference | WalletSendCalls | Actions | Intent | MultiRemoteAttachment | GroupUpdated | DeletedMessage; type ExtractCodecContentTypes = C extends readonly [] ? BuiltInContentTypes : [...C][number] extends ContentCodec ? T | BuiltInContentTypes | EnrichedReply : BuiltInContentTypes; type SignMessage = (message: string) => Promise | Uint8Array; type GetIdentifier = () => Promise | Identifier; type GetChainId = () => bigint; type GetBlockNumber = () => bigint; type Signer = { type: "EOA"; getIdentifier: GetIdentifier; signMessage: SignMessage; } | { type: "SCW"; getIdentifier: GetIdentifier; signMessage: SignMessage; getBlockNumber?: GetBlockNumber; getChainId: GetChainId; }; type EOASigner = Extract; type SCWSigner = Extract; type SafeSigner = { type: "EOA"; identifier: Identifier; signature: Uint8Array; } | { type: "SCW"; identifier: Identifier; signature: Uint8Array; chainId: bigint; blockNumber?: bigint; }; declare const createEOASigner: (key?: `0x${string}`) => Signer; declare const createSCWSigner: (address: `0x${string}`, signMessage: (message: string) => Promise | string, chainId: bigint) => Signer; declare const toSafeSigner: (signer: Signer, signature: Uint8Array) => Promise; declare class WorkerConversations { #private; constructor(client: WorkerClient, conversations: Conversations$1); sync(): Promise; syncAll(consentStates?: ConsentState[]): Promise<_xmtp_wasm_bindings.GroupSyncSummary>; getConversationById(id: string): WorkerConversation | undefined; getMessageById(id: string): Promise; getDmByInboxId(inboxId: string): WorkerConversation | undefined; list(options?: ListConversationsOptions): WorkerConversation[]; listGroups(options?: Omit): WorkerConversation[]; listDms(options?: Omit): WorkerConversation[]; createGroupOptimistic(options?: CreateGroupOptions): WorkerConversation; createGroupWithIdentifiers(identifiers: Identifier[], options?: CreateGroupOptions): Promise; createGroup(inboxIds: string[], options?: CreateGroupOptions): Promise; createDmWithIdentifier(identifier: Identifier, options?: CreateDmOptions): Promise; createDm(inboxId: string, options?: CreateDmOptions): Promise; hmacKeys(): HmacKeys; stream(callback: StreamCallback, onFail: () => void, conversationType?: ConversationType): _xmtp_wasm_bindings.StreamCloser; streamGroups(callback: StreamCallback, onFail: () => void): _xmtp_wasm_bindings.StreamCloser; streamDms(callback: StreamCallback, onFail: () => void): _xmtp_wasm_bindings.StreamCloser; streamAllMessages(callback: StreamCallback, onFail: () => void, conversationType?: ConversationType, consentStates?: ConsentState[]): _xmtp_wasm_bindings.StreamCloser; streamDeletedMessages(callback: StreamCallback): _xmtp_wasm_bindings.StreamCloser; } /** * Debug information helpers for the client * * This class is not intended to be initialized directly. */ declare class WorkerDebugInformation { #private; constructor(client: Client$1); apiStatistics(): _xmtp_wasm_bindings.ApiStats; apiIdentityStatistics(): _xmtp_wasm_bindings.IdentityStats; apiAggregateStatistics(): string; clearAllStatistics(): void; } declare class WorkerPreferences { #private; constructor(client: Client$1, conversations: Conversations$1); sync(): Promise<_xmtp_wasm_bindings.GroupSyncSummary>; inboxState(refreshFromNetwork: boolean): Promise<_xmtp_wasm_bindings.InboxState>; getInboxStates(inboxIds: string[], refreshFromNetwork?: boolean): Promise<_xmtp_wasm_bindings.InboxState[]>; setConsentStates(records: Consent[]): Promise; getConsentState(entityType: ConsentEntityType, entity: string): Promise<_xmtp_wasm_bindings.ConsentState>; streamConsent(callback: StreamCallback, onFail: () => void): _xmtp_wasm_bindings.StreamCloser; streamPreferences(callback: StreamCallback, onFail: () => void): _xmtp_wasm_bindings.StreamCloser; } declare class WorkerClient { #private; constructor(client: Client$1, env: XmtpEnv); static create(identifier: Identifier, options?: Omit): Promise; get libxmtpVersion(): string; get appVersion(): string; get env(): XmtpEnv; get accountIdentifier(): Identifier; get inboxId(): string; get installationId(): string; get installationIdBytes(): Uint8Array; get isRegistered(): boolean; get conversations(): WorkerConversations; get debugInformation(): WorkerDebugInformation; get preferences(): WorkerPreferences; canMessage(identifiers: Identifier[]): Promise>; addSignature(signatureRequest: SignatureRequestHandle, signer: SafeSigner): Promise; applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise; processSignatureRequest(signer: SafeSigner, signatureRequest: SignatureRequestHandle): Promise; createInboxSignatureRequest(): SignatureRequestHandle | undefined; addAccountSignatureRequest(newAccountIdentifier: Identifier): Promise; removeAccountSignatureRequest(identifier: Identifier): Promise; revokeAllOtherInstallationsSignatureRequest(): Promise; revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise; changeRecoveryIdentifierSignatureRequest(identifier: Identifier): Promise; registerIdentity(signer: SafeSigner, signatureRequest: SignatureRequestHandle): Promise; getInboxIdByIdentifier(identifier: Identifier): Promise; signWithInstallationKey(signatureText: string): Uint8Array; verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): boolean; verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): boolean; fetchKeyPackageStatuses(installationIds: string[]): Promise>; sendSyncRequest(options: ArchiveOptions, serverUrl: string): Promise; sendSyncArchive(options: ArchiveOptions, serverUrl: string, pin: string): Promise; processSyncArchive(archivePin?: string | null): Promise; listAvailableArchives(daysCutoff: number): AvailableArchiveInfo[]; createArchive(opts: ArchiveOptions, key: Uint8Array): Promise; importArchive(data: Uint8Array, key: Uint8Array): Promise; archiveMetadata(data: Uint8Array, key: Uint8Array): Promise; syncAllDeviceSyncGroups(): Promise; } declare class WorkerConversation { #private; constructor(client: WorkerClient, group: Conversation$1); get id(): string; get name(): string; updateName(name: string): Promise; get imageUrl(): string; updateImageUrl(imageUrl: string): Promise; get description(): string; updateDescription(description: string): Promise; get appData(): string; updateAppData(appData: string): Promise; get isActive(): boolean; get addedByInboxId(): string; get createdAtNs(): bigint; lastMessage(): Promise; metadata(): Promise<_xmtp_wasm_bindings.GroupMetadata>; members(): Promise; listAdmins(): string[]; listSuperAdmins(): string[]; permissions(): { policyType: _xmtp_wasm_bindings.GroupPermissionsOptions; policySet: _xmtp_wasm_bindings.PermissionPolicySet; }; updatePermission(permissionType: PermissionUpdateType, policy: PermissionPolicy, metadataField?: MetadataField): Promise; isAdmin(inboxId: string): boolean; isSuperAdmin(inboxId: string): boolean; sync(): Promise; addMembersByIdentifiers(identifiers: Identifier[]): Promise; addMembers(inboxIds: string[]): Promise; removeMembersByIdentifiers(identifiers: Identifier[]): Promise; removeMembers(inboxIds: string[]): Promise; addAdmin(inboxId: string): Promise; removeAdmin(inboxId: string): Promise; addSuperAdmin(inboxId: string): Promise; removeSuperAdmin(inboxId: string): Promise; publishMessages(): Promise; processStreamedMessage(envelopeBytes: Uint8Array): Promise; send(encodedContent: EncodedContent, opts?: SendMessageOpts): Promise; sendText(text: string, isOptimistic?: boolean): Promise; sendMarkdown(markdown: string, isOptimistic?: boolean): Promise; sendReaction(reaction: Reaction, isOptimistic?: boolean): Promise; sendReadReceipt(isOptimistic?: boolean): Promise; sendReply(reply: Reply, isOptimistic?: boolean): Promise; sendTransactionReference(transactionReference: TransactionReference, isOptimistic?: boolean): Promise; sendWalletSendCalls(walletSendCalls: WalletSendCalls, isOptimistic?: boolean): Promise; sendActions(actions: Actions, isOptimistic?: boolean): Promise; sendIntent(intent: Intent, isOptimistic?: boolean): Promise; sendAttachment(attachment: Attachment, isOptimistic?: boolean): Promise; sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, isOptimistic?: boolean): Promise; sendRemoteAttachment(remoteAttachment: RemoteAttachment, isOptimistic?: boolean): Promise; messages(options?: ListMessagesOptions): Promise; countMessages(options?: ListMessagesOptions): Promise; consentState(): ConsentState; updateConsentState(state: ConsentState): void; dmPeerInboxId(): string; messageDisappearingSettings(): MessageDisappearingSettings | undefined; updateMessageDisappearingSettings(fromNs: bigint, inNs: bigint): Promise; removeMessageDisappearingSettings(): Promise; isMessageDisappearingEnabled(): boolean; stream(callback: StreamCallback, onFail: () => void): _xmtp_wasm_bindings.StreamCloser; pausedForVersion(): string | undefined; hmacKeys(): Map; debugInfo(): Promise; duplicateDms(): Promise; requestRemoval(): Promise; isPendingRemoval(): boolean; lastReadTimes(): Promise; } type SafeConversation = { id: string; name: string; imageUrl: string; description: string; appData: string; permissions: { policyType: GroupPermissionsOptions; policySet: PermissionPolicySet; }; addedByInboxId: string; metadata: GroupMetadata; admins: string[]; superAdmins: string[]; createdAtNs: bigint; }; declare const toSafeConversation: (conversation: WorkerConversation) => Promise; type HmacKeys = Map; type LastReadTimes = Map; type ClientAction = { action: "client.init"; id: string; result: { appVersion: string; env: string; inboxId: string; installationId: string; installationIdBytes: Uint8Array; libxmtpVersion: string; }; data: { identifier: Identifier; options?: ClientOptions; }; } | { action: "client.applySignatureRequest"; id: string; result: undefined; data: { signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.createInboxSignatureText"; id: string; result: { signatureText?: string; signatureRequestId?: string; }; data: { signatureRequestId: string; }; } | { action: "client.addAccountSignatureText"; id: string; result: { signatureText: string; signatureRequestId: string; }; data: { newIdentifier: Identifier; signatureRequestId: string; }; } | { action: "client.removeAccountSignatureText"; id: string; result: { signatureText: string; signatureRequestId: string; }; data: { identifier: Identifier; signatureRequestId: string; }; } | { action: "client.revokeAllOtherInstallationsSignatureText"; id: string; result: { signatureText: string | undefined; signatureRequestId: string; }; data: { signatureRequestId: string; }; } | { action: "client.revokeInstallationsSignatureText"; id: string; result: { signatureText: string; signatureRequestId: string; }; data: { installationIds: Uint8Array[]; signatureRequestId: string; }; } | { action: "client.changeRecoveryIdentifierSignatureText"; id: string; result: { signatureText: string; signatureRequestId: string; }; data: { identifier: Identifier; signatureRequestId: string; }; } | { action: "client.registerIdentity"; id: string; result: undefined; data: { signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.addAccount"; id: string; result: undefined; data: { identifier: Identifier; signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.removeAccount"; id: string; result: undefined; data: { identifier: Identifier; signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.revokeAllOtherInstallations"; id: string; result: undefined; data: { signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.changeRecoveryIdentifier"; id: string; result: undefined; data: { identifier: Identifier; signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.revokeInstallations"; id: string; result: undefined; data: { installationIds: Uint8Array[]; signer: SafeSigner; signatureRequestId: string; }; } | { action: "client.isRegistered"; id: string; result: boolean; data: undefined; } | { action: "client.canMessage"; id: string; result: Map; data: { identifiers: Identifier[]; }; } | { action: "client.getInboxIdByIdentifier"; id: string; result: string | undefined; data: { identifier: Identifier; }; } | { action: "client.signWithInstallationKey"; id: string; result: Uint8Array; data: { signatureText: string; }; } | { action: "client.verifySignedWithInstallationKey"; id: string; result: boolean; data: { signatureText: string; signatureBytes: Uint8Array; }; } | { action: "client.verifySignedWithPublicKey"; id: string; result: boolean; data: { signatureText: string; signatureBytes: Uint8Array; publicKey: Uint8Array; }; } | { action: "client.fetchKeyPackageStatuses"; id: string; result: Map; data: { installationIds: string[]; }; } | { action: "client.sendSyncRequest"; id: string; result: undefined; data: { options: ArchiveOptions; serverUrl: string; }; } | { action: "client.sendSyncArchive"; id: string; result: undefined; data: { options: ArchiveOptions; serverUrl: string; pin: string; }; } | { action: "client.processSyncArchive"; id: string; result: undefined; data: { archivePin?: string | null; }; } | { action: "client.listAvailableArchives"; id: string; result: AvailableArchiveInfo[]; data: { daysCutoff: number; }; } | { action: "client.createArchive"; id: string; result: Uint8Array; data: { opts: ArchiveOptions; key: Uint8Array; }; } | { action: "client.importArchive"; id: string; result: undefined; data: { data: Uint8Array; key: Uint8Array; }; } | { action: "client.archiveMetadata"; id: string; result: ArchiveMetadata; data: { data: Uint8Array; key: Uint8Array; }; } | { action: "client.syncAllDeviceSyncGroups"; id: string; result: GroupSyncSummary; data: undefined; }; type ConversationAction = { action: "conversation.sync"; id: string; result: SafeConversation; data: { id: string; }; } | { action: "conversation.send"; id: string; result: string; data: { id: string; content: EncodedContent; options?: SendMessageOpts; }; } | { action: "conversation.publishMessages"; id: string; result: undefined; data: { id: string; }; } | { action: "conversation.processStreamedMessage"; id: string; result: Message[]; data: { id: string; envelopeBytes: Uint8Array; }; } | { action: "conversation.messages"; id: string; result: DecodedMessage$1[]; data: { id: string; options?: ListMessagesOptions; }; } | { action: "conversation.countMessages"; id: string; result: bigint; data: { id: string; options?: Omit; }; } | { action: "conversation.members"; id: string; result: GroupMember[]; data: { id: string; }; } | { action: "conversation.messageDisappearingSettings"; id: string; result: MessageDisappearingSettings | undefined; data: { id: string; }; } | { action: "conversation.updateMessageDisappearingSettings"; id: string; result: undefined; data: MessageDisappearingSettings & { id: string; }; } | { action: "conversation.removeMessageDisappearingSettings"; id: string; result: undefined; data: { id: string; }; } | { action: "conversation.isMessageDisappearingEnabled"; id: string; result: boolean; data: { id: string; }; } | { action: "conversation.stream"; id: string; result: undefined; data: { groupId: string; streamId: string; }; } | { action: "conversation.pausedForVersion"; id: string; result: string | undefined; data: { id: string; }; } | { action: "conversation.hmacKeys"; id: string; result: HmacKeys; data: { id: string; }; } | { action: "conversation.debugInfo"; id: string; result: ConversationDebugInfo; data: { id: string; }; } | { action: "conversation.consentState"; id: string; result: ConsentState; data: { id: string; }; } | { action: "conversation.updateConsentState"; id: string; result: undefined; data: { id: string; state: ConsentState; }; } | { action: "conversation.lastMessage"; id: string; result: DecodedMessage$1 | undefined; data: { id: string; }; } | { action: "conversation.isActive"; id: string; result: boolean; data: { id: string; }; } | { action: "conversation.lastReadTimes"; id: string; result: LastReadTimes; data: { id: string; }; } | { action: "conversation.sendText"; id: string; result: string; data: { id: string; text: string; isOptimistic?: boolean; }; } | { action: "conversation.sendMarkdown"; id: string; result: string; data: { id: string; markdown: string; isOptimistic?: boolean; }; } | { action: "conversation.sendReaction"; id: string; result: string; data: { id: string; reaction: Reaction; isOptimistic?: boolean; }; } | { action: "conversation.sendReadReceipt"; id: string; result: string; data: { id: string; isOptimistic?: boolean; }; } | { action: "conversation.sendReply"; id: string; result: string; data: { id: string; reply: Reply; isOptimistic?: boolean; }; } | { action: "conversation.sendTransactionReference"; id: string; result: string; data: { id: string; transactionReference: TransactionReference; isOptimistic?: boolean; }; } | { action: "conversation.sendWalletSendCalls"; id: string; result: string; data: { id: string; walletSendCalls: WalletSendCalls; isOptimistic?: boolean; }; } | { action: "conversation.sendActions"; id: string; result: string; data: { id: string; actions: Actions; isOptimistic?: boolean; }; } | { action: "conversation.sendIntent"; id: string; result: string; data: { id: string; intent: Intent; isOptimistic?: boolean; }; } | { action: "conversation.sendAttachment"; id: string; result: string; data: { id: string; attachment: Attachment; isOptimistic?: boolean; }; } | { action: "conversation.sendMultiRemoteAttachment"; id: string; result: string; data: { id: string; multiRemoteAttachment: MultiRemoteAttachment; isOptimistic?: boolean; }; } | { action: "conversation.sendRemoteAttachment"; id: string; result: string; data: { id: string; remoteAttachment: RemoteAttachment; isOptimistic?: boolean; }; }; type ConversationsAction = { action: "conversations.getConversationById"; id: string; result: SafeConversation | undefined; data: { id: string; }; } | { action: "conversations.getMessageById"; id: string; result: DecodedMessage$1 | undefined; data: { id: string; }; } | { action: "conversations.getDmByInboxId"; id: string; result: SafeConversation | undefined; data: { inboxId: string; }; } | { action: "conversations.list"; id: string; result: SafeConversation[]; data: { options?: ListConversationsOptions; }; } | { action: "conversations.listGroups"; id: string; result: SafeConversation[]; data: { options?: Omit; }; } | { action: "conversations.listDms"; id: string; result: SafeConversation[]; data: { options?: Omit; }; } | { action: "conversations.createGroupOptimistic"; id: string; result: SafeConversation; data: { options?: CreateGroupOptions; }; } | { action: "conversations.createGroupWithIdentifiers"; id: string; result: SafeConversation; data: { identifiers: Identifier[]; options?: CreateGroupOptions; }; } | { action: "conversations.createGroup"; id: string; result: SafeConversation; data: { inboxIds: string[]; options?: CreateGroupOptions; }; } | { action: "conversations.createDmWithIdentifier"; id: string; result: SafeConversation; data: { identifier: Identifier; options?: CreateDmOptions; }; } | { action: "conversations.createDm"; id: string; result: SafeConversation; data: { inboxId: string; options?: CreateDmOptions; }; } | { action: "conversations.sync"; id: string; result: undefined; data: undefined; } | { action: "conversations.syncAll"; id: string; result: undefined; data: { consentStates?: ConsentState[]; }; } | { action: "conversations.hmacKeys"; id: string; result: HmacKeys; data: undefined; } | { action: "conversations.stream"; id: string; result: undefined; data: { streamId: string; conversationType?: ConversationType; }; } | { action: "conversations.streamAllMessages"; id: string; result: undefined; data: { streamId: string; conversationType?: ConversationType; consentStates?: ConsentState[]; }; } | { action: "conversations.streamDeletedMessages"; id: string; result: undefined; data: { streamId: string; }; }; type DebugInformationAction = { action: "debugInformation.apiStatistics"; id: string; result: ApiStats; data: undefined; } | { action: "debugInformation.apiIdentityStatistics"; id: string; result: IdentityStats; data: undefined; } | { action: "debugInformation.apiAggregateStatistics"; id: string; result: string; data: undefined; } | { action: "debugInformation.clearAllStatistics"; id: string; result: undefined; data: undefined; }; type DmAction = { action: "dm.peerInboxId"; id: string; result: string; data: { id: string; }; } | { action: "dm.duplicateDms"; id: string; result: SafeConversation[]; data: { id: string; }; }; type GroupAction = { action: "group.listAdmins"; id: string; result: string[]; data: { id: string; }; } | { action: "group.listSuperAdmins"; id: string; result: string[]; data: { id: string; }; } | { action: "group.isAdmin"; id: string; result: boolean; data: { id: string; inboxId: string; }; } | { action: "group.isSuperAdmin"; id: string; result: boolean; data: { id: string; inboxId: string; }; } | { action: "group.addMembersByIdentifiers"; id: string; result: undefined; data: { id: string; identifiers: Identifier[]; }; } | { action: "group.removeMembersByIdentifiers"; id: string; result: undefined; data: { id: string; identifiers: Identifier[]; }; } | { action: "group.addMembers"; id: string; result: undefined; data: { id: string; inboxIds: string[]; }; } | { action: "group.removeMembers"; id: string; result: undefined; data: { id: string; inboxIds: string[]; }; } | { action: "group.addAdmin"; id: string; result: undefined; data: { id: string; inboxId: string; }; } | { action: "group.removeAdmin"; id: string; result: undefined; data: { id: string; inboxId: string; }; } | { action: "group.addSuperAdmin"; id: string; result: undefined; data: { id: string; inboxId: string; }; } | { action: "group.removeSuperAdmin"; id: string; result: undefined; data: { id: string; inboxId: string; }; } | { action: "group.updateName"; id: string; result: undefined; data: { id: string; name: string; }; } | { action: "group.updateDescription"; id: string; result: undefined; data: { id: string; description: string; }; } | { action: "group.updateImageUrl"; id: string; result: undefined; data: { id: string; imageUrl: string; }; } | { action: "group.updateAppData"; id: string; result: undefined; data: { id: string; appData: string; }; } | { action: "group.updatePermission"; id: string; result: undefined; data: { id: string; permissionType: PermissionUpdateType; policy: PermissionPolicy; metadataField?: MetadataField; }; } | { action: "group.permissions"; id: string; result: SafeConversation["permissions"]; data: { id: string; }; } | { action: "group.requestRemoval"; id: string; result: undefined; data: { id: string; }; } | { action: "group.isPendingRemoval"; id: string; result: boolean; data: { id: string; }; }; type PreferencesAction = { action: "preferences.inboxState"; id: string; result: InboxState; data: { refreshFromNetwork: boolean; }; } | { action: "preferences.getInboxStates"; id: string; result: InboxState[]; data: { inboxIds: string[]; refreshFromNetwork: boolean; }; } | { action: "preferences.setConsentStates"; id: string; result: undefined; data: { records: Consent[]; }; } | { action: "preferences.getConsentState"; id: string; result: ConsentState; data: { entityType: ConsentEntityType; entity: string; }; } | { action: "preferences.sync"; id: string; result: GroupSyncSummary; data: undefined; } | { action: "preferences.streamConsent"; id: string; result: undefined; data: { streamId: string; }; } | { action: "preferences.streamPreferences"; id: string; result: undefined; data: { streamId: string; }; }; type UnknownAction = { action: string; id: string; result: unknown; data: unknown; }; type EndStreamAction = { action: "endStream"; id: string; result: undefined; data: { streamId: string; }; }; type ClientWorkerAction = EndStreamAction | ClientAction | ConversationAction | ConversationsAction | DmAction | GroupAction | PreferencesAction | DebugInformationAction; type ActionName = T["action"]; type ExtractAction> = Extract; type ExtractActionData> = ExtractAction["data"]; type ExtractActionResult> = ExtractAction["result"]; type ActionWithoutData = { [A in T["action"]]: Omit, "data">; }[T["action"]]; type ActionErrorData = { id: string; action: ActionName; error: Error; }; type StreamAction = { action: "stream.message"; streamId: string; result: DecodedMessage$1 | undefined; } | { action: "stream.conversation"; streamId: string; result: SafeConversation | undefined; } | { action: "stream.consent"; streamId: string; result: Consent[] | undefined; } | { action: "stream.preferences"; streamId: string; result: UserPreferenceUpdate[] | undefined; } | { action: "stream.deletedMessage"; streamId: string; result: DecodedMessage$1 | undefined; } | { action: "stream.fail"; streamId: string; result: undefined; }; /** * Class that sets up a bridge for worker communications * * This class is not meant to be used directly. * * @param worker - The worker to use for communications * @param enableLogging - Whether to enable logging in the worker * @returns A new WorkerBridge instance */ declare class WorkerBridge { #private; constructor(worker: Worker, enableLogging?: boolean); /** * Sends an action message to the worker * * @param action - The action to send to the worker * @param data - The data to send to the worker * @returns A promise that resolves when the action is completed */ action, D = ExtractActionData, R = ExtractActionResult>(action: A, ...args: D extends undefined ? [] : [data: D]): [R] extends [undefined] ? Promise : Promise; /** * Handles a message from the worker * * @param event - The event to handle */ handleMessage: (event: MessageEvent | ActionErrorData>) => void; /** * Handles a stream message from the worker * * @param streamId - The ID of the stream to handle * @param callback - The callback to handle the stream message * @returns A function to remove the stream handler */ handleStreamMessage: (streamId: string, callback: (error: Error | null, value: R | undefined) => void, options?: StreamOptions) => () => Promise; /** * Removes all event listeners and terminates the worker */ close(): void; } /** * Represents a conversation * * This class is not intended to be initialized directly. */ declare class Conversation { #private; /** * Creates a new conversation instance * * @param worker - The worker bridge instance for client communication * @param codecRegistry - The codec registry instance * @param id - The unique identifier for this conversation * @param data - Optional conversation data to initialize with */ constructor(worker: WorkerBridge, codecRegistry: CodecRegistry, id: string, data?: SafeConversation); get id(): string; get addedByInboxId(): string | undefined; get createdAtNs(): bigint | undefined; get createdAt(): Date | undefined; get metadata(): _xmtp_wasm_bindings.GroupMetadata | undefined; get topic(): string; lastMessage(): Promise | undefined>; isActive(): Promise; /** * Gets the conversation members * * @returns Promise that resolves with the conversation members */ members(): Promise<_xmtp_wasm_bindings.GroupMember[]>; /** * Synchronizes conversation data from the network * * @returns Promise that resolves with the updated conversation data */ sync(): Promise; /** * Publishes pending messages that were sent optimistically * * @returns Promise that resolves when publishing is complete */ publishMessages(): Promise; /** * Decodes, decrypts, and persists a raw envelope from a group message stream. * * @param envelopeBytes - Raw protobuf-encoded envelope bytes from the stream * @returns The processed and stored messages */ processStreamedMessage(envelopeBytes: Uint8Array): Promise<_xmtp_wasm_bindings.Message[]>; /** * Sends a message * * @param content - The encoded content to send * @param options - Optional send options * @param options.shouldPush - Indicates whether this message should be * included in push notifications * @param options.isOptimistic - Indicates whether this message should be * sent optimistically and published later via `publishMessages` * @returns Promise that resolves with the message ID after it has been sent */ send(content: EncodedContent, options?: SendMessageOpts): Promise; /** * Sends a text message * * @param text - The text to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendText(text: string, isOptimistic?: boolean): Promise; /** * Sends a markdown message * * @param markdown - The markdown to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendMarkdown(markdown: string, isOptimistic?: boolean): Promise; /** * Sends a reaction message * * @param reaction - The reaction to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendReaction(reaction: Reaction, isOptimistic?: boolean): Promise; /** * Sends a read receipt message * * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendReadReceipt(isOptimistic?: boolean): Promise; /** * Sends a reply message * * @param reply - The reply to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendReply(reply: Reply, isOptimistic?: boolean): Promise; /** * Sends a transaction reference message * * @param transactionReference - The transaction reference to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendTransactionReference(transactionReference: TransactionReference, isOptimistic?: boolean): Promise; /** * Sends a wallet send calls message * * @param walletSendCalls - The wallet send calls to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendWalletSendCalls(walletSendCalls: WalletSendCalls, isOptimistic?: boolean): Promise; /** * Sends an actions message * * @param actions - The actions to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendActions(actions: Actions, isOptimistic?: boolean): Promise; /** * Sends an intent message * * @param intent - The intent to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendIntent(intent: Intent, isOptimistic?: boolean): Promise; /** * Sends an attachment message * * @param attachment - The attachment to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendAttachment(attachment: Attachment, isOptimistic?: boolean): Promise; /** * Sends a multi remote attachment message * * @param multiRemoteAttachment - The multi remote attachment to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, isOptimistic?: boolean): Promise; /** * Sends a remote attachment message * * @param remoteAttachment - The remote attachment to send * @param isOptimistic - Whether to send the message optimistically * @returns Promise that resolves with the message ID after it has been sent */ sendRemoteAttachment(remoteAttachment: RemoteAttachment, isOptimistic?: boolean): Promise; /** * Lists messages in this conversation * * @param options - Optional filtering and pagination options * @returns Promise that resolves with an array of decoded messages */ messages(options?: ListMessagesOptions): Promise[]>; /** * Counts messages in this conversation * * @param options - Optional filtering options * @returns Promise that resolves with the count of messages */ countMessages(options?: Omit): Promise; /** * Gets the consent state for this conversation * * @returns Promise that resolves with the current consent state */ consentState(): Promise; /** * Updates the consent state for this conversation * * @param state - The new consent state to set * @returns Promise that resolves when the update is complete */ updateConsentState(state: ConsentState): Promise; /** * Gets the message disappearing settings for this conversation * * @returns Promise that resolves with the current message disappearing settings */ messageDisappearingSettings(): Promise<_xmtp_wasm_bindings.MessageDisappearingSettings | undefined>; /** * Updates message disappearing settings for this conversation * * @param fromNs - The timestamp from which messages should start disappearing * @param inNs - The duration after which messages should disappear * @returns Promise that resolves when the update is complete */ updateMessageDisappearingSettings(fromNs: bigint, inNs: bigint): Promise; /** * Removes message disappearing settings from this conversation * * @returns Promise that resolves when the settings are removed */ removeMessageDisappearingSettings(): Promise; /** * Checks if message disappearing is enabled for this conversation * * @returns Promise that resolves with whether message disappearing is enabled */ isMessageDisappearingEnabled(): Promise; /** * Creates a stream for new messages in this conversation * * @param callback - Optional callback function for handling new stream values * @returns Stream instance for new messages */ stream(options?: StreamOptions>): Promise>>; pausedForVersion(): Promise; /** * Gets HMAC keys for this conversation * * @returns Promise that resolves with the HMAC keys */ hmacKeys(): Promise; /** * Retrieves information for this conversation to help with debugging * * @returns The debug information for this conversation */ debugInfo(): Promise<_xmtp_wasm_bindings.ConversationDebugInfo>; /** * Retrieves the last read times for this conversation * * @returns A map keyed by inbox ID with the last read timestamp * (nanoseconds since epoch) */ lastReadTimes(): Promise; } /** * Represents a direct message conversation between two inboxes * * This class is not intended to be initialized directly. */ declare class Dm extends Conversation { #private; /** * Creates a new direct message conversation instance * * @param worker - The worker bridge instance for client communication * @param codecRegistry - The codec registry instance * @param id - Identifier for the direct message conversation * @param data - Optional conversation data to initialize with */ constructor(worker: WorkerBridge, codecRegistry: CodecRegistry, id: string, data?: SafeConversation); /** * Retrieves the inbox ID of the other participant in the DM * * @returns Promise that resolves with the peer's inbox ID */ peerInboxId(): Promise; duplicateDms(): Promise[]>; } /** * Represents a group conversation between multiple inboxes * * This class is not intended to be initialized directly. */ declare class Group extends Conversation { #private; /** * Creates a new group conversation instance * * @param worker - The worker bridge instance for client communication * @param codecRegistry - The codec registry instance * @param id - Identifier for the group conversation * @param data - Optional conversation data to initialize with */ constructor(worker: WorkerBridge, codecRegistry: CodecRegistry, id: string, data?: SafeConversation); /** * Synchronizes the group's data with the network * * @returns Updated group data */ sync(): Promise; /** * The name of the group */ get name(): string | undefined; /** * Updates the group's name * * @param name The new name for the group */ updateName(name: string): Promise; /** * The image URL of the group */ get imageUrl(): string | undefined; /** * Updates the group's image URL * * @param imageUrl The new image URL for the group */ updateImageUrl(imageUrl: string): Promise; /** * The description of the group */ get description(): string | undefined; /** * Updates the group's description * * @param description The new description for the group */ updateDescription(description: string): Promise; /** * The app data of the group */ get appData(): string | undefined; /** * Updates the group's app data (max 8192 bytes) * * @param appData The new app data for the group */ updateAppData(appData: string): Promise; /** * The list of admins of the group by inbox ID */ get admins(): string[]; /** * The list of super admins of the group by inbox ID */ get superAdmins(): string[]; /** * Fetches and updates the list of group admins from the server * * @returns Array of admin inbox IDs */ listAdmins(): Promise; /** * Fetches and updates the list of group super admins from the server * * @returns Array of super admin inbox IDs */ listSuperAdmins(): Promise; /** * Retrieves the group's permissions * * @returns The group's permissions */ permissions(): Promise<{ policyType: _xmtp_wasm_bindings.GroupPermissionsOptions; policySet: _xmtp_wasm_bindings.PermissionPolicySet; }>; /** * Updates a specific permission policy for the group * * @param permissionType The type of permission to update * @param policy The new permission policy * @param metadataField Optional metadata field for the permission */ updatePermission(permissionType: PermissionUpdateType, policy: PermissionPolicy, metadataField?: MetadataField): Promise; /** * Checks if an inbox is an admin of the group * * @param inboxId The inbox ID to check * @returns Boolean indicating if the inbox is an admin */ isAdmin(inboxId: string): Promise; /** * Checks if an inbox is a super admin of the group * * @param inboxId The inbox ID to check * @returns Boolean indicating if the inbox is a super admin */ isSuperAdmin(inboxId: string): Promise; /** * Adds members to the group using identifiers * * @param identifiers Array of member identifiers to add */ addMembersByIdentifiers(identifiers: Identifier[]): Promise; /** * Adds members to the group using inbox IDs * * @param inboxIds Array of inbox IDs to add */ addMembers(inboxIds: string[]): Promise; /** * Removes members from the group using identifiers * * @param identifiers Array of member identifiers to remove */ removeMembersByIdentifiers(identifiers: Identifier[]): Promise; /** * Removes members from the group using inbox IDs * * @param inboxIds Array of inbox IDs to remove */ removeMembers(inboxIds: string[]): Promise; /** * Promotes a group member to admin status * * @param inboxId The inbox ID of the member to promote */ addAdmin(inboxId: string): Promise; /** * Removes admin status from a group member * * @param inboxId The inbox ID of the admin to demote */ removeAdmin(inboxId: string): Promise; /** * Promotes a group member to super admin status * * @param inboxId The inbox ID of the member to promote */ addSuperAdmin(inboxId: string): Promise; /** * Removes super admin status from a group member * * @param inboxId The inbox ID of the super admin to demote */ removeSuperAdmin(inboxId: string): Promise; /** * Request to leave the group */ requestRemoval(): Promise; /** * Checks if the current user has requested to leave the group * * @returns Boolean */ isPendingRemoval(): Promise; } /** * Manages conversations * * This class is not intended to be initialized directly. */ declare class Conversations { #private; /** * Creates a new conversations instance * * @param worker - The worker bridge instance for client communication * @param codecRegistry - The codec registry instance */ constructor(client: Client, worker: WorkerBridge, codecRegistry: CodecRegistry); get topic(): string | undefined; /** * Synchronizes conversations for the current client from the network * * @returns Promise that resolves when sync is complete */ sync(): Promise; /** * Synchronizes all conversations and messages from the network with optional * consent state filtering, then uploads conversation and message history to * the history sync server * * @param consentStates - Optional array of consent states to filter by * @returns Promise that resolves when sync is complete */ syncAll(consentStates?: ConsentState[]): Promise; /** * Retrieves a conversation by its ID * * @param id - The conversation ID to look up * @returns Promise that resolves with the conversation, if found */ getConversationById(id: string): Promise | Dm | undefined>; /** * Retrieves a message by its ID * * @param id - The message ID to look up * @returns Promise that resolves with the decoded message, if found */ getMessageById(id: string): Promise | undefined>; /** * Retrieves a DM by inbox ID * * @param inboxId - The inbox ID to look up * @returns Promise that resolves with the DM, if found */ getDmByInboxId(inboxId: string): Promise | undefined>; /** * Fetches a DM by identifier * * @param identifier - The identifier to look up * @returns Promise that resolves with the DM, if found */ fetchDmByIdentifier(identifier: Identifier): Promise | undefined>; /** * Lists all conversations with optional filtering * * @param options - Optional filtering and pagination options * @returns Promise that resolves with an array of conversations */ list(options?: ListConversationsOptions): Promise<(Group | Dm)[]>; /** * Lists all group conversations with optional filtering * * @param options - Optional filtering and pagination options * @returns Promise that resolves with an array of groups */ listGroups(options?: Omit): Promise[]>; /** * Lists all DM conversations with optional filtering * * @param options - Optional filtering and pagination options * @returns Promise that resolves with an array of DMs */ listDms(options?: Omit): Promise[]>; /** * Creates a new group conversation without publishing to the network * * @param options - Optional group creation options * @returns Promise that resolves with the new group */ createGroupOptimistic(options?: CreateGroupOptions): Promise>; /** * Creates a new group conversation with the specified identifiers * * @param identifiers - Array of identifiers for group members * @param options - Optional group creation options * @returns Promise that resolves with the new group */ createGroupWithIdentifiers(identifiers: Identifier[], options?: CreateGroupOptions): Promise>; /** * Creates a new group conversation with the specified inbox IDs * * @param inboxIds - Array of inbox IDs for other group members (the creator is included automatically) * @param options - Optional group creation options * @returns Promise that resolves with the new group */ createGroup(inboxIds: string[], options?: CreateGroupOptions): Promise>; /** * Creates a new DM conversation with the specified identifier * * @param identifier - Identifier for the DM recipient * @param options - Optional DM creation options * @returns Promise that resolves with the new DM */ createDmWithIdentifier(identifier: Identifier, options?: CreateDmOptions): Promise>; /** * Creates a new DM conversation with the specified inbox ID * * @param inboxId - Inbox ID for the DM recipient * @param options - Optional DM creation options * @returns Promise that resolves with the new DM */ createDm(inboxId: string, options?: CreateDmOptions): Promise>; /** * Gets the HMAC keys for all conversations * * @returns Promise that resolves with the HMAC keys for all conversations */ hmacKeys(): Promise; /** * Creates a stream for new conversations * * @param options - Optional stream options * @param options.conversationType - Optional type to filter conversations * @returns Stream instance for new conversations */ stream | Dm = Group | Dm>(options?: StreamOptions & { conversationType?: ConversationType; }): Promise>; /** * Creates a stream for new group conversations * * @param options - Optional stream options * @returns Stream instance for new group conversations */ streamGroups(options?: StreamOptions>): Promise>>; /** * Creates a stream for new DM conversations * * @param options - Optional stream options * @returns Stream instance for new DM conversations */ streamDms(options?: StreamOptions>): Promise>>; /** * Creates a stream for all new messages * * @param options - Optional stream options * @param options.conversationType - Optional conversation type to filter messages * @param options.consentStates - Optional consent states to filter messages * @returns Stream instance for new messages */ streamAllMessages(options?: StreamOptions> & { conversationType?: ConversationType; consentStates?: ConsentState[]; }): Promise>>; /** * Creates a stream for all new group messages * * @param options - Optional stream options * @param options.consentStates - Optional consent states to filter messages * @returns Stream instance for new group messages */ streamAllGroupMessages(options?: StreamOptions> & { consentStates?: ConsentState[]; }): Promise>>; /** * Creates a stream for all new DM messages * * @param options - Optional stream options * @param options.consentStates - Optional consent states to filter messages * @returns Stream instance for new DM messages */ streamAllDmMessages(options?: StreamOptions> & { consentStates?: ConsentState[]; }): Promise>>; /** * Creates a stream for message deletions that streams the message IDs of * deleted messages * * @param options - Optional stream options * @returns Stream instance for message deletions * @deprecated Use streamDeletedMessages instead */ streamMessageDeletions(options?: Omit, "disableSync" | "onFail" | "onRetry" | "onRestart" | "retryAttempts" | "retryDelay" | "retryOnFail">): Promise>; /** * Creates a stream for deleted messages that streams the deleted messages * * @param options - Optional stream options * @returns Stream instance for deleted messages */ streamDeletedMessages(options?: Omit>, "disableSync" | "onFail" | "onRetry" | "onRestart" | "retryAttempts" | "retryDelay" | "retryOnFail">): Promise>>; } /** * Debug information helpers for the client * * This class is not intended to be initialized directly. */ declare class DebugInformation { #private; constructor(worker: WorkerBridge); apiStatistics(): Promise<_xmtp_wasm_bindings.ApiStats>; apiIdentityStatistics(): Promise<_xmtp_wasm_bindings.IdentityStats>; apiAggregateStatistics(): Promise; clearAllStatistics(): Promise; } /** * Manages user preferences and consent states * * This class is not intended to be initialized directly. */ declare class Preferences { #private; /** * Creates a new preferences instance * * @param client - The client instance managing preferences */ constructor(worker: WorkerBridge); sync(): Promise<_xmtp_wasm_bindings.GroupSyncSummary>; /** * Retrieves the current inbox state of this client from the local database * * @returns Promise that resolves with the inbox state */ inboxState(): Promise<_xmtp_wasm_bindings.InboxState>; /** * Retrieves the latest inbox state of this client from the network * * @returns Promise that resolves with the inbox state */ fetchInboxState(): Promise<_xmtp_wasm_bindings.InboxState>; /** * Retrieves the current inbox states for specified inbox IDs from the local * database * * @param inboxIds - Array of inbox IDs to get state for * @returns Promise that resolves with the inbox states for the inbox IDs */ getInboxStates(inboxIds: string[]): Promise<_xmtp_wasm_bindings.InboxState[]>; /** * Retrieves the latest inbox states for specified inbox IDs from the network * * @param inboxIds - Array of inbox IDs to get state for * @returns Promise that resolves with the inbox states for the inbox IDs */ fetchInboxStates(inboxIds: string[]): Promise<_xmtp_wasm_bindings.InboxState[]>; /** * Updates consent states for multiple records * * @param records - Array of consent records to update * @returns Promise that resolves when consent states are updated */ setConsentStates(records: Consent[]): Promise; /** * Retrieves consent state for a specific entity * * @param entityType - Type of entity to get consent for * @param entity - Entity identifier * @returns Promise that resolves with the consent state */ getConsentState(entityType: ConsentEntityType, entity: string): Promise; /** * Creates a stream of consent state updates * * @param options - Optional stream options * @returns Stream instance for consent updates */ streamConsent(options?: StreamOptions): Promise>; /** * Creates a stream of user preference updates * * @param options - Optional stream options * @returns Stream instance for preference updates */ streamPreferences(options?: StreamOptions): Promise>; } /** * Client for interacting with the XMTP network */ declare class Client { #private; /** * Creates a new XMTP client instance * * This class is not intended to be initialized directly. * Use `Client.create` or `Client.build` instead. * * @param options - Optional configuration for the client */ constructor(options?: ClientOptions); /** * Initializes the client with the provided identifier * * This is not meant to be called directly. * Use `Client.create` or `Client.build` instead. * * @param identifier - The identifier to initialize the client with */ init(identifier: Identifier): Promise; /** * Shutdown the client */ close(): void; /** * Creates a new client instance with a signer * * @param signer - The signer to use for authentication * @param options - Optional configuration for the client * @returns A new client instance */ static create(signer: Signer, options?: Omit & { codecs?: ContentCodecs; }): Promise>>; /** * Creates a new client instance with an identifier * * Clients created with this method must already be registered. * Any methods called that require a signer will throw an error. * * @param identifier - The identifier to use * @param options - Optional configuration for the client * @returns A new client instance */ static build(identifier: Identifier, options?: Omit & { codecs?: ContentCodecs; }): Promise>>; /** * Gets the client options */ get options(): ClientOptions | undefined; /** * Gets the signer associated with this client */ get signer(): Signer | undefined; /** * Gets whether the client has been initialized */ get isReady(): boolean; /** * Gets the inbox ID associated with this client */ get inboxId(): string | undefined; /** * Gets the account identifier for this client */ get accountIdentifier(): Identifier | undefined; /** * Gets the installation ID for this client */ get installationId(): string | undefined; /** * Gets the installation ID bytes for this client */ get installationIdBytes(): Uint8Array | undefined; /** * Gets the conversations manager for this client */ get conversations(): Conversations; /** * Gets the debug information helpers for this client */ get debugInformation(): DebugInformation; /** * Gets the preferences manager for this client */ get preferences(): Preferences; /** * Gets the version of libxmtp used in the bindings */ get libxmtpVersion(): string | undefined; /** * Gets the app version used by the client */ get appVersion(): string | undefined; /** * Gets the XMTP environment used by this client */ get env(): XmtpEnv | undefined; /** * Creates signature text for creating a new inbox * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `register` method instead. * * @returns The signature text and signature request ID */ unsafe_createInboxSignatureText(): Promise<{ signatureText?: string; signatureRequestId?: string; }>; /** * Creates signature text for adding a new account to the client's inbox * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `unsafe_addAccount` method instead. * * @param newIdentifier - The identifier of the new account * @param allowInboxReassign - Whether to allow inbox reassignment * @throws {InboxReassignError} if `allowInboxReassign` is false * @returns The signature text and signature request ID */ unsafe_addAccountSignatureText(newIdentifier: Identifier, allowInboxReassign?: boolean): Promise<{ signatureText: string; signatureRequestId: string; }>; /** * Creates signature text for removing an account from the client's inbox * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `removeAccount` method instead. * * @param identifier - The identifier of the account to remove * @returns The signature text and signature request ID */ unsafe_removeAccountSignatureText(identifier: Identifier): Promise<{ signatureText: string; signatureRequestId: string; }>; /** * Creates signature text for revoking all other installations of the * client's inbox * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `revokeAllOtherInstallations` method instead. * * @returns The signature text and signature request ID */ unsafe_revokeAllOtherInstallationsSignatureText(): Promise<{ signatureText: string | undefined; signatureRequestId: string; }>; /** * Creates signature text for revoking specific installations of the * client's inbox * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `revokeInstallations` method instead. * * @param installationIds - The installation IDs to revoke * @returns The signature text and signature request ID */ unsafe_revokeInstallationsSignatureText(installationIds: Uint8Array[]): Promise<{ signatureText: string; signatureRequestId: string; }>; /** * Creates signature text for changing the recovery identifier for this * client's inbox * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `changeRecoveryIdentifier` method instead. * * @param identifier - The new recovery identifier * @returns The signature text and signature request ID */ unsafe_changeRecoveryIdentifierSignatureText(identifier: Identifier): Promise<{ signatureText: string; signatureRequestId: string; }>; /** * Applies a signature request to the client * * WARNING: This function should be used with caution. It is only provided * for use in special cases where the provided workflows do not meet the * requirements of an application. * * It is highly recommended to use the `register`, `unsafe_addAccount`, * `removeAccount`, `revokeAllOtherInstallations`, `revokeInstallations`, * or `changeRecoveryIdentifier` method instead. * * @param signer - The signer to use * @param signatureRequestId - The ID of the signature request to apply */ unsafe_applySignatureRequest(signer: SafeSigner, signatureRequestId: string): Promise; /** * Registers the client with the XMTP network * * Requires a signer, use `Client.create` to create a client with a signer. * * @throws {SignerUnavailableError} if no signer is available */ register(): Promise; /** * Adds a new account to the client inbox * * WARNING: This function should be used with caution. Adding a wallet already * associated with an inbox ID will cause the wallet to lose access to * that inbox. * * The `allowInboxReassign` parameter must be true to reassign an inbox * already associated with a different account. * * Requires a signer, use `Client.create` to create a client with a signer. * * @param newAccountSigner - The signer for the new account * @param allowInboxReassign - Whether to allow inbox reassignment * @throws {SignerUnavailableError} if no signer is available * @throws {InboxReassignError} if `allowInboxReassign` is false * @throws {AccountAlreadyAssociatedError} if the account is already associated with an inbox ID */ unsafe_addAccount(newAccountSigner: Signer, allowInboxReassign?: boolean): Promise; /** * Removes an account from the client's inbox * * Requires a signer, use `Client.create` to create a client with a signer. * * @param accountIdentifier - The identifier of the account to remove * @throws {SignerUnavailableError} if no signer is available */ removeAccount(identifier: Identifier): Promise; /** * Revokes all other installations of the client's inbox * * Requires a signer, use `Client.create` to create a client with a signer. * * @throws {SignerUnavailableError} if no signer is available */ revokeAllOtherInstallations(): Promise; /** * Revokes specific installations of the client's inbox * * Requires a signer, use `Client.create` to create a client with a signer. * * @param installationIds - The installation IDs to revoke * @throws {SignerUnavailableError} if no signer is available */ revokeInstallations(installationIds: Uint8Array[]): Promise; /** * Revokes specific installations of the client's inbox without a client * * @param signer - The signer to use * @param inboxId - The inbox ID to revoke installations for * @param installationIds - The installation IDs to revoke * @param backend - Optional `Backend` instance created with `createBackend()` */ static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], backend?: Backend): Promise; /** * Revokes specific installations of the client's inbox without a client * * @param signer - The signer to use * @param inboxId - The inbox ID to revoke installations for * @param installationIds - The installation IDs to revoke * @param env - The environment to use * @param gatewayHost - Optional gateway host * @deprecated Pass a `Backend` instance created with `createBackend()` instead * of `XmtpEnv` and `gatewayHost`. */ static revokeInstallations(signer: Signer, inboxId: string, installationIds: Uint8Array[], env?: XmtpEnv, gatewayHost?: string): Promise; /** * Fetches the inbox states for the specified inbox IDs from the network * without a client * * @param inboxIds - The inbox IDs to get the state for * @param backend - Optional `Backend` instance created with `createBackend()` * @returns The inbox states for the specified inbox IDs */ static fetchInboxStates(inboxIds: string[], backend?: Backend): Promise; /** * Fetches the inbox states for the specified inbox IDs from the network * without a client * * @param inboxIds - The inbox IDs to get the state for * @param env - The environment to use * @param gatewayHost - Optional gateway host * @returns The inbox states for the specified inbox IDs * @deprecated Pass a `Backend` instance created with `createBackend()` instead * of `XmtpEnv` and `gatewayHost`. */ static fetchInboxStates(inboxIds: string[], env?: XmtpEnv, gatewayHost?: string): Promise; /** * Changes the recovery identifier for the client's inbox * * Requires a signer, use `Client.create` to create a client with a signer. * * @param identifier - The new recovery identifier * @throws {SignerUnavailableError} if no signer is available */ changeRecoveryIdentifier(identifier: Identifier): Promise; /** * Checks if the client is registered with the XMTP network * * @returns Whether the client is registered */ isRegistered(): Promise; /** * Checks if the client can message the specified identifiers * * @param identifiers - The identifiers to check * @returns Whether the client can message the identifiers */ canMessage(identifiers: Identifier[]): Promise>; /** * Checks if the specified identifiers can be messaged * * @param identifiers - The identifiers to check * @param backend - Optional `Backend` instance created with `createBackend()` * @returns Map of identifiers to whether they can be messaged */ static canMessage(identifiers: Identifier[], backend?: Backend): Promise>; /** * Checks if the specified identifiers can be messaged * * @param identifiers - The identifiers to check * @param env - Optional XMTP environment * @returns Map of identifiers to whether they can be messaged * @deprecated Pass a `Backend` instance created with `createBackend()` instead * of `XmtpEnv`. */ static canMessage(identifiers: Identifier[], env?: XmtpEnv): Promise>; /** * Fetches the inbox ID for a given identifier from the local database * If not found, fetches from the network * * @param identifier - The identifier to look up * @returns The inbox ID, if found */ fetchInboxIdByIdentifier(identifier: Identifier): Promise; /** * Signs a message with the installation key * * @param signatureText - The text to sign * @returns The signature */ signWithInstallationKey(signatureText: string): Promise>; /** * Verifies a signature was made with the installation key * * @param signatureText - The text that was signed * @param signatureBytes - The signature bytes to verify * @returns Whether the signature is valid */ verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): Promise; /** * Verifies a signature was made with a public key * * @param signatureText - The text that was signed * @param signatureBytes - The signature bytes to verify * @param publicKey - The public key to verify against * @returns Whether the signature is valid */ verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): Promise; /** * Fetches the key package statuses from the network for the specified * installation IDs * * @param installationIds - The installation IDs to check * @returns The key package statuses */ fetchKeyPackageStatuses(installationIds: string[]): Promise>; /** * Send a sync request to other devices on the network * * @param options - Archive options specifying what to sync (defaults to consent and messages) * @param serverUrl - The server URL for the sync request (defaults to environment-specific URL) * @returns Promise that resolves when the sync request is sent */ sendSyncRequest(options?: ArchiveOptions, serverUrl?: string): Promise; /** * Send a sync archive to the sync group * * @param pin - The pin used for reference when importing * @param options - Archive options specifying what to sync (defaults to consent and messages) * @param serverUrl - The server URL for the sync archive (defaults to environment-specific URL) * @returns Promise that resolves when the sync archive is sent */ sendSyncArchive(pin: string, options?: ArchiveOptions, serverUrl?: string): Promise; /** * Process a sync archive that matches the pin given * * @param archivePin - Optional pin to match. If not provided, processes the last archive sent * @returns Promise that resolves when the archive is processed */ processSyncArchive(archivePin?: string | null): Promise; /** * List the archives available for import in the sync group * * You may need to manually sync the sync group before calling * this function to see recently uploaded archives. * * @param daysCutoff - Number of days to look back for archives * @returns Promise that resolves with array of available archive information */ listAvailableArchives(daysCutoff: number): Promise; /** * Export archive data to bytes for later restoration * * @param key - Encryption key for the archive * @param opts - Archive options specifying what to include (defaults to consent and messages) * @returns Promise that resolves with the archive data as bytes */ createArchive(key: Uint8Array, opts?: ArchiveOptions): Promise; /** * Import an archive from bytes * * @param data - The archive data as bytes * @param key - Encryption key for the archive * @returns Promise that resolves when the archive is imported */ importArchive(data: Uint8Array, key: Uint8Array): Promise; /** * Load the metadata for an archive to see what it contains * * @param data - The archive data as bytes * @param key - Encryption key for the archive * @returns Promise that resolves with the archive metadata */ archiveMetadata(data: Uint8Array, key: Uint8Array): Promise; /** * Manually sync all device sync groups * * @returns Promise that resolves with a summary of the sync operation */ syncAllDeviceSyncGroups(): Promise; } declare class Opfs { #private; constructor(enableLogging?: boolean); init(): Promise; close(): void; static create(enableLogging?: boolean): Promise; listFiles(): Promise; fileCount(): Promise; poolCapacity(): Promise; fileExists(path: string): Promise; deleteFile(path: string): Promise; exportDb(path: string): Promise>; importDb(path: string, data: Uint8Array): Promise; clearAll(): Promise; } declare const createBackend: (options?: NetworkOptions) => Promise; /** * Generates an inbox ID for a given identifier * * @param identifier - The identifier to generate an inbox ID for * @param nonce - Optional nonce to use for generating the inbox ID * @returns Promise that resolves with the generated inbox ID */ declare const generateInboxId: (identifier: Identifier, nonce?: bigint) => Promise; /** * Gets the inbox ID for a specific identifier using a Backend * * @param backend - The Backend instance for API communication * @param identifier - The identifier to get the inbox ID for * @returns Promise that resolves with the inbox ID for the identifier */ declare const getInboxIdForIdentifier: (backend: Backend, identifier: Identifier) => Promise; /** * Gets the name of a metadata field * * @param field - The metadata field to get the name for * @returns The name of the metadata field */ declare const metadataFieldName: (field: MetadataField) => Promise; /** * Pre-configured URLs for the XMTP network based on the environment * * @deprecated Use `createBackend()` instead. * @constant * @property {string} local - The local URL for the XMTP network * @property {string} dev - The development URL for the XMTP network * @property {string} production - The production URL for the XMTP network */ declare const ApiUrls: { readonly local: "http://localhost:5557"; readonly dev: "https://api.dev.xmtp.network:5558"; readonly production: "https://api.production.xmtp.network:5558"; }; /** * Pre-configured URLs for the XMTP history sync service based on the environment * * @constant * @property {string} local - The local URL for the XMTP history sync service * @property {string} dev - The development URL for the XMTP history sync service * @property {string} production - The production URL for the XMTP history sync service */ declare const HistorySyncUrls: { readonly local: "http://localhost:5558"; readonly dev: "https://message-history.dev.ephemera.network"; readonly production: "https://message-history.production.ephemera.network"; readonly "testnet-staging": "https://message-history.dev.ephemera.network"; readonly "testnet-dev": "https://message-history.dev.ephemera.network"; readonly testnet: "https://message-history.dev.ephemera.network"; readonly mainnet: "https://message-history.production.ephemera.network"; }; declare const encodeActions: (actions: _xmtp_wasm_bindings.Actions) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeAttachment: (attachment: _xmtp_wasm_bindings.Attachment) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeIntent: (intent: _xmtp_wasm_bindings.Intent) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeMarkdown: (text: string) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeMultiRemoteAttachment: (multi_remote_attachment: _xmtp_wasm_bindings.MultiRemoteAttachment) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeReaction: (reaction: _xmtp_wasm_bindings.Reaction) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeReadReceipt: (read_receipt: _xmtp_wasm_bindings.ReadReceipt) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeRemoteAttachment: (remote_attachment: _xmtp_wasm_bindings.RemoteAttachment) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeText: (text: string) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeTransactionReference: (transaction_reference: _xmtp_wasm_bindings.TransactionReference) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const encodeWalletSendCalls: (wallet_send_calls: _xmtp_wasm_bindings.WalletSendCalls) => Promise<_xmtp_wasm_bindings.EncodedContent>; declare const contentTypeActions: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeAttachment: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeGroupUpdated: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeIntent: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeLeaveRequest: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeMarkdown: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeMultiRemoteAttachment: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeReaction: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeReadReceipt: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeRemoteAttachment: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeReply: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeText: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeTransactionReference: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const contentTypeWalletSendCalls: () => Promise<_xmtp_wasm_bindings.ContentTypeId>; declare const encryptAttachment: (attachment: _xmtp_wasm_bindings.Attachment) => Promise<_xmtp_wasm_bindings.EncryptedAttachment>; declare const decryptAttachment: (encryptedBytes: Uint8Array, remoteAttachment: _xmtp_wasm_bindings.RemoteAttachment) => Promise<_xmtp_wasm_bindings.Attachment>; declare class ClientNotInitializedError extends Error { constructor(); } declare class SignerUnavailableError extends Error { constructor(); } declare class InboxReassignError extends Error { constructor(); } declare class AccountAlreadyAssociatedError extends Error { constructor(inboxId: string); } declare class GroupNotFoundError extends Error { constructor(groupId: string); } declare class StreamNotFoundError extends Error { constructor(streamId: string); } declare class StreamFailedError extends Error { constructor(retryAttempts: number); } declare class StreamInvalidRetryAttemptsError extends Error { constructor(); } declare class OpfsNotInitializedError extends Error { constructor(); } declare class OpfsInitializationError extends Error { constructor(); } declare const isReaction: (m: DecodedMessage) => m is DecodedMessage; declare const isReply: (m: DecodedMessage) => m is DecodedMessage; declare const isTextReply: (m: DecodedMessage) => m is DecodedMessage>; declare const isText: (m: DecodedMessage) => m is DecodedMessage; declare const isRemoteAttachment: (m: DecodedMessage) => m is DecodedMessage; declare const isAttachment: (m: DecodedMessage) => m is DecodedMessage; declare const isMultiRemoteAttachment: (m: DecodedMessage) => m is DecodedMessage; declare const isTransactionReference: (m: DecodedMessage) => m is DecodedMessage; declare const isGroupUpdated: (m: DecodedMessage) => m is DecodedMessage; declare const isReadReceipt: (m: DecodedMessage) => m is DecodedMessage; declare const isLeaveRequest: (m: DecodedMessage) => m is DecodedMessage; declare const isWalletSendCalls: (m: DecodedMessage) => m is DecodedMessage; declare const isIntent: (m: DecodedMessage) => m is DecodedMessage; declare const isActions: (m: DecodedMessage) => m is DecodedMessage; declare const isMarkdown: (m: DecodedMessage) => m is DecodedMessage; export { AccountAlreadyAssociatedError, ApiUrls, Client, ClientNotInitializedError, Conversation, Conversations, DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_DELAY, DecodedMessage, Dm, Group, GroupNotFoundError, HistorySyncUrls, InboxReassignError, Opfs, OpfsInitializationError, OpfsNotInitializedError, SignerUnavailableError, StreamFailedError, StreamInvalidRetryAttemptsError, StreamNotFoundError, contentTypeActions, contentTypeAttachment, contentTypeGroupUpdated, contentTypeIntent, contentTypeLeaveRequest, contentTypeMarkdown, contentTypeMultiRemoteAttachment, contentTypeReaction, contentTypeReadReceipt, contentTypeRemoteAttachment, contentTypeReply, contentTypeText, contentTypeTransactionReference, contentTypeWalletSendCalls, createBackend, createEOASigner, createSCWSigner, createStream, decryptAttachment, encodeActions, encodeAttachment, encodeIntent, encodeMarkdown, encodeMultiRemoteAttachment, encodeReaction, encodeReadReceipt, encodeRemoteAttachment, encodeText, encodeTransactionReference, encodeWalletSendCalls, encryptAttachment, generateInboxId, getInboxIdForIdentifier, isActions, isAttachment, isGroupUpdated, isIntent, isLeaveRequest, isMarkdown, isMultiRemoteAttachment, isReaction, isReadReceipt, isRemoteAttachment, isReply, isText, isTextReply, isTransactionReference, isWalletSendCalls, metadataFieldName, toSafeConversation, toSafeSigner }; export type { AsyncStreamProxy, BuiltInContentTypes, ClientOptions, ContentOptions, DeviceSyncOptions, EOASigner, EnrichedReply, ExtractCodecContentTypes, HmacKeys, LastReadTimes, NetworkOptions, OtherOptions, SCWSigner, SafeConversation, SafeSigner, Signer, StorageOptions, StreamCallback, StreamFunction, StreamOptions, StreamValueMutator, XmtpEnv };