@xmtp/wasm-bindings 1.7.0-rc2 → 1.8.0-dev.8ab4077

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,62 +3,239 @@
3
3
  export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
4
4
  export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
5
5
  export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
6
+ export function metadataFieldName(field: MetadataField): string;
7
+ export function contentTypeAttachment(): ContentTypeId;
6
8
  export function encodeAttachment(attachment: Attachment): EncodedContent;
7
- export function attachmentContentType(): ContentTypeId;
8
- export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
9
- export function readReceiptContentType(): ContentTypeId;
10
- export function groupUpdatedContentType(): ContentTypeId;
11
- export function leaveRequestContentType(): ContentTypeId;
12
- export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
9
+ export function contentTypeGroupUpdated(): ContentTypeId;
10
+ export function contentTypeLeaveRequest(): ContentTypeId;
11
+ export function contentTypeMultiRemoteAttachment(): ContentTypeId;
12
+ export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
13
+ export function contentTypeText(): ContentTypeId;
14
+ export function encodeText(text: string): EncodedContent;
15
+ export function encodeIntent(intent: Intent): EncodedContent;
16
+ export function contentTypeIntent(): ContentTypeId;
17
+ export function encodeMarkdown(text: string): EncodedContent;
18
+ export function contentTypeMarkdown(): ContentTypeId;
19
+ export function encodeReaction(reaction: Reaction): EncodedContent;
20
+ export function contentTypeReaction(): ContentTypeId;
13
21
  /**
14
- * Encrypts an attachment for storage as a remote attachment.
22
+ * Import a database from a byte array into OPFS.
23
+ * This will overwrite any existing database with the same name.
24
+ * The byte array must contain a valid SQLite database.
25
+ * Note: Any existing database with the same name must be closed before importing.
15
26
  */
16
- export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
27
+ export function opfsImportDb(filename: string, data: Uint8Array): Promise<void>;
28
+ /**
29
+ * List all database files stored in OPFS.
30
+ * Returns an array of file names.
31
+ */
32
+ export function opfsListFiles(): Promise<string[]>;
33
+ /**
34
+ * Check if a database file exists in OPFS.
35
+ */
36
+ export function opfsFileExists(filename: string): Promise<boolean>;
37
+ /**
38
+ * Export a database file from OPFS as a byte array.
39
+ * This can be used to backup or transfer a database.
40
+ * Note: The database should be closed before exporting for consistency.
41
+ */
42
+ export function opfsExportDb(filename: string): Promise<Uint8Array>;
43
+ /**
44
+ * Delete all database files from OPFS.
45
+ * Note: All databases must be closed before calling this function.
46
+ */
47
+ export function opfsClearAll(): Promise<void>;
48
+ /**
49
+ * Delete a specific database file from OPFS.
50
+ * Returns true if the file was deleted, false if it didn't exist.
51
+ * Note: The database must be closed before calling this function.
52
+ */
53
+ export function opfsDeleteFile(filename: string): Promise<boolean>;
54
+ /**
55
+ * Get the current capacity of the OPFS file pool.
56
+ */
57
+ export function opfsPoolCapacity(): Promise<number>;
58
+ /**
59
+ * Initialize the OPFS SQLite VFS if not already initialized.
60
+ * This must be called before using other OPFS functions.
61
+ */
62
+ export function opfsInit(): Promise<void>;
63
+ /**
64
+ * Get the number of database files stored in OPFS.
65
+ */
66
+ export function opfsFileCount(): Promise<number>;
67
+ export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
68
+ export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, isSecure: boolean, accountIdentifier: Identifier): Promise<string | undefined>;
69
+ export function createClient(host: string, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncServerUrl?: string | null, deviceSyncWorkerMode?: DeviceSyncWorkerMode | null, logOptions?: LogOptions | null, allowOffline?: boolean | null, appVersion?: string | null, gatewayHost?: string | null, nonce?: bigint | null, authCallback?: any | null, authHandle?: AuthHandle | null, clientMode?: ClientMode | null): Promise<Client>;
70
+ export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
71
+ export function contentTypeReadReceipt(): ContentTypeId;
72
+ export function contentTypeRemoteAttachment(): ContentTypeId;
17
73
  /**
18
74
  * Decrypts an encrypted payload from a remote attachment.
19
75
  */
20
76
  export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
21
- export function remoteAttachmentContentType(): ContentTypeId;
77
+ export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
78
+ /**
79
+ * Encrypts an attachment for storage as a remote attachment.
80
+ */
81
+ export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
22
82
  export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
23
- export function walletSendCallsContentType(): ContentTypeId;
24
- export function transactionReferenceContentType(): ContentTypeId;
83
+ export function contentTypeWalletSendCalls(): ContentTypeId;
25
84
  export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
26
- export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
27
- export function multiRemoteAttachmentContentType(): ContentTypeId;
28
- export function encodeText(text: string): EncodedContent;
29
- export function textContentType(): ContentTypeId;
30
- export function replyContentType(): ContentTypeId;
31
- export function encodeIntent(intent: Intent): EncodedContent;
32
- export function intentContentType(): ContentTypeId;
85
+ export function contentTypeTransactionReference(): ContentTypeId;
86
+ export function contentTypeReply(): ContentTypeId;
33
87
  export function encodeActions(actions: Actions): EncodedContent;
34
- export function actionsContentType(): ContentTypeId;
35
- export function markdownContentType(): ContentTypeId;
36
- export function encodeMarkdown(text: string): EncodedContent;
37
- export function encodeReaction(reaction: Reaction): EncodedContent;
38
- export function reactionContentType(): ContentTypeId;
39
- export function createClient(host: string, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncServerUrl?: string | null, deviceSyncWorkerMode?: DeviceSyncWorkerMode | null, logOptions?: LogOptions | null, allowOffline?: boolean | null, appVersion?: string | null, gatewayHost?: string | null, nonce?: bigint | null, authCallback?: any | null, authHandle?: AuthHandle | null, clientMode?: ClientMode | null): Promise<Client>;
40
- export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, accountIdentifier: Identifier): Promise<string | undefined>;
41
- export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
88
+ export function contentTypeActions(): ContentTypeId;
42
89
  export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
43
90
  /**
44
91
  * Entry point invoked by JavaScript in a worker.
45
92
  */
46
93
  export function task_worker_entry_point(ptr: number): void;
