@xmtp/wasm-bindings 1.7.0-rc3 → 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.
@@ -1,49 +1,230 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
4
3
  export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
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 inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
6
+ export function metadataFieldName(field: MetadataField): string;
7
+ export function contentTypeAttachment(): ContentTypeId;
7
8
  export function encodeAttachment(attachment: Attachment): EncodedContent;
8
- export function attachmentContentType(): ContentTypeId;
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;
21
+ /**
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.
26
+ */
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>;
9
70
  export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
10
- export function readReceiptContentType(): ContentTypeId;
11
- export function groupUpdatedContentType(): ContentTypeId;
12
- export function leaveRequestContentType(): ContentTypeId;
71
+ export function contentTypeReadReceipt(): ContentTypeId;
72
+ export function contentTypeRemoteAttachment(): ContentTypeId;
13
73
  /**
14
74
  * Decrypts an encrypted payload from a remote attachment.
15
75
  */
16
76
  export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
17
- export function remoteAttachmentContentType(): ContentTypeId;
77
+ export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
18
78
  /**
19
79
  * Encrypts an attachment for storage as a remote attachment.
20
80
  */
21
81
  export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
22
- export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
23
82
  export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
24
- export function walletSendCallsContentType(): ContentTypeId;
83
+ export function contentTypeWalletSendCalls(): ContentTypeId;
25
84
  export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
26
- export function transactionReferenceContentType(): ContentTypeId;
27
- export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
28
- export function multiRemoteAttachmentContentType(): ContentTypeId;
29
- export function encodeText(text: string): EncodedContent;
30
- export function textContentType(): ContentTypeId;
31
- export function replyContentType(): ContentTypeId;
32
- export function intentContentType(): ContentTypeId;
33
- export function encodeIntent(intent: Intent): EncodedContent;
34
- export function actionsContentType(): ContentTypeId;
85
+ export function contentTypeTransactionReference(): ContentTypeId;
86
+ export function contentTypeReply(): ContentTypeId;
35
87
  export function encodeActions(actions: Actions): EncodedContent;
36
- export function encodeMarkdown(text: string): EncodedContent;
37
- export function markdownContentType(): ContentTypeId;
38
- export function encodeReaction(reaction: Reaction): EncodedContent;
39
- export function reactionContentType(): ContentTypeId;
40
- 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>;
41
- export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
42
- export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, accountIdentifier: Identifier): Promise<string | undefined>;
88
+ export function contentTypeActions(): ContentTypeId;
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
  *
@@ -57,45 +238,51 @@ export interface PasskeySignature {
57
238
  clientDataJson: Uint8Array;
58
239
  }
59
240
 
