@xmtp/wasm-bindings 1.9.0-rc4 → 1.9.0-rc5

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,50 +1,34 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function encodeAttachment(attachment: Attachment): EncodedContent;
4
- export function contentTypeAttachment(): ContentTypeId;
5
3
  export function contentTypeReadReceipt(): ContentTypeId;
6
4
  export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent;
7
- export function contentTypeTransactionReference(): ContentTypeId;
8
5
  export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent;
6
+ export function contentTypeTransactionReference(): ContentTypeId;
9
7
  export function contentTypeMultiRemoteAttachment(): ContentTypeId;
10
8
  export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent;
11
- export function encodeText(text: string): EncodedContent;
12
- export function contentTypeText(): ContentTypeId;
13
9
  export function contentTypeReply(): ContentTypeId;
14
- export function contentTypeMarkdown(): ContentTypeId;
15
- export function encodeMarkdown(text: string): EncodedContent;
16
- export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
17
- export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
18
- export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
19
10
  export function inboxStateFromInboxIds(host: string, gatewayHost: string | null | undefined, inboxIds: string[]): Promise<InboxState[]>;
20
- export function contentTypeGroupUpdated(): ContentTypeId;
21
- export function contentTypeLeaveRequest(): ContentTypeId;
22
- export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
23
- export function contentTypeRemoteAttachment(): ContentTypeId;
11
+ export function metadataFieldName(field: MetadataField): string;
24
12
  /**
25
- * Decrypts an encrypted payload from a remote attachment.
13
+ * Initialize the OPFS SQLite VFS if not already initialized.
14
+ * This must be called before using other OPFS functions.
26
15
  */
27
- export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
16
+ export function opfsInit(): Promise<void>;
28
17
  /**
29
- * Encrypts an attachment for storage as a remote attachment.
18
+ * Get the current capacity of the OPFS file pool.
30
19
  */
31
- export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
32
- export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
33
- export function contentTypeWalletSendCalls(): ContentTypeId;
34
- export function contentTypeIntent(): ContentTypeId;
35
- export function encodeIntent(intent: Intent): EncodedContent;
36
- export function contentTypeActions(): ContentTypeId;
37
- export function encodeActions(actions: Actions): EncodedContent;
38
- export function contentTypeReaction(): ContentTypeId;
39
- export function encodeReaction(reaction: Reaction): EncodedContent;
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 getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, isSecure: boolean, accountIdentifier: Identifier): Promise<string | undefined>;
42
- export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
43
- export function metadataFieldName(field: MetadataField): string;
20
+ export function opfsPoolCapacity(): Promise<number>;
44
21
  /**
45
- * Check if a database file exists in OPFS.
22
+ * Delete all database files from OPFS.
23
+ * Note: All databases must be closed before calling this function.
46
24
  */
47
- export function opfsFileExists(filename: string): Promise<boolean>;
25
+ export function opfsClearAll(): Promise<void>;
26
+ /**
27
+ * Export a database file from OPFS as a byte array.
28
+ * This can be used to backup or transfer a database.
29
+ * Note: The database should be closed before exporting for consistency.
30
+ */
31
+ export function opfsExportDb(filename: string): Promise<Uint8Array>;
48
32
  /**
49
33
  * Import a database from a byte array into OPFS.
50
34
  * This will overwrite any existing database with the same name.
@@ -58,20 +42,9 @@ export function opfsImportDb(filename: string, data: Uint8Array): Promise<void>;
58
42
  */
59
43
  export function opfsListFiles(): Promise<string[]>;
60
44
  /**
61
- * Get the number of database files stored in OPFS.
62
- */
63
- export function opfsFileCount(): Promise<number>;
64
- /**
65
- * Delete all database files from OPFS.
66
- * Note: All databases must be closed before calling this function.
67
- */
68
- export function opfsClearAll(): Promise<void>;
69
- /**
70
- * Export a database file from OPFS as a byte array.
71
- * This can be used to backup or transfer a database.
72
- * Note: The database should be closed before exporting for consistency.
45
+ * Check if a database file exists in OPFS.
73
46
  */