94
+ export enum ActionStyle {
95
+ Primary = 0,
96
+ Secondary = 1,
97
+ Danger = 2,
98
+ }
99
+ export enum ClientMode {
100
+ Default = 0,
101
+ Notification = 1,
102
+ }
103
+ export enum ConsentEntityType {
104
+ GroupId = 0,
105
+ InboxId = 1,
106
+ }
107
+ export enum ConsentState {
108
+ Unknown = 0,
109
+ Allowed = 1,
110
+ Denied = 2,
111
+ }
112
+ export enum ContentType {
113
+ Actions = 0,
114
+ Attachment = 1,
115
+ Custom = 2,
116
+ GroupMembershipChange = 3,
117
+ GroupUpdated = 4,
118
+ Intent = 5,
119
+ LeaveRequest = 6,
120
+ Markdown = 7,
121
+ MultiRemoteAttachment = 8,
122
+ Reaction = 9,
123
+ ReadReceipt = 10,
124
+ RemoteAttachment = 11,
125
+ Reply = 12,
126
+ Text = 13,
127
+ TransactionReference = 14,
128
+ WalletSendCalls = 15,
129
+ }
130
+ export enum ConversationType {
131
+ Dm = 0,
132
+ Group = 1,
133
+ Sync = 2,
134
+ Oneshot = 3,
135
+ }
136
+ export enum DeletedBy {
137
+ Sender = 0,
138
+ Admin = 1,
139
+ }
140
+ export enum DeliveryStatus {
141
+ Unpublished = 0,
142
+ Published = 1,
143
+ Failed = 2,
144
+ }
145
+ export enum DeviceSyncWorkerMode {
146
+ Enabled = 0,
147
+ Disabled = 1,
148
+ }
149
+ export enum GroupMembershipState {
150
+ Allowed = 0,
151
+ Rejected = 1,
152
+ Pending = 2,
153
+ Restored = 3,
154
+ PendingRemove = 4,
155
+ }
156
+ export enum GroupMessageKind {
157
+ Application = 0,
158
+ MembershipChange = 1,
159
+ }
160
+ export enum GroupPermissionsOptions {
161
+ Default = 0,
162
+ AdminOnly = 1,
163
+ CustomPolicy = 2,
164
+ }
165
+ export enum IdentifierKind {
166
+ Ethereum = 0,
167
+ Passkey = 1,
168
+ }
169
+ export enum ListConversationsOrderBy {
170
+ CreatedAt = 0,
171
+ LastActivity = 1,
172
+ }
173
+ export enum LogLevel {
174
+ Off = 0,
175
+ Error = 1,
176
+ Warn = 2,
177
+ Info = 3,
178
+ Debug = 4,
179
+ Trace = 5,
180
+ }
181
+ export enum MessageSortBy {
182
+ SentAt = 0,
183
+ InsertedAt = 1,
184
+ }
185
+ export enum MetadataField {
186
+ AppData = 0,
187
+ Description = 1,
188
+ GroupName = 2,
189
+ GroupImageUrlSquare = 3,
190
+ MessageExpirationFromNs = 4,
191
+ MessageExpirationInNs = 5,
192
+ }
193
+ export enum PermissionLevel {
194
+ Member = 0,
195
+ Admin = 1,
196
+ SuperAdmin = 2,
197
+ }
198
+ export enum PermissionPolicy {
199
+ Allow = 0,
200
+ Deny = 1,
201
+ Admin = 2,
202
+ SuperAdmin = 3,
203
+ DoesNotExist = 4,
204
+ Other = 5,
205
+ }
206
+ export enum PermissionUpdateType {
207
+ AddMember = 0,
208
+ RemoveMember = 1,
209
+ AddAdmin = 2,
210
+ RemoveAdmin = 3,
211
+ UpdateMetadata = 4,
212
+ }
213
+ export enum ReactionAction {
214
+ Unknown = 0,
215
+ Added = 1,
216
+ Removed = 2,
217
+ }
218
+ export enum ReactionSchema {
219
+ Unknown = 0,
220
+ Unicode = 1,
221
+ Shortcode = 2,
222
+ Custom = 3,
223
+ }
224
+ export enum SortDirection {
225
+ Ascending = 0,
226
+ Descending = 1,
227
+ }
47
228
  /**
48
229
  * The `ReadableStreamType` enum.
49
230
  *
50
231
  * *This API requires the following crate features to be activated: `ReadableStreamType`*
51
232
  */
52
233
  type ReadableStreamType = "bytes";