60
- export interface Installation {
61
- bytes: Uint8Array;
62
- id: string;
63
- clientTimestampNs?: bigint;
241
+ export interface PermissionPolicySet {
242
+ addMemberPolicy: PermissionPolicy;
243
+ removeMemberPolicy: PermissionPolicy;
244
+ addAdminPolicy: PermissionPolicy;
245
+ removeAdminPolicy: PermissionPolicy;
246
+ updateGroupNamePolicy: PermissionPolicy;
247
+ updateGroupDescriptionPolicy: PermissionPolicy;
248
+ updateGroupImageUrlSquarePolicy: PermissionPolicy;
249
+ updateMessageDisappearingPolicy: PermissionPolicy;
250
+ updateAppDataPolicy: PermissionPolicy;
64
251
  }
65
252
 
66
- export interface InboxState {
67
- inboxId: string;
68
- recoveryIdentifier: Identifier;
69
- installations: Installation[];
70
- accountIdentifiers: Identifier[];
253
+ export interface GroupPermissions {
254
+ policyType: GroupPermissionsOptions;
255
+ policySet: PermissionPolicySet;
71
256
  }
72
257
 
73
- export interface KeyPackageStatus {
74
- lifetime?: Lifetime;
75
- validationError?: string;
258
+ export interface SendMessageOpts {
259
+ shouldPush: boolean;
260
+ optimistic?: boolean;
76
261
  }
77
262
 
78
- export interface Lifetime {
79
- notBefore: bigint;
80
- notAfter: bigint;
263
+ export interface GroupMetadata {
264
+ creatorInboxId: string;
265
+ conversationType: ConversationType;
81
266
  }
82
267
 
83
- export interface Attachment {
84
- filename?: string;
85
- mimeType: string;
86
- content: Uint8Array;
268
+ export interface GroupMember {
269
+ inboxId: string;
270
+ accountIdentifiers: Identifier[];
271
+ installationIds: string[];
272
+ permissionLevel: PermissionLevel;
273
+ consentState: ConsentState;
87
274
  }
88
275
 
89
- export type ReadReceipt = Record<string, never>;
90
-
91
- export interface MetadataFieldChange {
92
- fieldName: string;
93
- oldValue?: string;
94
- newValue?: string;
276
+ export interface Consent {
277
+ entityType: ConsentEntityType;
278
+ state: ConsentState;
279
+ entity: string;
95
280
  }
96
281
 
97
- export interface Inbox {
98
- inboxId: string;
282
+ export interface Attachment {
283
+ filename?: string;
284
+ mimeType: string;
285
+ content: Uint8Array;
99
286
  }
100
287
 
101
288
  export interface GroupUpdated {
@@ -110,89 +297,24 @@ export interface GroupUpdated {
110
297
  removedSuperAdminInboxes: Inbox[];
111
298
  }
112
299
 
113
- export interface LeaveRequest {
114
- authenticatedNote?: Uint8Array;
115
- }
116
-
117
- export interface RemoteAttachment {
118
- url: string;
119
- contentDigest: string;
120
- secret: Uint8Array;
121
- salt: Uint8Array;
122
- nonce: Uint8Array;
123
- scheme: string;
124
- contentLength: number;
125
- filename?: string;
126
- }
127
-
128
- /**
129
- * Result of encrypting an attachment for remote storage.
130
- */
131
- export interface EncryptedAttachment {
132
- /**
133
- * The encrypted bytes to upload to the remote server
134
- */
135
- payload: Uint8Array;
136
- /**
137
- * SHA-256 digest of the encrypted bytes (hex-encoded)
138
- */
139
- contentDigest: string;
140
- /**
141
- * The 32-byte secret key needed for decryption
142
- */
143
- secret: Uint8Array;
144
- /**
145
- * The 32-byte salt used in key derivation
146
- */
147
- salt: Uint8Array;
148
- /**
149
- * The 12-byte nonce used in encryption
150
- */
151
- nonce: Uint8Array;
152
- /**
153
- * The length of the encrypted content
154
- */
155
- contentLength: number;
156
- /**
157
- * The filename of the attachment
158
- */
159
- filename?: string;
160
- }
161
-
162
- export interface WalletCall {
163
- to?: string;
164
- data?: string;
165
- value?: string;
166
- gas?: string;
167
- metadata?: Record<string, string>;
300
+ export interface MetadataFieldChange {
301
+ fieldName: string;
302
+ oldValue?: string;
303
+ newValue?: string;
168
304
  }
169
305
 
170
- export interface WalletSendCalls {
171
- version: string;
172
- chainId: string;
173
- from: string;
174
- calls: WalletCall[];
175
- capabilities?: Record<string, string>;
306
+ export interface Inbox {
307
+ inboxId: string;
176
308
  }
177
309
 
178
- export interface TransactionMetadata {
179
- transactionType: string;
180
- currency: string;
181
- amount: number;
182
- decimals: number;
183
- fromAddress: string;
184
- toAddress: string;
310
+ export interface LeaveRequest {
311
+ authenticatedNote?: Uint8Array;
185
312
  }
186
313
 
187
- export interface TransactionReference {
188
- namespace?: string;
189
- networkId: string;
190
- reference: string;
191
- metadata?: TransactionMetadata;
314
+ export interface MultiRemoteAttachment {
315
+ attachments: RemoteAttachmentInfo[];
192
316
  }
193
317
 
194
- 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 };
195
-
196
318
  export interface RemoteAttachmentInfo {
197
319
  secret: Uint8Array;
198
320
  contentDigest: string;
@@ -204,106 +326,117 @@ export interface RemoteAttachmentInfo {
204
326
  filename?: string;
205
327
  }
206
328
 
207
- export interface MultiRemoteAttachment {
208
- attachments: RemoteAttachmentInfo[];
329
+ export interface Intent {
330
+ id: string;
331
+ actionId: string;
332
+ metadata?: Record<string, string | number | boolean | null>;
209
333
  }
210
334
 
211
- export interface TextContent {
335
+ export interface Reaction {
336
+ reference: string;
337
+ referenceInboxId: string;
338
+ action: ReactionAction;
212
339
  content: string;
340
+ schema: ReactionSchema;
213
341
  }
214
342
 
215
- export interface Reply {
216
- content: EncodedContent;
217
- reference: string;
218
- referenceInboxId?: string;
343
+ export interface Cursor {
344
+ originatorId: number;
345
+ sequenceId: bigint;
219
346
  }
220
347
 
221
- export interface EnrichedReply {
222
- referenceId: string;
223
- content: DecodedMessageContent;
224
- inReplyTo?: DecodedMessage;
348
+ export interface HmacKey {
349
+ key: Uint8Array;
350
+ epoch: bigint;
225
351
  }
226
352
 
227
- export interface Intent {
228
- id: string;
229
- actionId: string;
230
- metadata?: Record<string, string | number | boolean | null>;
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;
231
361
  }
232
362
 
233
- export interface Action {
234
- id: string;
235
- label: string;
236
- imageUrl?: string;
237
- style?: ActionStyle;
238
- expiresAtNs?: bigint;
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;
239
371
  }
240
372
 
241
- export type ActionStyle = "primary" | "secondary" | "danger";
242
-
243
- export interface Actions {
244
- id: string;
245
- description: string;
246
- actions: Action[];
247
- expiresAtNs?: bigint;
373
+ export interface MessageDisappearingSettings {
374
+ fromNs: bigint;
375
+ inNs: bigint;
248
376
  }
249
377
 
250
- export interface MarkdownContent {
251
- content: string;
378
+ export interface CreateDmOptions {
379
+ messageDisappearingSettings?: MessageDisappearingSettings;
252
380
  }
253
381
 
254
- export type ReactionAction = "unknown" | "added" | "removed";
255
-
256
- export type ReactionSchema = "unknown" | "unicode" | "shortcode" | "custom";
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
+ }
257
391
 
258
- export interface Reaction {
259
- reference: string;
260
- referenceInboxId: string;
261
- action: ReactionAction;
262
- content: string;
263
- schema: ReactionSchema;
392
+ export interface IdentityStats {
393
+ publishIdentityUpdate: bigint;
394
+ getIdentityUpdatesV2: bigint;
395
+ getInboxIds: bigint;
396
+ verifySmartContractWalletSignature: bigint;
264
397
  }
265
398
 
266
- export interface EncodedContent {
267
- type?: ContentTypeId;
268
- parameters?: Record<string, string>;
269
- fallback?: string;
270
- compression?: number;
271
- content: Uint8Array;
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;
272
408
  }
273
409
 
274
- export interface ContentTypeId {
275
- authorityId: string;
276
- typeId: string;
277
- versionMajor: number;
278
- versionMinor: number;
410
+ export interface Identifier {
411
+ identifier: string;
412
+ identifierKind: IdentifierKind;
279
413
  }
280
414
 
281
- export interface DecodedMessage {
415
+ export interface Message {
282
416
  id: string;
283
417
  sentAtNs: bigint;
284
- kind: GroupMessageKind;
285
- senderInstallationId: string;
418
+ convoId: string;
286
419
  senderInboxId: string;
287
- contentType: ContentTypeId;
288
- conversationId: string;
289
- content: DecodedMessageContent;
290
- fallback?: string;
291
- reactions: DecodedMessage[];
420
+ content: EncodedContent;
421
+ kind: GroupMessageKind;
292
422
  deliveryStatus: DeliveryStatus;
293
- numReplies: bigint;
294
- expiresAtNs: bigint | undefined;
295
423
  }
296
424
 
297
- export type UserPreference = { type: "Consent"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
298
-
299
- export interface Credential {
300
- name?: string;
301
- value: string;
302
- expiresAtSeconds: bigint;
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;
303
438
  }
304
439
 
305
- export type DeviceSyncWorkerMode = "enabled" | "disabled";
306
-
307
440
  /**
308
441
  * Specify options for the logger
309
442
  */
@@ -322,187 +455,179 @@ export interface LogOptions {
322
455
  level?: LogLevel;
323
456
  }
324
457
 
325
- export type ClientMode = "default" | "notification";
326
-
327
- export type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace";
328
-
329
458
  export interface GroupSyncSummary {
330
459
  numEligible: number;
331
460
  numSynced: number;
332
461
  }
333
462
 
334
- export interface Identifier {
335
- identifier: string;
336
- identifierKind: IdentifierKind;
337
- }
338
-
339
- export interface ApiStats {
340
- uploadKeyPackage: bigint;
341
- fetchKeyPackage: bigint;
342
- sendGroupMessages: bigint;
343
- sendWelcomeMessages: bigint;
344
- queryGroupMessages: bigint;
345
- queryWelcomeMessages: bigint;
346
- subscribeMessages: bigint;
347
- subscribeWelcomes: bigint;
348
- }
349
-
350
- export type IdentifierKind = "Ethereum" | "Passkey";
351
-
352
- export interface IdentityStats {
353
- publishIdentityUpdate: bigint;
354
- getIdentityUpdatesV2: bigint;
355
- getInboxIds: bigint;
356
- verifySmartContractWalletSignature: bigint;
357
- }
358
-
359
- export type PermissionPolicy = "allow" | "deny" | "admin" | "superAdmin" | "doesNotExist" | "other";
360
-
361
- export type GroupPermissionsOptions = "default" | "adminOnly" | "customPolicy";
362
-
363
- export interface GroupPermissions {
364
- policyType: GroupPermissionsOptions;
365
- policySet: PermissionPolicySet;
366
- }
367
-
368
- export interface PermissionPolicySet {
369
- addMemberPolicy: PermissionPolicy;
370
- removeMemberPolicy: PermissionPolicy;
371
- addAdminPolicy: PermissionPolicy;
372
- removeAdminPolicy: PermissionPolicy;
373
- updateGroupNamePolicy: PermissionPolicy;
374
- updateGroupDescriptionPolicy: PermissionPolicy;
375
- updateGroupImageUrlSquarePolicy: PermissionPolicy;
376
- updateMessageDisappearingPolicy: PermissionPolicy;
377
- }
378
-
379
- export type MetadataField = "groupName" | "description" | "imageUrlSquare" | "messageExpirationFromMS" | "messageExpirationMS";
380
-
381
- export type PermissionUpdateType = "addMember" | "removeMember" | "addAdmin" | "removeAdmin" | "updateMetadata";
382
-
383
- export type ContentType = "unknown" | "text" | "markdown" | "leaveRequest" | "groupMembershipChange" | "groupUpdated" | "reaction" | "readReceipt" | "reply" | "attachment" | "remoteAttachment" | "transactionReference";
463
+ export type ReadReceipt = Record<string, never>;
384
464
 
385
- export interface GroupMember {
386
- inboxId: string;
387
- accountIdentifiers: Identifier[];
388
- installationIds: string[];
389
- permissionLevel: PermissionLevel;
390
- consentState: ConsentState;
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;
391
474
  }
392
475
 
393
- export interface SendMessageOpts {
394
- shouldPush: boolean;
395
- optimistic?: boolean;
476
+ /**
477
+ * Result of encrypting an attachment for remote storage.
478
+ */
479
+ export interface EncryptedAttachment {
480
+ /**
481
+ * The encrypted bytes to upload to the remote server
482
+ */
483
+ payload: Uint8Array;
484
+ /**
485
+ * SHA-256 digest of the encrypted bytes (hex-encoded)
486
+ */
487
+ contentDigest: string;
488
+ /**
489
+ * The 32-byte secret key needed for decryption
490
+ */
491
+ secret: Uint8Array;
492
+ /**
493
+ * The 32-byte salt used in key derivation
494
+ */
495
+ salt: Uint8Array;
496
+ /**
497
+ * The 12-byte nonce used in encryption
498
+ */
499
+ nonce: Uint8Array;
500
+ /**
501
+ * The length of the encrypted content
502
+ */
503
+ contentLength: number;
504
+ /**
505
+ * The filename of the attachment
506
+ */
507
+ filename?: string;
396
508
  }
397
509
 
398
- export type PermissionLevel = "member" | "admin" | "superAdmin";
399
-
400
- export interface GroupMetadata {
401
- creatorInboxId: string;
402
- conversationType: string;
510
+ export interface WalletSendCalls {
511
+ version: string;
512
+ chainId: string;
513
+ from: string;
514
+ calls: WalletCall[];
515
+ capabilities?: Record<string, string>;
403
516
  }
404
517
 
405
- export type ConsentEntityType = "groupId" | "inboxId";
406
-
407
- export type ConsentState = "unknown" | "allowed" | "denied";
408
-
409
- export interface Consent {
410
- entityType: ConsentEntityType;
411
- state: ConsentState;
412
- entity: string;
518
+ export interface WalletCall {
519
+ to?: string;
520
+ data?: string;
521
+ value?: string;
522
+ gas?: string;
523
+ metadata?: Record<string, string>;
413
524
  }
414
525
 
415
- export interface CreateGroupOptions {
416
- permissions?: GroupPermissionsOptions;
417
- groupName?: string;
418
- groupImageUrlSquare?: string;
419
- groupDescription?: string;
420
- customPermissionPolicySet?: PermissionPolicySet;
421
- messageDisappearingSettings?: MessageDisappearingSettings;
422
- appData?: string;
526
+ export interface TransactionReference {
527
+ namespace?: string;
528
+ networkId: string;
529
+ reference: string;
530
+ metadata?: TransactionMetadata;
423
531
  }
424
532
 
425
- export type ListConversationsOrderBy = "createdAt" | "lastActivity";
426
-
427
- export interface CreateDMOptions {
428
- messageDisappearingSettings?: MessageDisappearingSettings;
533
+ export interface TransactionMetadata {
534
+ transactionType: string;
535
+ currency: string;
536
+ amount: number;
537
+ decimals: number;
538
+ fromAddress: string;
539
+ toAddress: string;
429
540
  }
430
541
 
431
- export type GroupMembershipState = "allowed" | "rejected" | "pending" | "restored" | "pendingRemove";
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 };
432
543
 
433
- export interface Cursor {
434
- originatorId: number;
435
- sequenceId: bigint;
436
- }
437
-
438
- export interface ListConversationsOptions {
439
- consentStates?: ConsentState[];
440
- conversationType?: ConversationType;
441
- createdAfterNs?: bigint;
442
- createdBeforeNs?: bigint;
443
- includeDuplicateDms?: boolean;
444
- orderBy?: ListConversationsOrderBy;
445
- limit?: bigint;
544
+ export interface EnrichedReply {
545
+ referenceId: string;
546
+ content: DecodedMessageContent;
547
+ inReplyTo?: DecodedMessage;
446
548
  }
447
549
 
448
- export interface MessageDisappearingSettings {
449
- fromNs: bigint;
450
- inNs: bigint;
550
+ export interface Reply {
551
+ content: EncodedContent;
552
+ reference: string;
553
+ referenceInboxId?: string;
451
554
  }
452
555
 
453
- export type ConversationType = "dm" | "group" | "sync" | "oneshot";
556
+ export interface Action {
557
+ id: string;
558
+ label: string;
559
+ imageUrl?: string;
560
+ style?: ActionStyle;
561
+ expiresAtNs?: bigint;
562
+ }
454
563
 
455
- export interface ConversationDebugInfo {
456
- epoch: bigint;
457
- maybeForked: boolean;
458
- forkDetails: string;
459
- isCommitLogForked?: boolean;
460
- localCommitLog: string;
461
- remoteCommitLog: string;
462
- cursor: Cursor[];
564
+ export interface Actions {
565
+ id: string;
566
+ description: string;
567
+ actions: Action[];
568
+ expiresAtNs?: bigint;
463
569
  }
464
570
 
465
- export interface HmacKey {
466
- key: Uint8Array;
467
- epoch: bigint;
571
+ export interface ContentTypeId {
572
+ authorityId: string;
573
+ typeId: string;
574
+ versionMajor: number;
575
+ versionMinor: number;
468
576
  }
469
577
 
470
- export interface MessageWithReactions {
471
- message: Message;
472
- reactions: Message[];
578
+ export interface EncodedContent {
579
+ type?: ContentTypeId;
580
+ parameters: Record<string, string>;
581
+ fallback?: string;
582
+ compression?: number;
583
+ content: Uint8Array;
473
584
  }
474
585
 
475
- export type DeliveryStatus = "unpublished" | "published" | "failed";
586
+ export interface DecodedMessage {
587
+ id: string;
588
+ sentAtNs: bigint;
589
+ kind: GroupMessageKind;
590
+ senderInstallationId: string;
591
+ senderInboxId: string;
592
+ contentType: ContentTypeId;
593
+ conversationId: string;
594
+ content: DecodedMessageContent;
595
+ fallback?: string;
596
+ reactions: DecodedMessage[];
597
+ deliveryStatus: DeliveryStatus;
598
+ numReplies: bigint;
599
+ expiresAtNs: bigint | undefined;
600
+ }
476
601
 
477
- export type SortDirection = "ascending" | "descending";
602
+ export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
478
603
 
479
- export interface ListMessagesOptions {
480
- contentTypes?: ContentType[];
481
- excludeContentTypes?: ContentType[];
482
- sentBeforeNs?: bigint;
483
- sentAfterNs?: bigint;
484
- limit?: bigint;
485
- deliveryStatus?: DeliveryStatus;
486
- direction?: SortDirection;
487
- kind?: GroupMessageKind;
488
- excludeSenderInboxIds?: string[];
489
- sortBy?: MessageSortBy;
490
- insertedAfterNs?: bigint;
491
- insertedBeforeNs?: bigint;
604
+ export interface Lifetime {
605
+ notBefore: bigint;
606
+ notAfter: bigint;
492
607
  }
493
608
 
494
- export type MessageSortBy = "sentAt" | "insertedAt";
609
+ export interface InboxState {
610
+ inboxId: string;
611
+ recoveryIdentifier: Identifier;
612
+ installations: Installation[];
613
+ accountIdentifiers: Identifier[];
614
+ }
495
615
 
496
- export type GroupMessageKind = "application" | "membershipchange";
616
+ export interface KeyPackageStatus {
617
+ lifetime?: Lifetime;
618
+ validationError?: string;
619
+ }
497
620
 
498
- export interface Message {
621
+ export interface Installation {
622
+ bytes: Uint8Array;
499
623
  id: string;
500
- sentAtNs: bigint;
501
- convoId: string;
502
- senderInboxId: string;
503
- content: EncodedContent;
504
- kind: GroupMessageKind;
505
- deliveryStatus: DeliveryStatus;
624
+ clientTimestampNs?: bigint;
625
+ }
626
+
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,21 @@ 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>;
656
+ /**
657
+ * Output booleans should be zipped with the index of input identifiers
658
+ */
659
+ canMessage(accountIdentifiers: Identifier[]): Promise<any>;
660
+ conversations(): Conversations;
661
+ apiStatistics(): ApiStats;
662
+ syncPreferences(): Promise<GroupSyncSummary>;
663
+ sendSyncRequest(): Promise<void>;
664
+ clearAllStatistics(): void;
665
+ apiIdentityStatistics(): IdentityStats;
666
+ apiAggregateStatistics(): string;
667
+ inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
668
+ findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
529
669
  /**
530
670
  *
531
671
  * * Get the client's inbox state.
@@ -544,21 +684,6 @@ export class Client {
544
684
  *
545
685
  */
546
686
  getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
547
- /**
548
- * Output booleans should be zipped with the index of input identifiers
549
- */
550
- canMessage(accountIdentifiers: Identifier[]): Promise<any>;
551
- conversations(): Conversations;
552
- apiStatistics(): ApiStats;
553
- syncPreferences(): Promise<GroupSyncSummary>;
554
- sendSyncRequest(): Promise<void>;
555
- clearAllStatistics(): void;
556
- apiIdentityStatistics(): IdentityStats;
557
- apiAggregateStatistics(): string;
558
- inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise<InboxState[]>;
559
- findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
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_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
766
- readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
767
- readonly client_inboxId: (a: number) => [number, number];
768
- readonly client_inboxState: (a: number, b: number) => any;
769
- readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
770
- readonly client_installationId: (a: number) => [number, number];
771
- readonly client_installationIdBytes: (a: number) => any;
772
- readonly client_isRegistered: (a: number) => number;
773
- readonly client_libxmtpVersion: (a: number) => [number, number];
901
+ readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
774
902
  readonly client_registerIdentity: (a: number, b: number) => any;
775
903
  readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
776
904
  readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
777
905
  readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
778
- readonly client_sendSyncRequest: (a: number) => any;
906
+ readonly client_setConsentStates: (a: number, b: number, c: number) => any;
779
907
  readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
780
- readonly client_syncPreferences: (a: number) => any;
781
908
  readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
782
- 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;
783
- readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
784
- readonly encodeActions: (a: any) => [number, number, number];
785
- readonly encodeAttachment: (a: any) => [number, number, number];
786
- readonly encodeIntent: (a: any) => [number, number, number];
787
- readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
788
- readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
789
- readonly encodeReaction: (a: any) => [number, number, number];
790
- readonly encodeReadReceipt: (a: any) => [number, number, number];
791
- readonly encodeRemoteAttachment: (a: any) => [number, number, number];
792
- readonly encodeText: (a: number, b: number) => [number, number, number];
793
- readonly encodeTransactionReference: (a: any) => [number, number, number];
794
- readonly encodeWalletSendCalls: (a: any) => [number, number, number];
795
- readonly encryptAttachment: (a: any) => [number, number, number];
796
- readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
797
- readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: any) => any;
798
- readonly groupUpdatedContentType: () => any;
799
- readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
800
- readonly intentContentType: () => any;
801
- readonly leaveRequestContentType: () => any;
802
- readonly markdownContentType: () => any;
803
- readonly multiRemoteAttachmentContentType: () => any;
804
- readonly reactionContentType: () => any;
805
- readonly readReceiptContentType: () => any;
806
- readonly remoteAttachmentContentType: () => any;
807
- readonly replyContentType: () => any;
808
- readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
809
- readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
810
- readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
811
- readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
812
- readonly signaturerequesthandle_signatureText: (a: number) => any;
813
- readonly textContentType: () => any;
814
- readonly transactionReferenceContentType: () => any;
815
- readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
816
- readonly walletSendCallsContentType: () => 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;
@@ -947,14 +1099,14 @@ export interface InitOutput {
947
1099
  readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
948
1100
  readonly intounderlyingbytesource_start: (a: number, b: any) => void;
949
1101
  readonly intounderlyingbytesource_type: (a: number) => number;
1102
+ readonly wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
1103
+ readonly wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
950
1104
  readonly wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040: (a: number, b: number) => void;
951
1105
  readonly wasm_bindgen__closure__destroy__hfbd660e60d498df9: (a: number, b: number) => void;
952
1106
  readonly wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6: (a: number, b: number, c: any) => void;
953
1107
  readonly wasm_bindgen__closure__destroy__hed8af60076250245: (a: number, b: number) => void;
954
1108
  readonly wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1: (a: number, b: number) => void;
955
1109
  readonly wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1: (a: number, b: number) => void;
956
- readonly wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005: (a: number, b: number) => void;
957
- readonly wasm_bindgen__closure__destroy__h3c5639ee43c80f22: (a: number, b: number) => void;
958
1110
  readonly wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb: (a: number, b: number, c: any, d: any) => void;
959
1111
  readonly __wbindgen_malloc: (a: number, b: number) => number;
960
1112
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;