74
- export function opfsExportDb(filename: string): Promise<Uint8Array>;
47
+ export function opfsFileExists(filename: string): Promise<boolean>;
75
48
  /**
76
49
  * Delete a specific database file from OPFS.
77
50
  * Returns true if the file was deleted, false if it didn't exist.
@@ -79,14 +52,41 @@ export function opfsExportDb(filename: string): Promise<Uint8Array>;
79
52
  */
80
53
  export function opfsDeleteFile(filename: string): Promise<boolean>;
81
54
  /**
82
- * Initialize the OPFS SQLite VFS if not already initialized.
83
- * This must be called before using other OPFS functions.
55
+ * Get the number of database files stored in OPFS.
84
56
  */
85
- export function opfsInit(): Promise<void>;
57
+ export function opfsFileCount(): Promise<number>;
58
+ export function applySignatureRequest(host: string, gatewayHost: string | null | undefined, signatureRequest: SignatureRequestHandle): Promise<void>;
59
+ export function revokeInstallationsSignatureRequest(host: string, gatewayHost: string | null | undefined, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
60
+ export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void;
61
+ export function encodeAttachment(attachment: Attachment): EncodedContent;
62
+ export function contentTypeAttachment(): ContentTypeId;
63
+ export function contentTypeGroupUpdated(): ContentTypeId;
64
+ export function contentTypeLeaveRequest(): ContentTypeId;
86
65
  /**
87
- * Get the current capacity of the OPFS file pool.
66
+ * Encrypts an attachment for storage as a remote attachment.
88
67
  */
89
- export function opfsPoolCapacity(): Promise<number>;
68
+ export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
69
+ export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent;
70
+ export function contentTypeRemoteAttachment(): ContentTypeId;
71
+ /**
72
+ * Decrypts an encrypted payload from a remote attachment.
73
+ */
74
+ export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment;
75
+ export function contentTypeWalletSendCalls(): ContentTypeId;
76
+ export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent;
77
+ export function encodeText(text: string): EncodedContent;
78
+ export function contentTypeText(): ContentTypeId;
79
+ export function contentTypeIntent(): ContentTypeId;
80
+ export function encodeIntent(intent: Intent): EncodedContent;
81
+ export function contentTypeActions(): ContentTypeId;
82
+ export function encodeActions(actions: Actions): EncodedContent;
83
+ export function contentTypeMarkdown(): ContentTypeId;
84
+ export function encodeMarkdown(text: string): EncodedContent;
85
+ export function encodeReaction(reaction: Reaction): EncodedContent;
86
+ export function contentTypeReaction(): ContentTypeId;
87
+ export function getInboxIdForIdentifier(host: string, gatewayHost: string | null | undefined, isSecure: boolean, accountIdentifier: Identifier): Promise<string | undefined>;
88
+ export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
89
+ 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>;
90
90
  /**
91
91
  * Entry point invoked by JavaScript in a worker.
92
92
  */
@@ -231,14 +231,15 @@ export enum SortDirection {
231
231
  * *This API requires the following crate features to be activated: `ReadableStreamType`*
232
232
  */
233
233
  type ReadableStreamType = "bytes";
234
- export interface Attachment {
235
- filename?: string;
236
- mimeType: string;
237
- content: Uint8Array;
238
- }
239
-
240
234
  export type ReadReceipt = Record<string, never>;
241
235
 
236
+ export interface TransactionReference {
237
+ namespace?: string;
238
+ networkId: string;
239
+ reference: string;
240
+ metadata?: TransactionMetadata;
241
+ }
242
+
242
243
  export interface TransactionMetadata {
243
244
  transactionType: string;
244
245
  currency: string;
@@ -248,13 +249,6 @@ export interface TransactionMetadata {
248
249
  toAddress: string;
249
250
  }
250
251
 
251
- export interface TransactionReference {
252
- namespace?: string;
253
- networkId: string;
254
- reference: string;
255
- metadata?: TransactionMetadata;
256
- }
257
-
258
252
  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 };
259
253
 
260
254
  export interface RemoteAttachmentInfo {
@@ -284,14 +278,6 @@ export interface Reply {
284
278
  referenceInboxId?: string;
285
279
  }
286
280
 
287
- export interface EncodedContent {
288
- type?: ContentTypeId;
289
- parameters: Record<string, string>;
290
- fallback?: string;
291
- compression?: number;
292
- content: Uint8Array;
293
- }
294
-
295
281
  export interface ContentTypeId {
296
282
  authorityId: string;
297
283
  typeId: string;
@@ -299,13 +285,28 @@ export interface ContentTypeId {
299
285
  versionMinor: number;
300
286
  }
301
287
 
302
- export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
288
+ export interface EncodedContent {
289
+ type?: ContentTypeId;
290
+ parameters: Record<string, string>;
291
+ fallback?: string;
292
+ compression?: number;
293
+ content: Uint8Array;
294
+ }
303
295
 
304
- export interface PasskeySignature {
305
- publicKey: Uint8Array;
306
- signature: Uint8Array;
307
- authenticatorData: Uint8Array;
308
- clientDataJson: Uint8Array;
296
+ export interface DecodedMessage {
297
+ id: string;
298
+ sentAtNs: bigint;
299
+ kind: GroupMessageKind;
300
+ senderInstallationId: string;
301
+ senderInboxId: string;
302
+ contentType: ContentTypeId;
303
+ conversationId: string;
304
+ content: DecodedMessageContent;
305
+ fallback?: string;
306
+ reactions: DecodedMessage[];
307
+ deliveryStatus: DeliveryStatus;
308
+ numReplies: bigint;
309
+ expiresAtNs: bigint | undefined;
309
310
  }
310
311
 
311
312
  export interface Lifetime {
@@ -331,6 +332,85 @@ export interface KeyPackageStatus {
331
332
  validationError?: string;
332
333
  }
333
334
 
335
+ export interface PermissionPolicySet {
336
+ addMemberPolicy: PermissionPolicy;
337
+ removeMemberPolicy: PermissionPolicy;
338
+ addAdminPolicy: PermissionPolicy;
339
+ removeAdminPolicy: PermissionPolicy;
340
+ updateGroupNamePolicy: PermissionPolicy;
341
+ updateGroupDescriptionPolicy: PermissionPolicy;
342
+ updateGroupImageUrlSquarePolicy: PermissionPolicy;
343
+ updateMessageDisappearingPolicy: PermissionPolicy;
344
+ updateAppDataPolicy: PermissionPolicy;
345
+ }
346
+
347
+ export interface GroupPermissions {
348
+ policyType: GroupPermissionsOptions;
349
+ policySet: PermissionPolicySet;
350
+ }
351
+
352
+ export interface DeletedMessage {
353
+ deletedBy: DeletedBy;
354
+ adminInboxId?: string;
355
+ }
356
+
357
+ export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] };
358
+
359
+ export interface Identifier {
360
+ identifier: string;
361
+ identifierKind: IdentifierKind;
362
+ }
363
+
364
+ export interface ApiStats {
365
+ uploadKeyPackage: bigint;
366
+ fetchKeyPackage: bigint;
367
+ sendGroupMessages: bigint;
368
+ sendWelcomeMessages: bigint;
369
+ queryGroupMessages: bigint;
370
+ queryWelcomeMessages: bigint;
371
+ subscribeMessages: bigint;
372
+ subscribeWelcomes: bigint;
373
+ }
374
+
375
+ export interface IdentityStats {
376
+ publishIdentityUpdate: bigint;
377
+ getIdentityUpdatesV2: bigint;
378
+ getInboxIds: bigint;
379
+ verifySmartContractWalletSignature: bigint;
380
+ }
381
+
382
+ export interface ListMessagesOptions {
383
+ contentTypes?: ContentType[];
384
+ excludeContentTypes?: ContentType[];
385
+ sentBeforeNs?: bigint;
386
+ sentAfterNs?: bigint;
387
+ limit?: bigint;
388
+ deliveryStatus?: DeliveryStatus;
389
+ direction?: SortDirection;
390
+ kind?: GroupMessageKind;
391
+ excludeSenderInboxIds?: string[];
392
+ sortBy?: MessageSortBy;
393
+ insertedAfterNs?: bigint;
394
+ insertedBeforeNs?: bigint;
395
+ }
396
+
397
+ export interface Message {
398
+ id: string;
399
+ sentAtNs: bigint;
400
+ convoId: string;
401
+ senderInboxId: string;
402
+ content: EncodedContent;
403
+ kind: GroupMessageKind;
404
+ deliveryStatus: DeliveryStatus;
405
+ }
406
+
407
+ export interface PasskeySignature {
408
+ publicKey: Uint8Array;
409
+ signature: Uint8Array;
410
+ authenticatorData: Uint8Array;
411
+ clientDataJson: Uint8Array;
412
+ }
413
+
334
414
  export interface GroupMember {
335
415
  inboxId: string;
336
416
  accountIdentifiers: Identifier[];
@@ -355,14 +435,10 @@ export interface Consent {
355
435
  entity: string;
356
436
  }
357
437
 
358
- export interface MetadataFieldChange {
359
- fieldName: string;
360
- oldValue?: string;
361
- newValue?: string;
362
- }
363
-
364
- export interface Inbox {
365
- inboxId: string;
438
+ export interface Attachment {
439
+ filename?: string;
440
+ mimeType: string;
441
+ content: Uint8Array;
366
442
  }
367
443
 
368
444
  export interface GroupUpdated {
@@ -377,19 +453,18 @@ export interface GroupUpdated {
377
453
  removedSuperAdminInboxes: Inbox[];
378
454
  }
379
455
 
380
- export interface LeaveRequest {
381
- authenticatedNote?: Uint8Array;
456
+ export interface Inbox {
457
+ inboxId: string;
382
458
  }
383
459
 
384
- export interface RemoteAttachment {
385
- url: string;
386
- contentDigest: string;
387
- secret: Uint8Array;
388
- salt: Uint8Array;
389
- nonce: Uint8Array;
390
- scheme: string;
391
- contentLength: number;
392
- filename?: string;
460
+ export interface MetadataFieldChange {
461
+ fieldName: string;
462
+ oldValue?: string;
463
+ newValue?: string;
464
+ }
465
+
466
+ export interface LeaveRequest {
467
+ authenticatedNote?: Uint8Array;
393
468
  }
394
469
 
395
470
  /**
@@ -426,12 +501,15 @@ export interface EncryptedAttachment {
426
501
  filename?: string;
427
502
  }
428
503
 
429
- export interface WalletSendCalls {
430
- version: string;
431
- chainId: string;
432
- from: string;
433
- calls: WalletCall[];
434
- capabilities?: Record<string, string>;
504
+ export interface RemoteAttachment {
505
+ url: string;
506
+ contentDigest: string;
507
+ secret: Uint8Array;
508
+ salt: Uint8Array;
509
+ nonce: Uint8Array;
510
+ scheme: string;
511
+ contentLength: number;
512
+ filename?: string;
435
513
  }
436
514
 
437
515
  export interface WalletCall {
@@ -442,24 +520,32 @@ export interface WalletCall {
442
520
  metadata?: Record<string, string>;
443
521
  }
444
522
 
523
+ export interface WalletSendCalls {
524
+ version: string;
525
+ chainId: string;
526
+ from: string;
527
+ calls: WalletCall[];
528
+ capabilities?: Record<string, string>;
529
+ }
530
+
445
531
  export interface Intent {
446
532
  id: string;
447
533
  actionId: string;
448
534
  metadata?: Record<string, string | number | boolean | null>;
449
535
  }
450
536
 
451
- export interface Actions {
537
+ export interface Action {
452
538
  id: string;
453
- description: string;
454
- actions: Action[];
539
+ label: string;
540
+ imageUrl?: string;
541
+ style?: ActionStyle;
455
542
  expiresAtNs?: bigint;
456
543
  }
457
544
 
458
- export interface Action {
545
+ export interface Actions {
459
546
  id: string;
460
- label: string;
461
- imageUrl?: string;
462
- style?: ActionStyle;
547
+ description: string;
548
+ actions: Action[];
463
549
  expiresAtNs?: bigint;
464
550
  }
465
551
 
@@ -476,30 +562,6 @@ export interface HmacKey {
476
562
  epoch: bigint;
477
563
  }
478
564
 
479
- export interface Cursor {
480
- originatorId: number;
481
- sequenceId: bigint;
482
- }
483
-
484
- export interface ListConversationsOptions {
485
- consentStates?: ConsentState[];
486
- conversationType?: ConversationType;
487
- createdAfterNs?: bigint;
488
- createdBeforeNs?: bigint;
489
- includeDuplicateDms?: boolean;
490
- orderBy?: ListConversationsOrderBy;
491
- limit?: bigint;
492
- }
493
-
494
- export interface CreateDmOptions {
495
- messageDisappearingSettings?: MessageDisappearingSettings;
496
- }
497
-
498
- export interface MessageDisappearingSettings {
499
- fromNs: bigint;
500
- inNs: bigint;
501
- }
502
-
503
565
  export interface ConversationDebugInfo {
504
566
  epoch: bigint;
505
567
  maybeForked: boolean;
@@ -510,6 +572,16 @@ export interface ConversationDebugInfo {
510
572
  cursor: Cursor[];
511
573
  }
512
574
 
575
+ export interface Cursor {
576
+ originatorId: number;
577
+ sequenceId: bigint;
578
+ }
579
+
580
+ export interface MessageDisappearingSettings {
581
+ fromNs: bigint;
582
+ inNs: bigint;
583
+ }
584
+
513
585
  export interface CreateGroupOptions {
514
586
  permissions?: GroupPermissionsOptions;
515
587
  groupName?: string;
@@ -520,20 +592,24 @@ export interface CreateGroupOptions {
520
592
  appData?: string;
521
593
  }
522
594
 
523
- export interface DecodedMessage {
524
- id: string;
525
- sentAtNs: bigint;
526
- kind: GroupMessageKind;
527
- senderInstallationId: string;
528
- senderInboxId: string;
529
- contentType: ContentTypeId;
530
- conversationId: string;
531
- content: DecodedMessageContent;
532
- fallback?: string;
533
- reactions: DecodedMessage[];
534
- deliveryStatus: DeliveryStatus;
535
- numReplies: bigint;
536
- expiresAtNs: bigint | undefined;
595
+ export interface ListConversationsOptions {
596
+ consentStates?: ConsentState[];
597
+ conversationType?: ConversationType;
598
+ createdAfterNs?: bigint;
599
+ createdBeforeNs?: bigint;
600
+ includeDuplicateDms?: boolean;
601
+ orderBy?: ListConversationsOrderBy;
602
+ limit?: bigint;
603
+ }
604
+
605
+ export interface CreateDmOptions {
606
+ messageDisappearingSettings?: MessageDisappearingSettings;
607
+ }
608
+
609
+ export interface Credential {
610
+ name?: string;
611
+ value: string;
612
+ expiresAtSeconds: bigint;
537
613
  }
538
614
 
539
615
  export interface GroupSyncSummary {
@@ -559,77 +635,6 @@ export interface LogOptions {
559
635
  level?: LogLevel;
560
636
  }
561
637
 
562
- export interface GroupPermissions {
563
- policyType: GroupPermissionsOptions;
564
- policySet: PermissionPolicySet;
565
- }
566
-
567
- export interface PermissionPolicySet {
568
- addMemberPolicy: PermissionPolicy;
569
- removeMemberPolicy: PermissionPolicy;
570
- addAdminPolicy: PermissionPolicy;
571
- removeAdminPolicy: PermissionPolicy;
572
- updateGroupNamePolicy: PermissionPolicy;
573
- updateGroupDescriptionPolicy: PermissionPolicy;
574
- updateGroupImageUrlSquarePolicy: PermissionPolicy;
575
- updateMessageDisappearingPolicy: PermissionPolicy;
576
- updateAppDataPolicy: PermissionPolicy;
577
- }
578
-
579
- export interface Credential {
580
- name?: string;
581
- value: string;
582
- expiresAtSeconds: bigint;
583
- }
584
-
585
- export interface Identifier {
586
- identifier: string;
587
- identifierKind: IdentifierKind;
588
- }
589
-
590
- export interface ApiStats {
591
- uploadKeyPackage: bigint;
592
- fetchKeyPackage: bigint;
593
- sendGroupMessages: bigint;
594
- sendWelcomeMessages: bigint;
595
- queryGroupMessages: bigint;
596
- queryWelcomeMessages: bigint;
597
- subscribeMessages: bigint;
598
- subscribeWelcomes: bigint;
599
- }
600
-
601
- export interface IdentityStats {
602
- publishIdentityUpdate: bigint;
603
- getIdentityUpdatesV2: bigint;
604
- getInboxIds: bigint;
605
- verifySmartContractWalletSignature: bigint;
606
- }
607
-
608
- export interface ListMessagesOptions {
609
- contentTypes?: ContentType[];
610
- excludeContentTypes?: ContentType[];
611
- sentBeforeNs?: bigint;
612
- sentAfterNs?: bigint;
613
- limit?: bigint;
614
- deliveryStatus?: DeliveryStatus;
615
- direction?: SortDirection;
616
- kind?: GroupMessageKind;
617
- excludeSenderInboxIds?: string[];
618
- sortBy?: MessageSortBy;
619
- insertedAfterNs?: bigint;
620
- insertedBeforeNs?: bigint;
621
- }
622
-
623
- export interface Message {
624
- id: string;
625
- sentAtNs: bigint;
626
- convoId: string;
627
- senderInboxId: string;
628
- content: EncodedContent;
629
- kind: GroupMessageKind;
630
- deliveryStatus: DeliveryStatus;
631
- }
632
-
633
638
  export class AuthHandle {
634
639
  free(): void;
635
640
  [Symbol.dispose](): void;
@@ -641,16 +646,6 @@ export class Client {
641
646
  private constructor();
642
647
  free(): void;
643
648
  [Symbol.dispose](): void;
644
- registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>;
645
- applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
646
- signWithInstallationKey(signatureText: string): Uint8Array;
647
- createInboxSignatureRequest(): SignatureRequestHandle | undefined;
648
- addWalletSignatureRequest(newIdentifier: Identifier): Promise<SignatureRequestHandle>;
649
- revokeWalletSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
650
- verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void;
651
- revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
652
- changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
653
- revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
654
649
  /**
655
650
  *
656
651
  * * Get the client's inbox state.
@@ -669,6 +664,16 @@ export class Client {
669
664
  *
670
665
  */
671
666
  getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise<any>;
667
+ registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>;
668
+ applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>;
669
+ signWithInstallationKey(signatureText: string): Uint8Array;
670
+ createInboxSignatureRequest(): SignatureRequestHandle | undefined;
671
+ addWalletSignatureRequest(newIdentifier: Identifier): Promise<SignatureRequestHandle>;
672
+ revokeWalletSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>;
673
+ verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void;
674
+ revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise<SignatureRequestHandle>;
675
+ changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>;
676
+ revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle | undefined>;
672
677
  getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>;
673
678
  setConsentStates(records: Consent[]): Promise<void>;
674
679
  /**
@@ -809,14 +814,6 @@ export class Conversations {
809
814
  sync(): Promise<void>;
810
815
  stream(callback: any, conversationType?: ConversationType | null): StreamCloser;
811
816
  }
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
- }
820
817
  export class IntoUnderlyingByteSource {
821
818
  private constructor();
822
819
  free(): void;
@@ -877,75 +874,64 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
877
874
 
878
875
  export interface InitOutput {
879
876
  readonly memory: WebAssembly.Memory;
880
- readonly contentTypeAttachment: () => any;
881
- readonly contentTypeMarkdown: () => any;
882
877
  readonly contentTypeMultiRemoteAttachment: () => any;
883
878
  readonly contentTypeReadReceipt: () => any;
884
879
  readonly contentTypeReply: () => any;
885
- readonly contentTypeText: () => any;
886
880
  readonly contentTypeTransactionReference: () => any;
887
- readonly encodeAttachment: (a: any) => [number, number, number];
888
- readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
889
881
  readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
890
882
  readonly encodeReadReceipt: (a: any) => [number, number, number];
891
- readonly encodeText: (a: number, b: number) => [number, number, number];
892
883
  readonly encodeTransactionReference: (a: any) => [number, number, number];
893
- readonly __wbg_client_free: (a: number, b: number) => void;
884
+ readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
885
+ readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
886
+ readonly client_inboxState: (a: number, b: number) => any;
887
+ readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
888
+ readonly metadataFieldName: (a: number) => [number, number];
889
+ readonly opfsClearAll: () => any;
890
+ readonly opfsDeleteFile: (a: number, b: number) => any;
891
+ readonly opfsExportDb: (a: number, b: number) => any;
892
+ readonly opfsFileCount: () => any;
893
+ readonly opfsFileExists: (a: number, b: number) => any;
894
+ readonly opfsImportDb: (a: number, b: number, c: any) => any;
895
+ readonly opfsInit: () => any;
896
+ readonly opfsListFiles: () => any;
897
+ readonly opfsPoolCapacity: () => any;
898
+ readonly __wbg_authhandle_free: (a: number, b: number) => void;
894
899
  readonly __wbg_conversation_free: (a: number, b: number) => void;
895
900
  readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
896
901
  readonly __wbg_conversations_free: (a: number, b: number) => void;
897
- readonly __wbg_deletedmessage_free: (a: number, b: number) => void;
898
902
  readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
899
903
  readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
900
904
  readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
901
- readonly __wbg_get_deletedmessage_adminInboxId: (a: number) => [number, number];
902
- readonly __wbg_get_deletedmessage_deletedBy: (a: number) => number;
903
905
  readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
904
906
  readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
905
907
  readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
906
- readonly __wbg_set_deletedmessage_adminInboxId: (a: number, b: number, c: number) => void;
907
- readonly __wbg_set_deletedmessage_deletedBy: (a: number, b: number) => void;
908
908
  readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
909
909
  readonly __wbg_streamcloser_free: (a: number, b: number) => void;
910
910
  readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
911
- readonly client_accountIdentifier: (a: number) => any;
911
+ readonly authhandle_id: (a: number) => number;
912
+ readonly authhandle_new: () => number;
913
+ readonly authhandle_set: (a: number, b: any) => any;
912
914
  readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
913
- readonly client_apiAggregateStatistics: (a: number) => [number, number];
914
- readonly client_apiIdentityStatistics: (a: number) => any;
915
- readonly client_apiStatistics: (a: number) => any;
916
- readonly client_appVersion: (a: number) => [number, number];
917
915
  readonly client_applySignatureRequest: (a: number, b: number) => any;
918
- readonly client_canMessage: (a: number, b: number, c: number) => any;
919
916
  readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
920
- readonly client_clearAllStatistics: (a: number) => void;
921
- readonly client_conversations: (a: number) => number;
922
917
  readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
923
- readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
924
918
  readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
925
- readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
926
- readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
927
- readonly client_inboxId: (a: number) => [number, number];
928
- readonly client_inboxState: (a: number, b: number) => any;
929
- readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
930
- readonly client_installationId: (a: number) => [number, number];
931
- readonly client_installationIdBytes: (a: number) => any;
932
- readonly client_isRegistered: (a: number) => number;
933
- readonly client_libxmtpVersion: (a: number) => [number, number];
934
919
  readonly client_registerIdentity: (a: number, b: number) => any;
935
920
  readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
936
921
  readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
937
922
  readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
938
- readonly client_sendSyncRequest: (a: number) => any;
939
923
  readonly client_setConsentStates: (a: number, b: number, c: number) => any;
940
924
  readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
941
- readonly client_syncPreferences: (a: number) => any;
942
925
  readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
943
926
  readonly contentTypeActions: () => any;
927
+ readonly contentTypeAttachment: () => any;
944
928
  readonly contentTypeGroupUpdated: () => any;
945
929
  readonly contentTypeIntent: () => any;
946
930
  readonly contentTypeLeaveRequest: () => any;
931
+ readonly contentTypeMarkdown: () => any;
947
932
  readonly contentTypeReaction: () => any;
948
933
  readonly contentTypeRemoteAttachment: () => any;
934
+ readonly contentTypeText: () => any;
949
935
  readonly contentTypeWalletSendCalls: () => any;
950
936
  readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
951
937
  readonly conversation_addMembers: (a: number, b: number, c: number) => any;
@@ -1032,17 +1018,18 @@ export interface InitOutput {
1032
1018
  readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number];
1033
1019
  readonly conversations_sync: (a: number) => any;
1034
1020
  readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any;
1035
- 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;
1036
1021
  readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
1037
1022
  readonly encodeActions: (a: any) => [number, number, number];
1023
+ readonly encodeAttachment: (a: any) => [number, number, number];
1038
1024
  readonly encodeIntent: (a: any) => [number, number, number];
1025
+ readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
1039
1026
  readonly encodeReaction: (a: any) => [number, number, number];
1040
1027
  readonly encodeRemoteAttachment: (a: any) => [number, number, number];
1028
+ readonly encodeText: (a: number, b: number) => [number, number, number];
1041
1029
  readonly encodeWalletSendCalls: (a: any) => [number, number, number];
1042
1030
  readonly encryptAttachment: (a: any) => [number, number, number];
1043
1031
  readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
1044
1032
  readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
1045
- readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
1046
1033
  readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1047
1034
  readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
1048
1035
  readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
@@ -1053,20 +1040,25 @@ export interface InitOutput {
1053
1040
  readonly streamcloser_isClosed: (a: number) => number;
1054
1041
  readonly streamcloser_waitForReady: (a: number) => any;
1055
1042
  readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
1056
- readonly __wbg_authhandle_free: (a: number, b: number) => void;
1057
- readonly authhandle_id: (a: number) => number;
1058
- readonly authhandle_new: () => number;
1059
- readonly authhandle_set: (a: number, b: any) => any;
1060
- readonly metadataFieldName: (a: number) => [number, number];
1061
- readonly opfsClearAll: () => any;
1062
- readonly opfsDeleteFile: (a: number, b: number) => any;
1063
- readonly opfsExportDb: (a: number, b: number) => any;
1064
- readonly opfsFileCount: () => any;
1065
- readonly opfsFileExists: (a: number, b: number) => any;
1066
- readonly opfsImportDb: (a: number, b: number, c: any) => any;
1067
- readonly opfsInit: () => any;
1068
- readonly opfsListFiles: () => any;
1069
- readonly opfsPoolCapacity: () => any;
1043
+ readonly __wbg_client_free: (a: number, b: number) => void;
1044
+ readonly client_accountIdentifier: (a: number) => any;
1045
+ readonly client_apiAggregateStatistics: (a: number) => [number, number];
1046
+ readonly client_apiIdentityStatistics: (a: number) => any;
1047
+ readonly client_apiStatistics: (a: number) => any;
1048
+ readonly client_appVersion: (a: number) => [number, number];
1049
+ readonly client_canMessage: (a: number, b: number, c: number) => any;
1050
+ readonly client_clearAllStatistics: (a: number) => void;
1051
+ readonly client_conversations: (a: number) => number;
1052
+ readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
1053
+ readonly client_inboxId: (a: number) => [number, number];
1054
+ readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
1055
+ readonly client_installationId: (a: number) => [number, number];
1056
+ readonly client_installationIdBytes: (a: number) => any;
1057
+ readonly client_isRegistered: (a: number) => number;
1058
+ readonly client_libxmtpVersion: (a: number) => [number, number];
1059
+ readonly client_sendSyncRequest: (a: number) => any;
1060
+ readonly client_syncPreferences: (a: number) => any;
1061
+ 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;
1070
1062
  readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
1071
1063
  readonly rust_zstd_wasm_shim_free: (a: number) => void;
1072
1064
  readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
@@ -1101,12 +1093,12 @@ export interface InitOutput {
1101
1093
  readonly intounderlyingsink_write: (a: number, b: any) => any;
1102
1094
  readonly wasm_bindgen__convert__closures_____invoke__hb3ea4cec5b2a99b4: (a: number, b: number) => void;
1103
1095
  readonly wasm_bindgen__closure__destroy__h3dd912ac8e2d6083: (a: number, b: number) => void;
1104
- readonly wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14: (a: number, b: number) => void;
1105
- readonly wasm_bindgen__closure__destroy__h43bd69f6f2f23fdf: (a: number, b: number) => void;
1106
1096
  readonly wasm_bindgen__convert__closures_____invoke__h57fa53c0b5bdcaf1: (a: number, b: number) => void;
1107
1097
  readonly wasm_bindgen__closure__destroy__hdc965c5deda6531b: (a: number, b: number) => void;
1108
1098
  readonly wasm_bindgen__convert__closures_____invoke__h989c99c207fff0d8: (a: number, b: number, c: any) => void;
1109
1099
  readonly wasm_bindgen__closure__destroy__hab695a3e04b8e88a: (a: number, b: number) => void;
1100
+ readonly wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14: (a: number, b: number) => void;
1101
+ readonly wasm_bindgen__closure__destroy__h43bd69f6f2f23fdf: (a: number, b: number) => void;
1110
1102
  readonly wasm_bindgen__convert__closures_____invoke__h09c21df9c40da302: (a: number, b: number, c: any, d: any) => void;
1111
1103
  readonly __wbindgen_malloc: (a: number, b: number) => number;
1112
1104
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;