53
- export type MetadataField = "groupName" | "description" | "imageUrlSquare" | "messageExpirationFromMS" | "messageExpirationMS";
54
-
55
- export type GroupPermissionsOptions = "default" | "adminOnly" | "customPolicy";
56
-
57
- export type PermissionUpdateType = "addMember" | "removeMember" | "addAdmin" | "removeAdmin" | "updateMetadata";
58
-
59
- export interface GroupPermissions {
60
- policyType: GroupPermissionsOptions;
61
- policySet: PermissionPolicySet;
234
+ export interface PasskeySignature {
235
+ publicKey: Uint8Array;
236
+ signature: Uint8Array;
237
+ authenticatorData: Uint8Array;
238
+ clientDataJson: Uint8Array;
62
239
  }
63
240
 
64
241
  export interface PermissionPolicySet {
@@ -70,42 +247,36 @@ export interface PermissionPolicySet {
70
247
  updateGroupDescriptionPolicy: PermissionPolicy;
71
248
  updateGroupImageUrlSquarePolicy: PermissionPolicy;
72
249
  updateMessageDisappearingPolicy: PermissionPolicy;
250
+ updateAppDataPolicy: PermissionPolicy;
73
251
  }
74
252
 
75
- export type PermissionPolicy = "allow" | "deny" | "admin" | "superAdmin" | "doesNotExist" | "other";
76
-
77
- export type ContentType = "unknown" | "text" | "markdown" | "leaveRequest" | "groupMembershipChange" | "groupUpdated" | "reaction" | "readReceipt" | "reply" | "attachment" | "remoteAttachment" | "transactionReference";
78
-
79
- export interface IdentityStats {
80
- publishIdentityUpdate: bigint;
81
- getIdentityUpdatesV2: bigint;
82
- getInboxIds: bigint;
83
- verifySmartContractWalletSignature: bigint;
253
+ export interface GroupPermissions {
254
+ policyType: GroupPermissionsOptions;
255
+ policySet: PermissionPolicySet;
84
256
  }
85
257
 
86
- export interface Identifier {
87
- identifier: string;
88
- identifierKind: IdentifierKind;
258
+ export interface SendMessageOpts {
259
+ shouldPush: boolean;
260
+ optimistic?: boolean;
89
261
  }
90
262
 
91
- export type IdentifierKind = "Ethereum" | "Passkey";
263
+ export interface GroupMetadata {
264
+ creatorInboxId: string;
265
+ conversationType: ConversationType;
266
+ }
92
267
 
93
- export interface ApiStats {
94
- uploadKeyPackage: bigint;
95
- fetchKeyPackage: bigint;
96
- sendGroupMessages: bigint;
97
- sendWelcomeMessages: bigint;
98
- queryGroupMessages: bigint;
99
- queryWelcomeMessages: bigint;
100
- subscribeMessages: bigint;
101
- subscribeWelcomes: bigint;
268
+ export interface GroupMember {
269
+ inboxId: string;
270
+ accountIdentifiers: Identifier[];
271
+ installationIds: string[];
272
+ permissionLevel: PermissionLevel;
273
+ consentState: ConsentState;
102
274
  }
103
275
 
104
- export interface PasskeySignature {
105
- publicKey: Uint8Array;
106
- signature: Uint8Array;
107
- authenticatorData: Uint8Array;
108
- clientDataJson: Uint8Array;
276
+ export interface Consent {
277
+ entityType: ConsentEntityType;
278
+ state: ConsentState;
279
+ entity: string;
109
280
  }
110
281
 
111
282
  export interface Attachment {
@@ -114,14 +285,6 @@ export interface Attachment {
114
285
  content: Uint8Array;
115
286
  }
116
287
 
117
- export type ReadReceipt = Record<string, never>;
118
-
119
- export interface MetadataFieldChange {
120
- fieldName: string;
121
- oldValue?: string;
122
- newValue?: string;
123
- }
124
-
125
288
  export interface GroupUpdated {
126
289
  initiatedByInboxId: string;
127
290
  addedInboxes: Inbox[];
@@ -134,6 +297,12 @@ export interface GroupUpdated {
134
297
  removedSuperAdminInboxes: Inbox[];
135
298
  }
136
299
 
300
+ export interface MetadataFieldChange {
301
+ fieldName: string;
302
+ oldValue?: string;
303
+ newValue?: string;
304
+ }
305
+
137
306
  export interface Inbox {
138
307
  inboxId: string;
139
308
  }
@@ -142,6 +311,168 @@ export interface LeaveRequest {
142
311
  authenticatedNote?: Uint8Array;
143
312
  }
144
313
 
314
+ export interface MultiRemoteAttachment {
315
+ attachments: RemoteAttachmentInfo[];
316
+ }
317
+
318
+ export interface RemoteAttachmentInfo {
319
+ secret: Uint8Array;
320
+ contentDigest: string;
321
+ nonce: Uint8Array;
322
+ scheme: string;
323
+ url: string;
324
+ salt: Uint8Array;
325
+ contentLength?: number;
326
+ filename?: string;
327
+ }
328
+
329
+ export interface Intent {
330
+ id: string;
331
+ actionId: string;
332
+ metadata?: Record<string, string | number | boolean | null>;
333
+ }
334
+
335
+ export interface Reaction {
336
+ reference: string;
337
+ referenceInboxId: string;
338
+ action: ReactionAction;
339
+ content: string;
340
+ schema: ReactionSchema;
341
+ }
342
+
343
+ export interface Cursor {
344
+ originatorId: number;
345
+ sequenceId: bigint;
346
+ }
347
+
348
+ export interface HmacKey {
349
+ key: Uint8Array;
350
+ epoch: bigint;
351
+ }
352
+
353
+ export interface ListConversationsOptions {
354
+ consentStates?: ConsentState[];
355
+ conversationType?: ConversationType;
356
+ createdAfterNs?: bigint;
357
+ createdBeforeNs?: bigint;
358
+ includeDuplicateDms?: boolean;
359
+ orderBy?: ListConversationsOrderBy;
360
+ limit?: bigint;
361
+ }
362
+
363
+ export interface CreateGroupOptions {
364
+ permissions?: GroupPermissionsOptions;
365
+ groupName?: string;
366
+ groupImageUrlSquare?: string;
367
+ groupDescription?: string;
368
+ customPermissionPolicySet?: PermissionPolicySet;
369
+ messageDisappearingSettings?: MessageDisappearingSettings;
370
+ appData?: string;
371
+ }
372
+
373
+ export interface MessageDisappearingSettings {
374
+ fromNs: bigint;
375
+ inNs: bigint;
376
+ }
377
+
378
+ export interface CreateDmOptions {
379
+ messageDisappearingSettings?: MessageDisappearingSettings;
380
+ }
381
+
382
+ export interface ConversationDebugInfo {
383
+ epoch: bigint;
384
+ maybeForked: boolean;
385
+ forkDetails: string;
386
+ isCommitLogForked?: boolean;
387
+ localCommitLog: string;
388
+ remoteCommitLog: string;
389
+ cursor: Cursor[];
390
+ }
391
+
392
+ export interface IdentityStats {
393
+ publishIdentityUpdate: bigint;
394
+ getIdentityUpdatesV2: bigint;
395
+ getInboxIds: bigint;
396
+ verifySmartContractWalletSignature: bigint;
397
+ }
398
+
399
+ export interface ApiStats {
400
+ uploadKeyPackage: bigint;
401
+ fetchKeyPackage: bigint;
402
+ sendGroupMessages: bigint;
403
+ sendWelcomeMessages: bigint;
404
+ queryGroupMessages: bigint;
405
+ queryWelcomeMessages: bigint;
406
+ subscribeMessages: bigint;
407
+ subscribeWelcomes: bigint;
408
+ }
409
+
410
+ export interface Identifier {
411
+ identifier: string;
412
+ identifierKind: IdentifierKind;
413
+ }
414
+
415
+ export interface Message {
416
+ id: string;
417
+ sentAtNs: bigint;
418
+ convoId: string;
419
+ senderInboxId: string;
420
+ content: EncodedContent;
421
+ kind: GroupMessageKind;
422
+ deliveryStatus: DeliveryStatus;
423
+ }
424
+
425
+ export interface ListMessagesOptions {
426
+ contentTypes?: ContentType[];
427
+ excludeContentTypes?: ContentType[];
428
+ sentBeforeNs?: bigint;
429
+ sentAfterNs?: bigint;
430
+ limit?: bigint;
431
+ deliveryStatus?: DeliveryStatus;
432
+ direction?: SortDirection;
433
+ kind?: GroupMessageKind;
434
+ excludeSenderInboxIds?: string[];
435
+ sortBy?: MessageSortBy;
436
+ insertedAfterNs?: bigint;
437
+ insertedBeforeNs?: bigint;
438
+ }
439
+
440
+ /**
441
+ * Specify options for the logger
442
+ */
443
+ export interface LogOptions {
444
+ /**
445
+ * enable structured JSON logging to stdout. Useful for third-party log viewers
446
+ */
447
+ structured?: boolean;
448
+ /**
449
+ * enable performance metrics for libxmtp in the `performance` tab
450
+ */
451
+ performance?: boolean;
452
+ /**
453
+ * filter for logs
454
+ */
455
+ level?: LogLevel;
456
+ }
457
+
458
+ export interface GroupSyncSummary {
459
+ numEligible: number;
460
+ numSynced: number;
461
+ }
462
+
463
+ export type ReadReceipt = Record<string, never>;
464
+
465
+ export interface RemoteAttachment {
466
+ url: string;
467
+ contentDigest: string;
468
+ secret: Uint8Array;
469
+ salt: Uint8Array;
470
+ nonce: Uint8Array;
471
+ scheme: string;
472
+ contentLength: number;
473
+ filename?: string;
474
+ }
475
+
145
476
  /**
146
477
  * Result of encrypting an attachment for remote storage.
147
478
  */
@@ -176,17 +507,6 @@ export interface EncryptedAttachment {
176
507
  filename?: string;
177
508
  }
178
509
 
179
- export interface RemoteAttachment {
180
- url: string;
181
- contentDigest: string;
182
- secret: Uint8Array;
183
- salt: Uint8Array;
184
- nonce: Uint8Array;
185
- scheme: string;
186
- contentLength: number;
187
- filename?: string;
188
- }
189
-
190
510
  export interface WalletSendCalls {
191
511
  version: string;
192
512
  chainId: string;
@@ -219,26 +539,7 @@ export interface TransactionMetadata {
219
539
  toAddress: string;
220
540
  }
221
541
 
222
- export type DecodedMessageContent = { type: "text"; content: string } | { type: "markdown"; content: MarkdownContent } | { type: "reply"; content: EnrichedReply } | { type: "reaction"; content: Reaction } | { type: "attachment"; content: Attachment } | { type: "remoteAttachment"; content: RemoteAttachment } | { type: "multiRemoteAttachment"; content: MultiRemoteAttachment } | { type: "transactionReference"; content: TransactionReference } | { type: "groupUpdated"; content: GroupUpdated } | { type: "readReceipt"; content: ReadReceipt } | { type: "leaveRequest"; content: LeaveRequest } | { type: "walletSendCalls"; content: WalletSendCalls } | { type: "intent"; content: Intent | undefined } | { type: "actions"; content: Actions | undefined } | { type: "custom"; content: EncodedContent };
223
-
224
- export interface RemoteAttachmentInfo {
225
- secret: Uint8Array;
226
- contentDigest: string;
227
- nonce: Uint8Array;
228
- scheme: string;
229
- url: string;
230
- salt: Uint8Array;
231
- contentLength?: number;
232
- filename?: string;
233
- }
234
-
235
- export interface MultiRemoteAttachment {
236
- attachments: RemoteAttachmentInfo[];
237
- }
238
-
239
- export interface TextContent {
240
- content: string;
241
- }
542
+ export type DecodedMessageContent = { type: "actions"; content: Actions | undefined } | { type: "attachment"; content: Attachment } | { type: "custom"; content: EncodedContent } | { type: "groupUpdated"; content: GroupUpdated } | { type: "intent"; content: Intent | undefined } | { type: "leaveRequest"; content: LeaveRequest } | { type: "markdown"; content: string } | { type: "multiRemoteAttachment"; content: MultiRemoteAttachment } | { type: "reaction"; content: Reaction } | { type: "readReceipt"; content: ReadReceipt } | { type: "remoteAttachment"; content: RemoteAttachment } | { type: "reply"; content: EnrichedReply } | { type: "text"; content: string } | { type: "transactionReference"; content: TransactionReference } | { type: "walletSendCalls"; content: WalletSendCalls } | { type: "deletedMessage"; content: DeletedMessage };
242
543
 
243
544
  export interface EnrichedReply {
244
545
  referenceId: string;
@@ -252,21 +553,6 @@ export interface Reply {
252
553
  referenceInboxId?: string;
253
554
  }
254
555
 
255
- export interface Intent {
256
- id: string;
257
- actionId: string;
258
- metadata?: Record<string, string | number | boolean | null>;
259
- }
260
-
261
- export interface Actions {
262
- id: string;
263
- description: string;
264
- actions: Action[];
265
- expiresAtNs?: bigint;
266
- }
267
-
268
- export type ActionStyle = "primary" | "secondary" | "danger";
269
-
270
556
  export interface Action {
271
557
  id: string;
272
558
  label: string;
@@ -275,28 +561,11 @@ export interface Action {
275
561
  expiresAtNs?: bigint;
276
562
  }
277
563
 
278
- export interface MarkdownContent {
279
- content: string;
280
- }
281
-
282
- export type ReactionSchema = "unknown" | "unicode" | "shortcode" | "custom";
283
-
284
- export interface Reaction {
285
- reference: string;
286
- referenceInboxId: string;
287
- action: ReactionAction;
288
- content: string;
289
- schema: ReactionSchema;
290
- }
291
-
292
- export type ReactionAction = "unknown" | "added" | "removed";
293
-
294
- export interface EncodedContent {
295
- type?: ContentTypeId;
296
- parameters?: Record<string, string>;
297
- fallback?: string;
298
- compression?: number;
299
- content: Uint8Array;
564
+ export interface Actions {
565
+ id: string;
566
+ description: string;
567
+ actions: Action[];
568
+ expiresAtNs?: bigint;
300
569
  }
301
570
 
302
571
  export interface ContentTypeId {
@@ -306,106 +575,37 @@ export interface ContentTypeId {
306
575
  versionMinor: number;
307
576
  }
308
577
 
309
- export interface DecodedMessage {
310
- id: string;
311
- sentAtNs: bigint;
312
- kind: GroupMessageKind;
313
- senderInstallationId: string;
314
- senderInboxId: string;
315
- contentType: ContentTypeId;
316
- conversationId: string;
317
- content: DecodedMessageContent;
318
- fallback?: string;
319
- reactions: DecodedMessage[];
320
- deliveryStatus: DeliveryStatus;
321
- numReplies: bigint;
322
- expiresAtNs: bigint | undefined;
323
- }
324
-
325
- export interface Credential {
326
- name?: string;
327
- value: string;
328
- expiresAtSeconds: bigint;
329
- }
330
-
331
- export type DeviceSyncWorkerMode = "enabled" | "disabled";
332
-
333
- export interface GroupSyncSummary {
334
- numEligible: number;
335
- numSynced: number;
336
- }
337
-
338
- export type ClientMode = "default" | "notification";
339
-
340
- export type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace";
341
-
342
- /**
343
- * Specify options for the logger
344
- */
345
- export interface LogOptions {
346
- /**
347
- * enable structured JSON logging to stdout. Useful for third-party log viewers
348
- */
349
- structured?: boolean;
350
- /**
351
- * enable performance metrics for libxmtp in the `performance` tab
352
- */
353
- performance?: boolean;
354
- /**
355
- * filter for logs
356
- */
357
- level?: LogLevel;
358
- }
359
-
360
- export type MessageSortBy = "sentAt" | "insertedAt";
361
-
362
- export type DeliveryStatus = "unpublished" | "published" | "failed";
363
-
364
- export type GroupMessageKind = "application" | "membershipchange";
365
-
366
- export type SortDirection = "ascending" | "descending";
578
+ export interface EncodedContent {
579
+ type?: ContentTypeId;
580
+ parameters: Record<string, string>;
581
+ fallback?: string;
582
+ compression?: number;
583
+ content: Uint8Array;
584
+ }
367
585
 
368
- export interface Message {
586
+ export interface DecodedMessage {
369
587
  id: string;
370
588
  sentAtNs: bigint;
371
- convoId: string;
372
- senderInboxId: string;
373
- content: EncodedContent;
374
589
  kind: GroupMessageKind;
590
+ senderInstallationId: string;
591
+ senderInboxId: string;
592
+ contentType: ContentTypeId;
593
+ conversationId: string;
594
+ content: DecodedMessageContent;
595
+ fallback?: string;
596
+ reactions: DecodedMessage[];
375
597
  deliveryStatus: DeliveryStatus;
598
+ numReplies: bigint;
599
+ expiresAtNs: bigint | undefined;
376
600
  }
377
601
 
378
- export interface MessageWithReactions {
379
- message: Message;
380
- reactions: Message[];
381
- }
382
-
383
- export interface ListMessagesOptions {
384
- contentTypes?: ContentType[];
385
- excludeContentTypes?: ContentType[];
386
- sentBeforeNs?: bigint;
387
- sentAfterNs?: bigint;
388
- limit?: bigint;
389
- deliveryStatus?: DeliveryStatus;
390
- direction?: SortDirection;
391
- kind?: GroupMessageKind;
392
- excludeSenderInboxIds?: string[];
393
- sortBy?: MessageSortBy;
394
- insertedAfterNs?: bigint;
395
- insertedBeforeNs?: bigint;
396
- }
602
+ export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
397
603
 
398
604
  export interface Lifetime {
399
605
  notBefore: bigint;
400
606
  notAfter: bigint;
401
607
  }
402
608
 
403
- export interface Installation {
404
- bytes: Uint8Array;
405
- id: string;
406
- clientTimestampNs?: bigint;
407
- }
408
-
409
609
  export interface InboxState {
410
610
  inboxId: string;
411
611
  recoveryIdentifier: Identifier;
@@ -418,91 +618,16 @@ export interface KeyPackageStatus {
418
618
  validationError?: string;
419
619
  }
420
620
 
421
- export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
422
-
423
- export interface GroupMember {
424
- inboxId: string;
425
- accountIdentifiers: Identifier[];
426
- installationIds: string[];
427
- permissionLevel: PermissionLevel;
428
- consentState: ConsentState;
429
- }
430
-
431
- export interface GroupMetadata {
432
- creatorInboxId: string;
433
- conversationType: string;
434
- }
435
-
436
- export type PermissionLevel = "member" | "admin" | "superAdmin";
437
-
438
- export interface SendMessageOpts {
439
- shouldPush: boolean;
440
- optimistic?: boolean;
441
- }
442
-
443
- export type ConsentState = "unknown" | "allowed" | "denied";
444
-
445
- export interface Consent {
446
- entityType: ConsentEntityType;
447
- state: ConsentState;
448
- entity: string;
449
- }
450
-
451
- export type ConsentEntityType = "groupId" | "inboxId";
452
-
453
- export interface CreateDMOptions {
454
- messageDisappearingSettings?: MessageDisappearingSettings;
455
- }
456
-
457
- export type ListConversationsOrderBy = "createdAt" | "lastActivity";
458
-
459
- export interface ListConversationsOptions {
460
- consentStates?: ConsentState[];
461
- conversationType?: ConversationType;
462
- createdAfterNs?: bigint;
463
- createdBeforeNs?: bigint;
464
- includeDuplicateDms?: boolean;
465
- orderBy?: ListConversationsOrderBy;
466
- limit?: bigint;
467
- }
468
-
469
- export interface HmacKey {
470
- key: Uint8Array;
471
- epoch: bigint;
472
- }
473
-
474
- export interface CreateGroupOptions {
475
- permissions?: GroupPermissionsOptions;
476
- groupName?: string;
477
- groupImageUrlSquare?: string;
478
- groupDescription?: string;
479
- customPermissionPolicySet?: PermissionPolicySet;
480
- messageDisappearingSettings?: MessageDisappearingSettings;
481
- appData?: string;
482
- }
483
-
484
- export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
485
-
486
- export type ConversationType = "dm" | "group" | "sync" | "oneshot";
487
-
488
- export interface ConversationDebugInfo {
489
- epoch: bigint;
490
- maybeForked: boolean;
491
- forkDetails: string;
492
- isCommitLogForked?: boolean;
493
- localCommitLog: string;
494
- remoteCommitLog: string;
495
- cursor: Cursor[];
496
- }
497
-
498
- export interface Cursor {
499
- originatorId: number;
500
- sequenceId: bigint;
621
+ export interface Installation {
622
+ bytes: Uint8Array;
623
+ id: string;
624
+ clientTimestampNs?: bigint;
501
625
  }
502
626
 
503
- export interface MessageDisappearingSettings {
504
- fromNs: bigint;
505
- inNs: bigint;
627
+ export interface Credential {
628
+ name?: string;
629
+ value: string;
630
+ expiresAtSeconds: bigint;
506
631
  }
507
632
 
508
633
  export class AuthHandle {
@@ -526,6 +651,8 @@ export class Client {
526
651
  revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
527
652
  changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
528
653
  revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
654
+ getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
655
+ setConsentStates(records: Consent[]): Promise<void>;
529
656
  /**
530
657
  * Output booleans should be zipped with the index of input identifiers
531
658
  */
@@ -557,8 +684,6 @@ export class Client {
557
684
  *
558
685
  */
559
686
  getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
560
- getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
561
- setConsentStates(records: Consent[]): Promise<void>;
562
687
  readonly appVersion: string;
563
688
  readonly isRegistered: boolean;
564
689
  readonly installationId: string;
@@ -591,11 +716,12 @@ export class Conversation {
591
716
  isSuperAdmin(inboxId: string): boolean;
592
717
  removeMembers(accountIdentifiers: Identifier[]): Promise<void>;
593
718
  addSuperAdmin(inboxId: string): Promise<void>;
594
- sendAttachment(attachment: Attachment, optimistic?: boolean | null): Promise<string>;
595
719
  /**
596
- * send a message without immediately publishing to the delivery service.
720
+ * Prepare a message for later publishing.
721
+ * Stores the message locally without publishing. Returns the message ID.
597
722
  */
598
- sendOptimistic(encodedContent: EncodedContent, opts: SendMessageOpts): string;
723
+ prepareMessage(encodedContent: EncodedContent, shouldPush: boolean): string;
724
+ sendAttachment(attachment: Attachment, optimistic?: boolean | null): Promise<string>;
599
725
  updateAppData(appData: string): Promise<void>;
600
726
  dmPeerInboxId(): string;
601
727
  membershipState(): GroupMembershipState;
@@ -615,6 +741,10 @@ export class Conversation {
615
741
  getLastReadTimes(): Promise<any>;
616
742
  findEnrichedMessages(opts?: ListMessagesOptions | null): Promise<DecodedMessage[]>;
617
743
  groupImageUrlSquare(): string;
744
+ /**
745
+ * Publish a previously prepared message by ID.
746
+ */
747
+ publishStoredMessage(messageId: string): Promise<void>;
618
748
  sendRemoteAttachment(remoteAttachment: RemoteAttachment, optimistic?: boolean | null): Promise<string>;
619
749
  sendWalletSendCalls(walletSendCalls: WalletSendCalls, optimistic?: boolean | null): Promise<string>;
620
750
  addMembersByInboxId(inboxIds: string[]): Promise<void>;
@@ -622,7 +752,6 @@ export class Conversation {
622
752
  updatePermissionPolicy(permissionUpdateType: PermissionUpdateType, permissionPolicyOption: PermissionPolicy, metadataField?: MetadataField | null): Promise<void>;
623
753
  removeMembersByInboxId(inboxIds: string[]): Promise<void>;
624
754
  sendTransactionReference(transactionReference: TransactionReference, optimistic?: boolean | null): Promise<string>;
625
- findMessagesWithReactions(opts?: ListMessagesOptions | null): Promise<MessageWithReactions[]>;
626
755
  sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, optimistic?: boolean | null): Promise<string>;
627
756
  messageDisappearingSettings(): MessageDisappearingSettings | undefined;
628
757
  updateGroupImageUrlSquare(groupImageUrlSquare: string): Promise<void>;
@@ -660,12 +789,12 @@ export class Conversations {
660
789
  getHmacKeys(): any;
661
790
  streamConsent(callback: any): StreamCloser;
662
791
  findGroupById(groupId: string): Conversation;
663
- createDm(accountIdentifier: Identifier, options?: CreateDMOptions | null): Promise<Conversation>;
792
+ createDm(accountIdentifier: Identifier, options?: CreateDmOptions | null): Promise<Conversation>;
664
793
  findMessageById(messageId: string): Message;
665
794
  streamPreferences(callback: any): StreamCloser;
666
- streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: ConsentState[] | null): StreamCloser;
795
+ streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: any[] | null): StreamCloser;
667
796
  deleteMessageById(messageId: string): number;
668
- syncAllConversations(consentStates?: ConsentState[] | null): Promise<GroupSyncSummary>;
797
+ syncAllConversations(consentStates?: any[] | null): Promise<GroupSyncSummary>;
669
798
  createGroupOptimistic(options?: CreateGroupOptions | null): Conversation;
670
799
  streamMessageDeletions(callback: any): StreamCloser;
671
800
  createGroupByInboxIds(inboxIds: string[], options?: CreateGroupOptions | null): Promise<Conversation>;
@@ -675,11 +804,19 @@ export class Conversations {
675
804
  */
676
805
  streamLocal(conversationType?: ConversationType | null): Promise<ReadableStream>;
677
806
  findEnrichedMessageById(messageId: string): Promise<DecodedMessage>;
678
- createDmByInboxId(inboxId: string, options?: CreateDMOptions | null): Promise<Conversation>;
807
+ createDmByInboxId(inboxId: string, options?: CreateDmOptions | null): Promise<Conversation>;
679
808
  list(opts?: ListConversationsOptions | null): Array<any>;
680
809
  sync(): Promise<void>;
681
810
  stream(callback: any, conversationType?: ConversationType | null): StreamCloser;
682
811
  }
812
+ export class DeletedMessage {
813
+ private constructor();
814
+ free(): void;
815
+ [Symbol.dispose](): void;
816
+ deletedBy: DeletedBy;
817
+ get adminInboxId(): string | undefined;
818
+ set adminInboxId(value: string | null | undefined);
819
+ }
683
820
  export class IntoUnderlyingByteSource {
684
821
  private constructor();
685
822
  free(): void;
@@ -740,92 +877,43 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
740
877
 
741
878
  export interface InitOutput {
742
879
  readonly memory: WebAssembly.Memory;
743
- readonly __wbg_authhandle_free: (a: number, b: number) => void;
744
- readonly __wbg_client_free: (a: number, b: number) => void;
880
+ readonly __wbg_conversation_free: (a: number, b: number) => void;
881
+ readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
882
+ readonly __wbg_conversations_free: (a: number, b: number) => void;
883
+ readonly __wbg_deletedmessage_free: (a: number, b: number) => void;
884
+ readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
885
+ readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
886
+ readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
887
+ readonly __wbg_get_deletedmessage_adminInboxId: (a: number) => [number, number];
888
+ readonly __wbg_get_deletedmessage_deletedBy: (a: number) => number;
889
+ readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
890
+ readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
891
+ readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
892
+ readonly __wbg_set_deletedmessage_adminInboxId: (a: number, b: number, c: number) => void;
893
+ readonly __wbg_set_deletedmessage_deletedBy: (a: number, b: number) => void;
745
894
  readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
746
- readonly actionsContentType: () => any;
895
+ readonly __wbg_streamcloser_free: (a: number, b: number) => void;
747
896
  readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
748
- readonly attachmentContentType: () => any;
749
- readonly authhandle_id: (a: number) => number;
750
- readonly authhandle_new: () => number;
751
- readonly authhandle_set: (a: number, b: any) => any;
752
- readonly client_accountIdentifier: (a: number) => any;
753
897
  readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
754
- readonly client_apiAggregateStatistics: (a: number) => [number, number];
755
- readonly client_apiIdentityStatistics: (a: number) => any;
756
- readonly client_apiStatistics: (a: number) => any;
757
- readonly client_appVersion: (a: number) => [number, number];
758
898
  readonly client_applySignatureRequest: (a: number, b: number) => any;
759
- readonly client_canMessage: (a: number, b: number, c: number) => any;
760
899
  readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
761
- readonly client_clearAllStatistics: (a: number) => void;
762
- readonly client_conversations: (a: number) => number;
763
900
  readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
764
- readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
765
- readonly client_inboxId: (a: number) => [number, number];
766
- readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
767
- readonly client_installationId: (a: number) => [number, number];
768
- readonly client_installationIdBytes: (a: number) => any;
769
- readonly client_isRegistered: (a: number) => number;
770
- readonly client_libxmtpVersion: (a: number) => [number, number];
901
+ readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
771
902
  readonly client_registerIdentity: (a: number, b: number) => any;
772
903
  readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
773
904
  readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
774
905
  readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
775
- readonly client_sendSyncRequest: (a: number) => any;
906
+ readonly client_setConsentStates: (a: number, b: number, c: number) => any;
776
907
  readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
777
- readonly client_syncPreferences: (a: number) => any;
778
908
  readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
779
- readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: bigint, t: number, u: number, v: number) => any;
780
- readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
781
- readonly encodeActions: (a: any) => [number, number, number];
782
- readonly encodeAttachment: (a: any) => [number, number, number];
783
- readonly encodeIntent: (a: any) => [number, number, number];
784
- readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
785
- readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
786
- readonly encodeReaction: (a: any) => [number, number, number];
787
- readonly encodeReadReceipt: (a: any) => [number, number, number];
788
- readonly encodeRemoteAttachment: (a: any) => [number, number, number];
789
- readonly encodeText: (a: number, b: number) => [number, number, number];
790
- readonly encodeTransactionReference: (a: any) => [number, number, number];
791
- readonly encodeWalletSendCalls: (a: any) => [number, number, number];
792
- readonly encryptAttachment: (a: any) => [number, number, number];
793
- readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
794
- readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: any) => any;
795
- readonly groupUpdatedContentType: () => any;
796
- readonly intentContentType: () => any;
797
- readonly leaveRequestContentType: () => any;
798
- readonly markdownContentType: () => any;
799
- readonly multiRemoteAttachmentContentType: () => any;
800
- readonly reactionContentType: () => any;
801
- readonly readReceiptContentType: () => any;
802
- readonly remoteAttachmentContentType: () => any;
803
- readonly replyContentType: () => any;
804
- readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
805
- readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
806
- readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
807
- readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
808
- readonly signaturerequesthandle_signatureText: (a: number) => any;
809
- readonly textContentType: () => any;
810
- readonly transactionReferenceContentType: () => any;
811
- readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
812
- readonly walletSendCallsContentType: () => any;
813
- readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
814
- readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
815
- readonly client_inboxState: (a: number, b: number) => any;
816
- readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
817
- readonly __wbg_conversation_free: (a: number, b: number) => void;
818
- readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
819
- readonly __wbg_conversations_free: (a: number, b: number) => void;
820
- readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
821
- readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
822
- readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
823
- readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
824
- readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
825
- readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
826
- readonly __wbg_streamcloser_free: (a: number, b: number) => void;
827
- readonly client_getConsentState: (a: number, b: any, c: number, d: number) => any;
828
- readonly client_setConsentStates: (a: number, b: number, c: number) => any;
909
+ readonly contentTypeAttachment: () => any;
910
+ readonly contentTypeGroupUpdated: () => any;
911
+ readonly contentTypeIntent: () => any;
912
+ readonly contentTypeLeaveRequest: () => any;
913
+ readonly contentTypeMarkdown: () => any;
914
+ readonly contentTypeMultiRemoteAttachment: () => any;
915
+ readonly contentTypeReaction: () => any;
916
+ readonly contentTypeText: () => any;
829
917
  readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
830
918
  readonly conversation_addMembers: (a: number, b: number, c: number) => any;
831
919
  readonly conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
@@ -840,7 +928,6 @@ export interface InitOutput {
840
928
  readonly conversation_findDuplicateDms: (a: number) => any;
841
929
  readonly conversation_findEnrichedMessages: (a: number, b: number) => any;
842
930
  readonly conversation_findMessages: (a: number, b: number) => any;
843
- readonly conversation_findMessagesWithReactions: (a: number, b: number) => any;
844
931
  readonly conversation_getDebugInfo: (a: number) => any;
845
932
  readonly conversation_getHmacKeys: (a: number) => [number, number, number];
846
933
  readonly conversation_getLastReadTimes: (a: number) => any;
@@ -859,8 +946,10 @@ export interface InitOutput {
859
946
  readonly conversation_membershipState: (a: number) => [number, number, number];
860
947
  readonly conversation_messageDisappearingSettings: (a: number) => [number, number, number];
861
948
  readonly conversation_pausedForVersion: (a: number) => [number, number, number, number];
949
+ readonly conversation_prepareMessage: (a: number, b: any, c: number) => [number, number, number, number];
862
950
  readonly conversation_processStreamedGroupMessage: (a: number, b: any) => any;
863
951
  readonly conversation_publishMessages: (a: number) => any;
952
+ readonly conversation_publishStoredMessage: (a: number, b: number, c: number) => any;
864
953
  readonly conversation_removeAdmin: (a: number, b: number, c: number) => any;
865
954
  readonly conversation_removeMembers: (a: number, b: number, c: number) => any;
866
955
  readonly conversation_removeMembersByInboxId: (a: number, b: number, c: number) => any;
@@ -872,7 +961,6 @@ export interface InitOutput {
872
961
  readonly conversation_sendIntent: (a: number, b: any, c: number) => any;
873
962
  readonly conversation_sendMarkdown: (a: number, b: number, c: number, d: number) => any;
874
963
  readonly conversation_sendMultiRemoteAttachment: (a: number, b: any, c: number) => any;
875
- readonly conversation_sendOptimistic: (a: number, b: any, c: any) => [number, number, number, number];
876
964
  readonly conversation_sendReaction: (a: number, b: any, c: number) => any;
877
965
  readonly conversation_sendReadReceipt: (a: number, b: number) => any;
878
966
  readonly conversation_sendRemoteAttachment: (a: number, b: any, c: number) => any;
@@ -884,12 +972,12 @@ export interface InitOutput {
884
972
  readonly conversation_superAdminList: (a: number) => [number, number, number, number];
885
973
  readonly conversation_sync: (a: number) => any;
886
974
  readonly conversation_updateAppData: (a: number, b: number, c: number) => any;
887
- readonly conversation_updateConsentState: (a: number, b: any) => [number, number];
975
+ readonly conversation_updateConsentState: (a: number, b: number) => [number, number];
888
976
  readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
889
977
  readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
890
978
  readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
891
979
  readonly conversation_updateMessageDisappearingSettings: (a: number, b: any) => any;
892
- readonly conversation_updatePermissionPolicy: (a: number, b: any, c: any, d: number) => any;
980
+ readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
893
981
  readonly conversationlistitem_new: (a: number, b: number, c: number) => number;
894
982
  readonly conversations_createDm: (a: number, b: any, c: number) => any;
895
983
  readonly conversations_createDmByInboxId: (a: number, b: number, c: number, d: number) => any;
@@ -911,10 +999,74 @@ export interface InitOutput {
911
999
  readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number];
912
1000
  readonly conversations_sync: (a: number) => any;
913
1001
  readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any;
1002
+ readonly encodeAttachment: (a: any) => [number, number, number];
1003
+ readonly encodeIntent: (a: any) => [number, number, number];
1004
+ readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
1005
+ readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
1006
+ readonly encodeReaction: (a: any) => [number, number, number];
1007
+ readonly encodeText: (a: number, b: number) => [number, number, number];
1008
+ readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
1009
+ readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
1010
+ readonly metadataFieldName: (a: number) => [number, number];
1011
+ readonly opfsClearAll: () => any;
1012
+ readonly opfsDeleteFile: (a: number, b: number) => any;
1013
+ readonly opfsExportDb: (a: number, b: number) => any;
1014
+ readonly opfsFileCount: () => any;
1015
+ readonly opfsFileExists: (a: number, b: number) => any;
1016
+ readonly opfsImportDb: (a: number, b: number, c: any) => any;
1017
+ readonly opfsInit: () => any;
1018
+ readonly opfsListFiles: () => any;
1019
+ readonly opfsPoolCapacity: () => any;
1020
+ readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1021
+ readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
1022
+ readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
1023
+ readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
1024
+ readonly signaturerequesthandle_signatureText: (a: number) => any;
914
1025
  readonly streamcloser_end: (a: number) => void;
915
1026
  readonly streamcloser_endAndWait: (a: number) => any;
916
1027
  readonly streamcloser_isClosed: (a: number) => number;
917
1028
  readonly streamcloser_waitForReady: (a: number) => any;
1029
+ readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
1030
+ readonly __wbg_client_free: (a: number, b: number) => void;
1031
+ readonly client_accountIdentifier: (a: number) => any;
1032
+ readonly client_apiAggregateStatistics: (a: number) => [number, number];
1033
+ readonly client_apiIdentityStatistics: (a: number) => any;
1034
+ readonly client_apiStatistics: (a: number) => any;
1035
+ readonly client_appVersion: (a: number) => [number, number];
1036
+ readonly client_canMessage: (a: number, b: number, c: number) => any;
1037
+ readonly client_clearAllStatistics: (a: number) => void;
1038
+ readonly client_conversations: (a: number) => number;
1039
+ readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
1040
+ readonly client_inboxId: (a: number) => [number, number];
1041
+ readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
1042
+ readonly client_installationId: (a: number) => [number, number];
1043
+ readonly client_installationIdBytes: (a: number) => any;
1044
+ readonly client_isRegistered: (a: number) => number;
1045
+ readonly client_libxmtpVersion: (a: number) => [number, number];
1046
+ readonly client_sendSyncRequest: (a: number) => any;
1047
+ readonly client_syncPreferences: (a: number) => any;
1048
+ readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: bigint, t: number, u: number, v: number) => any;
1049
+ readonly contentTypeActions: () => any;
1050
+ readonly contentTypeReadReceipt: () => any;
1051
+ readonly contentTypeRemoteAttachment: () => any;
1052
+ readonly contentTypeReply: () => any;
1053
+ readonly contentTypeTransactionReference: () => any;
1054
+ readonly contentTypeWalletSendCalls: () => any;
1055
+ readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
1056
+ readonly encodeActions: (a: any) => [number, number, number];
1057
+ readonly encodeReadReceipt: (a: any) => [number, number, number];
1058
+ readonly encodeRemoteAttachment: (a: any) => [number, number, number];
1059
+ readonly encodeTransactionReference: (a: any) => [number, number, number];
1060
+ readonly encodeWalletSendCalls: (a: any) => [number, number, number];
1061
+ readonly encryptAttachment: (a: any) => [number, number, number];
1062
+ readonly __wbg_authhandle_free: (a: number, b: number) => void;
1063
+ readonly authhandle_id: (a: number) => number;
1064
+ readonly authhandle_new: () => number;
1065
+ readonly authhandle_set: (a: number, b: any) => any;
1066
+ readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
1067
+ readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
1068
+ readonly client_inboxState: (a: number, b: number) => any;
1069
+ readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
918
1070
  readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
919
1071
  readonly rust_zstd_wasm_shim_free: (a: number) => void;
920
1072
  readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
@@ -949,10 +1101,10 @@ export interface InitOutput {
949
1101
  readonly intounderlyingbytesource_type: (a: number) => number;
950
1102
  readonly wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
951
1103
  readonly wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
952
- readonly wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
953
- readonly wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
954
1104
  readonly wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040: (a: number, b: number) => void;
955
1105
  readonly wasm_bindgen__closure__destroy__hfbd660e60d498df9: (a: number, b: number) => void;
1106
+ readonly wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
1107
+ readonly wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
956
1108
  readonly wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1: (a: number, b: number) => void;
957
1109
  readonly wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1: (a: number, b: number) => void;
958
1110
  readonly wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb: (a: number, b: number, c: any, d: any) => void;