@xmtp/wasm-bindings 1.2.0-rc1 → 1.2.0-rc3

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.
@@ -224,51 +224,11 @@ function passArrayJsValueToWasm0(array, malloc) {
224
224
  return ptr;
225
225
  }
226
226
 
227
- function takeFromExternrefTable0(idx) {
228
- const value = wasm.__wbindgen_export_4.get(idx);
229
- wasm.__externref_table_dealloc(idx);
230
- return value;
231
- }
232
-
233
227
  function _assertClass(instance, klass) {
234
228
  if (!(instance instanceof klass)) {
235
229
  throw new Error(`expected instance of ${klass.name}`);
236
230
  }
237
231
  }
238
- /**
239
- * @param {string} host
240
- * @param {Identifier} accountIdentifier
241
- * @returns {Promise<string | undefined>}
242
- */
243
- export function getInboxIdForIdentifier(host, accountIdentifier) {
244
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
245
- const len0 = WASM_VECTOR_LEN;
246
- const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
247
- return ret;
248
- }
249
-
250
- /**
251
- * @param {Identifier} accountIdentifier
252
- * @returns {string}
253
- */
254
- export function generateInboxId(accountIdentifier) {
255
- let deferred2_0;
256
- let deferred2_1;
257
- try {
258
- const ret = wasm.generateInboxId(accountIdentifier);
259
- var ptr1 = ret[0];
260
- var len1 = ret[1];
261
- if (ret[3]) {
262
- ptr1 = 0; len1 = 0;
263
- throw takeFromExternrefTable0(ret[2]);
264
- }
265
- deferred2_0 = ptr1;
266
- deferred2_1 = len1;
267
- return getStringFromWasm0(ptr1, len1);
268
- } finally {
269
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
270
- }
271
- }
272
232
 
273
233
  function passArray8ToWasm0(arg, malloc) {
274
234
  const ptr = malloc(arg.length * 1, 1) >>> 0;
@@ -276,35 +236,12 @@ function passArray8ToWasm0(arg, malloc) {
276
236
  WASM_VECTOR_LEN = arg.length;
277
237
  return ptr;
278
238
  }
279
- /**
280
- * @param {string} host
281
- * @param {string} inbox_id
282
- * @param {Identifier} account_identifier
283
- * @param {string | null} [db_path]
284
- * @param {Uint8Array | null} [encryption_key]
285
- * @param {string | null} [device_sync_server_url]
286
- * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
287
- * @param {LogOptions | null} [log_options]
288
- * @returns {Promise<Client>}
289
- */
290
- export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
291
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
292
- const len0 = WASM_VECTOR_LEN;
293
- const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294
- const len1 = WASM_VECTOR_LEN;
295
- var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
296
- var len2 = WASM_VECTOR_LEN;
297
- var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
298
- var len3 = WASM_VECTOR_LEN;
299
- let ptr4 = 0;
300
- if (!isLikeNone(log_options)) {
301
- _assertClass(log_options, LogOptions);
302
- ptr4 = log_options.__destroy_into_raw();
303
- }
304
- const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4);
305
- return ret;
306
- }
307
239
 
240
+ function takeFromExternrefTable0(idx) {
241
+ const value = wasm.__wbindgen_export_4.get(idx);
242
+ wasm.__externref_table_dealloc(idx);
243
+ return value;
244
+ }
308
245
  /**
309
246
  * @param {MultiRemoteAttachment} multiRemoteAttachment
310
247
  * @returns {Uint8Array}
@@ -371,6 +308,70 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
371
308
  }
372
309
  }
373
310
 
311
+ /**
312
+ * @param {string} host
313
+ * @param {string} inbox_id
314
+ * @param {Identifier} account_identifier
315
+ * @param {string | null} [db_path]
316
+ * @param {Uint8Array | null} [encryption_key]
317
+ * @param {string | null} [device_sync_server_url]
318
+ * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
319
+ * @param {LogOptions | null} [log_options]
320
+ * @returns {Promise<Client>}
321
+ */
322
+ export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options) {
323
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
324
+ const len0 = WASM_VECTOR_LEN;
325
+ const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
326
+ const len1 = WASM_VECTOR_LEN;
327
+ var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
328
+ var len2 = WASM_VECTOR_LEN;
329
+ var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
330
+ var len3 = WASM_VECTOR_LEN;
331
+ let ptr4 = 0;
332
+ if (!isLikeNone(log_options)) {
333
+ _assertClass(log_options, LogOptions);
334
+ ptr4 = log_options.__destroy_into_raw();
335
+ }
336
+ const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4);
337
+ return ret;
338
+ }
339
+
340
+ /**
341
+ * @param {string} host
342
+ * @param {Identifier} accountIdentifier
343
+ * @returns {Promise<string | undefined>}
344
+ */
345
+ export function getInboxIdForIdentifier(host, accountIdentifier) {
346
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
347
+ const len0 = WASM_VECTOR_LEN;
348
+ const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
349
+ return ret;
350
+ }
351
+
352
+ /**
353
+ * @param {Identifier} accountIdentifier
354
+ * @returns {string}
355
+ */
356
+ export function generateInboxId(accountIdentifier) {
357
+ let deferred2_0;
358
+ let deferred2_1;
359
+ try {
360
+ const ret = wasm.generateInboxId(accountIdentifier);
361
+ var ptr1 = ret[0];
362
+ var len1 = ret[1];
363
+ if (ret[3]) {
364
+ ptr1 = 0; len1 = 0;
365
+ throw takeFromExternrefTable0(ret[2]);
366
+ }
367
+ deferred2_0 = ptr1;
368
+ deferred2_1 = len1;
369
+ return getStringFromWasm0(ptr1, len1);
370
+ } finally {
371
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
372
+ }
373
+ }
374
+
374
375
  function __wbg_adapter_50(arg0, arg1) {
375
376
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6040dd5f55152215(arg0, arg1);
376
377
  }
@@ -380,20 +381,20 @@ function __wbg_adapter_53(arg0, arg1) {
380
381
  }
381
382
 
382
383
  function __wbg_adapter_56(arg0, arg1, arg2) {
383
- wasm.closure4460_externref_shim(arg0, arg1, arg2);
384
+ wasm.closure4459_externref_shim(arg0, arg1, arg2);
384
385
  }
385
386
 
386
387
  function __wbg_adapter_59(arg0, arg1) {
387
388
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f45197f24caef5a(arg0, arg1);
388
389
  }
389
390
 
390
- function __wbg_adapter_652(arg0, arg1, arg2, arg3, arg4) {
391
- const ret = wasm.closure5467_externref_shim(arg0, arg1, arg2, arg3, arg4);
391
+ function __wbg_adapter_650(arg0, arg1, arg2, arg3, arg4) {
392
+ const ret = wasm.closure5466_externref_shim(arg0, arg1, arg2, arg3, arg4);
392
393
  return ret !== 0;
393
394
  }
394
395
 
395
- function __wbg_adapter_753(arg0, arg1, arg2, arg3) {
396
- wasm.closure5466_externref_shim(arg0, arg1, arg2, arg3);
396
+ function __wbg_adapter_751(arg0, arg1, arg2, arg3) {
397
+ wasm.closure5465_externref_shim(arg0, arg1, arg2, arg3);
397
398
  }
398
399
 
399
400
  /**
@@ -576,65 +577,124 @@ export class Client {
576
577
  wasm.__wbg_client_free(ptr, 0);
577
578
  }
578
579
  /**
579
- * @param {Consent[]} records
580
- * @returns {Promise<void>}
580
+ * @returns {string | undefined}
581
581
  */
582
- setConsentStates(records) {
583
- const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
584
- const len0 = WASM_VECTOR_LEN;
585
- const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
586
- return ret;
582
+ createInboxSignatureText() {
583
+ const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
584
+ if (ret[3]) {
585
+ throw takeFromExternrefTable0(ret[2]);
586
+ }
587
+ let v1;
588
+ if (ret[0] !== 0) {
589
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
590
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
591
+ }
592
+ return v1;
587
593
  }
588
594
  /**
589
- * @param {ConsentEntityType} entity_type
590
- * @param {string} entity
591
- * @returns {Promise<ConsentState>}
595
+ * @param {Identifier} new_identifier
596
+ * @returns {Promise<string>}
592
597
  */
593
- getConsentState(entity_type, entity) {
594
- const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
595
- const len0 = WASM_VECTOR_LEN;
596
- const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
598
+ addWalletSignatureText(new_identifier) {
599
+ const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
597
600
  return ret;
598
601
  }
599
602
  /**
600
- *
601
- * * Get the client's inbox state.
602
- * *
603
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
604
- * * Otherwise, the state will be read from the local database.
605
- *
606
- * @param {boolean} refresh_from_network
607
- * @returns {Promise<InboxState>}
603
+ * @param {Identifier} identifier
604
+ * @returns {Promise<string>}
608
605
  */
609
- inboxState(refresh_from_network) {
610
- const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
606
+ revokeWalletSignatureText(identifier) {
607
+ const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
611
608
  return ret;
612
609
  }
613
610
  /**
614
- * @param {string} inbox_id
615
- * @returns {Promise<InboxState>}
611
+ * @returns {Promise<string>}
616
612
  */
617
- getLatestInboxState(inbox_id) {
618
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
619
- const len0 = WASM_VECTOR_LEN;
620
- const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
613
+ revokeAllOtherInstallationsSignatureText() {
614
+ const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
621
615
  return ret;
622
616
  }
623
617
  /**
624
- *
625
- * * Get key package statuses for a list of installation IDs.
626
- * *
627
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
628
- *
629
- * @param {string[]} installation_ids
630
- * @returns {Promise<any>}
618
+ * @param {Uint8Array[]} installation_ids
619
+ * @returns {Promise<string>}
631
620
  */
632
- getKeyPackageStatusesForInstallationIds(installation_ids) {
621
+ revokeInstallationsSignatureText(installation_ids) {
633
622
  const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
634
623
  const len0 = WASM_VECTOR_LEN;
635
- const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
624
+ const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
625
+ return ret;
626
+ }
627
+ /**
628
+ * @param {Identifier} new_recovery_identifier
629
+ * @returns {Promise<string>}
630
+ */
631
+ changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
632
+ const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
633
+ return ret;
634
+ }
635
+ /**
636
+ * @param {SignatureRequestType} signature_type
637
+ * @param {Uint8Array} signature_bytes
638
+ * @returns {Promise<void>}
639
+ */
640
+ addEcdsaSignature(signature_type, signature_bytes) {
641
+ const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
642
+ return ret;
643
+ }
644
+ /**
645
+ * @param {SignatureRequestType} signature_type
646
+ * @param {PasskeySignature} signature
647
+ * @returns {Promise<void>}
648
+ */
649
+ addPasskeySignature(signature_type, signature) {
650
+ _assertClass(signature, PasskeySignature);
651
+ var ptr0 = signature.__destroy_into_raw();
652
+ const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
653
+ return ret;
654
+ }
655
+ /**
656
+ * @param {SignatureRequestType} signature_type
657
+ * @param {Uint8Array} signature_bytes
658
+ * @param {bigint} chain_id
659
+ * @param {bigint | null} [block_number]
660
+ * @returns {Promise<void>}
661
+ */
662
+ addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
663
+ const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
636
664
  return ret;
637
665
  }
666
+ /**
667
+ * @returns {Promise<void>}
668
+ */
669
+ applySignatureRequests() {
670
+ const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
671
+ return ret;
672
+ }
673
+ /**
674
+ * @param {string} signature_text
675
+ * @returns {Uint8Array}
676
+ */
677
+ signWithInstallationKey(signature_text) {
678
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
679
+ const len0 = WASM_VECTOR_LEN;
680
+ const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
681
+ if (ret[2]) {
682
+ throw takeFromExternrefTable0(ret[1]);
683
+ }
684
+ return takeFromExternrefTable0(ret[0]);
685
+ }
686
+ /**
687
+ * @param {string} signature_text
688
+ * @param {Uint8Array} signature_bytes
689
+ */
690
+ verifySignedWithInstallationKey(signature_text, signature_bytes) {
691
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
692
+ const len0 = WASM_VECTOR_LEN;
693
+ const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
694
+ if (ret[1]) {
695
+ throw takeFromExternrefTable0(ret[0]);
696
+ }
697
+ }
638
698
  /**
639
699
  * @returns {Identifier}
640
700
  */
@@ -745,123 +805,64 @@ export class Client {
745
805
  return ret;
746
806
  }
747
807
  /**
748
- * @returns {string | undefined}
749
- */
750
- createInboxSignatureText() {
751
- const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
752
- if (ret[3]) {
753
- throw takeFromExternrefTable0(ret[2]);
754
- }
755
- let v1;
756
- if (ret[0] !== 0) {
757
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
758
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
759
- }
760
- return v1;
761
- }
762
- /**
763
- * @param {Identifier} new_identifier
764
- * @returns {Promise<string>}
765
- */
766
- addWalletSignatureText(new_identifier) {
767
- const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, new_identifier);
768
- return ret;
769
- }
770
- /**
771
- * @param {Identifier} identifier
772
- * @returns {Promise<string>}
773
- */
774
- revokeWalletSignatureText(identifier) {
775
- const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, identifier);
776
- return ret;
777
- }
778
- /**
779
- * @returns {Promise<string>}
780
- */
781
- revokeAllOtherInstallationsSignatureText() {
782
- const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
783
- return ret;
784
- }
785
- /**
786
- * @param {Uint8Array[]} installation_ids
787
- * @returns {Promise<string>}
788
- */
789
- revokeInstallationsSignatureText(installation_ids) {
790
- const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
791
- const len0 = WASM_VECTOR_LEN;
792
- const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
793
- return ret;
794
- }
795
- /**
796
- * @param {Identifier} new_recovery_identifier
797
- * @returns {Promise<string>}
798
- */
799
- changeRecoveryIdentifierSignatureText(new_recovery_identifier) {
800
- const ret = wasm.client_changeRecoveryIdentifierSignatureText(this.__wbg_ptr, new_recovery_identifier);
801
- return ret;
802
- }
803
- /**
804
- * @param {SignatureRequestType} signature_type
805
- * @param {Uint8Array} signature_bytes
806
- * @returns {Promise<void>}
807
- */
808
- addEcdsaSignature(signature_type, signature_bytes) {
809
- const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
810
- return ret;
811
- }
812
- /**
813
- * @param {SignatureRequestType} signature_type
814
- * @param {PasskeySignature} signature
808
+ * @param {Consent[]} records
815
809
  * @returns {Promise<void>}
816
810
  */
817
- addPasskeySignature(signature_type, signature) {
818
- _assertClass(signature, PasskeySignature);
819
- var ptr0 = signature.__destroy_into_raw();
820
- const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
811
+ setConsentStates(records) {
812
+ const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
813
+ const len0 = WASM_VECTOR_LEN;
814
+ const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
821
815
  return ret;
822
816
  }
823
817
  /**
824
- * @param {SignatureRequestType} signature_type
825
- * @param {Uint8Array} signature_bytes
826
- * @param {bigint} chain_id
827
- * @param {bigint | null} [block_number]
828
- * @returns {Promise<void>}
818
+ * @param {ConsentEntityType} entity_type
819
+ * @param {string} entity
820
+ * @returns {Promise<ConsentState>}
829
821
  */
830
- addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
831
- const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
822
+ getConsentState(entity_type, entity) {
823
+ const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
824
+ const len0 = WASM_VECTOR_LEN;
825
+ const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
832
826
  return ret;
833
827
  }
834
828
  /**
835
- * @returns {Promise<void>}
829
+ *
830
+ * * Get the client's inbox state.
831
+ * *
832
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
833
+ * * Otherwise, the state will be read from the local database.
834
+ *
835
+ * @param {boolean} refresh_from_network
836
+ * @returns {Promise<InboxState>}
836
837
  */
837
- applySignatureRequests() {
838
- const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
838
+ inboxState(refresh_from_network) {
839
+ const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
839
840
  return ret;
840
841
  }
841
842
  /**
842
- * @param {string} signature_text
843
- * @returns {Uint8Array}
843
+ * @param {string} inbox_id
844
+ * @returns {Promise<InboxState>}
844
845
  */
845
- signWithInstallationKey(signature_text) {
846
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
846
+ getLatestInboxState(inbox_id) {
847
+ const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
847
848
  const len0 = WASM_VECTOR_LEN;
848
- const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
849
- if (ret[2]) {
850
- throw takeFromExternrefTable0(ret[1]);
851
- }
852
- return takeFromExternrefTable0(ret[0]);
849
+ const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
850
+ return ret;
853
851
  }
854
852
  /**
855
- * @param {string} signature_text
856
- * @param {Uint8Array} signature_bytes
853
+ *
854
+ * * Get key package statuses for a list of installation IDs.
855
+ * *
856
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
857
+ *
858
+ * @param {string[]} installation_ids
859
+ * @returns {Promise<any>}
857
860
  */
858
- verifySignedWithInstallationKey(signature_text, signature_bytes) {
859
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
861
+ getKeyPackageStatusesForInstallationIds(installation_ids) {
862
+ const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
860
863
  const len0 = WASM_VECTOR_LEN;
861
- const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
862
- if (ret[1]) {
863
- throw takeFromExternrefTable0(ret[0]);
864
- }
864
+ const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
865
+ return ret;
865
866
  }
866
867
  }
867
868
 
@@ -1935,38 +1936,6 @@ export class Conversations {
1935
1936
  }
1936
1937
  return takeFromExternrefTable0(ret[0]);
1937
1938
  }
1938
- /**
1939
- * @param {ListConversationsOptions | null} [opts]
1940
- * @returns {Array<any>}
1941
- */
1942
- listGroups(opts) {
1943
- let ptr0 = 0;
1944
- if (!isLikeNone(opts)) {
1945
- _assertClass(opts, ListConversationsOptions);
1946
- ptr0 = opts.__destroy_into_raw();
1947
- }
1948
- const ret = wasm.conversations_listGroups(this.__wbg_ptr, ptr0);
1949
- if (ret[2]) {
1950
- throw takeFromExternrefTable0(ret[1]);
1951
- }
1952
- return takeFromExternrefTable0(ret[0]);
1953
- }
1954
- /**
1955
- * @param {ListConversationsOptions | null} [opts]
1956
- * @returns {Array<any>}
1957
- */
1958
- listDms(opts) {
1959
- let ptr0 = 0;
1960
- if (!isLikeNone(opts)) {
1961
- _assertClass(opts, ListConversationsOptions);
1962
- ptr0 = opts.__destroy_into_raw();
1963
- }
1964
- const ret = wasm.conversations_listDms(this.__wbg_ptr, ptr0);
1965
- if (ret[2]) {
1966
- throw takeFromExternrefTable0(ret[1]);
1967
- }
1968
- return takeFromExternrefTable0(ret[0]);
1969
- }
1970
1939
  /**
1971
1940
  * @returns {any}
1972
1941
  */
@@ -1989,28 +1958,6 @@ export class Conversations {
1989
1958
  }
1990
1959
  return StreamCloser.__wrap(ret[0]);
1991
1960
  }
1992
- /**
1993
- * @param {any} callback
1994
- * @returns {StreamCloser}
1995
- */
1996
- streamGroups(callback) {
1997
- const ret = wasm.conversations_streamGroups(this.__wbg_ptr, callback);
1998
- if (ret[2]) {
1999
- throw takeFromExternrefTable0(ret[1]);
2000
- }
2001
- return StreamCloser.__wrap(ret[0]);
2002
- }
2003
- /**
2004
- * @param {any} callback
2005
- * @returns {StreamCloser}
2006
- */
2007
- streamDms(callback) {
2008
- const ret = wasm.conversations_streamDms(this.__wbg_ptr, callback);
2009
- if (ret[2]) {
2010
- throw takeFromExternrefTable0(ret[1]);
2011
- }
2012
- return StreamCloser.__wrap(ret[0]);
2013
- }
2014
1961
  /**
2015
1962
  * @param {any} callback
2016
1963
  * @param {ConversationType | null} [conversation_type]
@@ -3141,6 +3088,19 @@ export class ListConversationsOptions {
3141
3088
  var len0 = WASM_VECTOR_LEN;
3142
3089
  wasm.__wbg_set_listconversationsoptions_consentStates(this.__wbg_ptr, ptr0, len0);
3143
3090
  }
3091
+ /**
3092
+ * @returns {ConversationType | undefined}
3093
+ */
3094
+ get conversationType() {
3095
+ const ret = wasm.__wbg_get_listconversationsoptions_conversationType(this.__wbg_ptr);
3096
+ return ret === 3 ? undefined : ret;
3097
+ }
3098
+ /**
3099
+ * @param {ConversationType | null} [arg0]
3100
+ */
3101
+ set conversationType(arg0) {
3102
+ wasm.__wbg_set_listconversationsoptions_conversationType(this.__wbg_ptr, isLikeNone(arg0) ? 3 : arg0);
3103
+ }
3144
3104
  /**
3145
3105
  * @returns {bigint | undefined}
3146
3106
  */
@@ -3168,17 +3128,17 @@ export class ListConversationsOptions {
3168
3128
  wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3169
3129
  }
3170
3130
  /**
3171
- * @returns {boolean}
3131
+ * @returns {boolean | undefined}
3172
3132
  */
3173
3133
  get includeDuplicateDms() {
3174
3134
  const ret = wasm.__wbg_get_listconversationsoptions_includeDuplicateDms(this.__wbg_ptr);
3175
- return ret !== 0;
3135
+ return ret === 0xFFFFFF ? undefined : ret !== 0;
3176
3136
  }
3177
3137
  /**
3178
- * @param {boolean} arg0
3138
+ * @param {boolean | null} [arg0]
3179
3139
  */
3180
3140
  set includeDuplicateDms(arg0) {
3181
- wasm.__wbg_set_listconversationsoptions_includeDuplicateDms(this.__wbg_ptr, arg0);
3141
+ wasm.__wbg_set_listconversationsoptions_includeDuplicateDms(this.__wbg_ptr, isLikeNone(arg0) ? 0xFFFFFF : arg0 ? 1 : 0);
3182
3142
  }
3183
3143
  /**
3184
3144
  * @returns {bigint | undefined}
@@ -3194,16 +3154,17 @@ export class ListConversationsOptions {
3194
3154
  wasm.__wbg_set_listconversationsoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3195
3155
  }
3196
3156
  /**
3197
- * @param {any[] | null | undefined} consent_states
3198
- * @param {bigint | null | undefined} created_after_ns
3199
- * @param {bigint | null | undefined} created_before_ns
3200
- * @param {boolean} include_duplicate_dms
3157
+ * @param {any[] | null} [consent_states]
3158
+ * @param {ConversationType | null} [conversation_type]
3159
+ * @param {bigint | null} [created_after_ns]
3160
+ * @param {bigint | null} [created_before_ns]
3161
+ * @param {boolean | null} [include_duplicate_dms]
3201
3162
  * @param {bigint | null} [limit]
3202
3163
  */
3203
- constructor(consent_states, created_after_ns, created_before_ns, include_duplicate_dms, limit) {
3164
+ constructor(consent_states, conversation_type, created_after_ns, created_before_ns, include_duplicate_dms, limit) {
3204
3165
  var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
3205
3166
  var len0 = WASM_VECTOR_LEN;
3206
- const ret = wasm.listconversationsoptions_new(ptr0, len0, !isLikeNone(created_after_ns), isLikeNone(created_after_ns) ? BigInt(0) : created_after_ns, !isLikeNone(created_before_ns), isLikeNone(created_before_ns) ? BigInt(0) : created_before_ns, include_duplicate_dms, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit);
3167
+ const ret = wasm.listconversationsoptions_new(ptr0, len0, isLikeNone(conversation_type) ? 3 : conversation_type, !isLikeNone(created_after_ns), isLikeNone(created_after_ns) ? BigInt(0) : created_after_ns, !isLikeNone(created_before_ns), isLikeNone(created_before_ns) ? BigInt(0) : created_before_ns, isLikeNone(include_duplicate_dms) ? 0xFFFFFF : include_duplicate_dms ? 1 : 0, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit);
3207
3168
  this.__wbg_ptr = ret >>> 0;
3208
3169
  ListConversationsOptionsFinalization.register(this, this.__wbg_ptr, this);
3209
3170
  return this;
@@ -3258,7 +3219,7 @@ export class ListMessagesOptions {
3258
3219
  * @param {bigint | null} [arg0]
3259
3220
  */
3260
3221
  set sentBeforeNs(arg0) {
3261
- wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3222
+ wasm.__wbg_set_listmessagesoptions_sentBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3262
3223
  }
3263
3224
  /**
3264
3225
  * @returns {bigint | undefined}
@@ -3271,7 +3232,7 @@ export class ListMessagesOptions {
3271
3232
  * @param {bigint | null} [arg0]
3272
3233
  */
3273
3234
  set sentAfterNs(arg0) {
3274
- wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3235
+ wasm.__wbg_set_listmessagesoptions_sentAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3275
3236
  }
3276
3237
  /**
3277
3238
  * @returns {bigint | undefined}
@@ -3284,7 +3245,7 @@ export class ListMessagesOptions {
3284
3245
  * @param {bigint | null} [arg0]
3285
3246
  */
3286
3247
  set limit(arg0) {
3287
- wasm.__wbg_set_listconversationsoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3248
+ wasm.__wbg_set_listmessagesoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3288
3249
  }
3289
3250
  /**
3290
3251
  * @returns {DeliveryStatus | undefined}
@@ -3480,14 +3441,14 @@ export class Message {
3480
3441
  * @returns {bigint}
3481
3442
  */
3482
3443
  get sentAtNs() {
3483
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
3444
+ const ret = wasm.__wbg_get_message_sentAtNs(this.__wbg_ptr);
3484
3445
  return ret;
3485
3446
  }
3486
3447
  /**
3487
3448
  * @param {bigint} arg0
3488
3449
  */
3489
3450
  set sentAtNs(arg0) {
3490
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
3451
+ wasm.__wbg_set_message_sentAtNs(this.__wbg_ptr, arg0);
3491
3452
  }
3492
3453
  /**
3493
3454
  * @returns {string}
@@ -4132,7 +4093,7 @@ export class Reaction {
4132
4093
  set reference(arg0) {
4133
4094
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4134
4095
  const len0 = WASM_VECTOR_LEN;
4135
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
4096
+ wasm.__wbg_set_reaction_reference(this.__wbg_ptr, ptr0, len0);
4136
4097
  }
4137
4098
  /**
4138
4099
  * @returns {string}
@@ -4155,7 +4116,7 @@ export class Reaction {
4155
4116
  set referenceInboxId(arg0) {
4156
4117
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4157
4118
  const len0 = WASM_VECTOR_LEN;
4158
- wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
4119
+ wasm.__wbg_set_reaction_referenceInboxId(this.__wbg_ptr, ptr0, len0);
4159
4120
  }
4160
4121
  /**
4161
4122
  * @returns {ReactionAction}
@@ -4699,7 +4660,7 @@ function __wbg_get_imports() {
4699
4660
  const a = state0.a;
4700
4661
  state0.a = 0;
4701
4662
  try {
4702
- return __wbg_adapter_652(a, state0.b, arg0, arg1, arg2);
4663
+ return __wbg_adapter_650(a, state0.b, arg0, arg1, arg2);
4703
4664
  } finally {
4704
4665
  state0.a = a;
4705
4666
  }
@@ -4729,7 +4690,7 @@ function __wbg_get_imports() {
4729
4690
  const a = state0.a;
4730
4691
  state0.a = 0;
4731
4692
  try {
4732
- return __wbg_adapter_652(a, state0.b, arg0, arg1, arg2);
4693
+ return __wbg_adapter_650(a, state0.b, arg0, arg1, arg2);
4733
4694
  } finally {
4734
4695
  state0.a = a;
4735
4696
  }
@@ -5054,7 +5015,7 @@ function __wbg_get_imports() {
5054
5015
  const a = state0.a;
5055
5016
  state0.a = 0;
5056
5017
  try {
5057
- return __wbg_adapter_753(a, state0.b, arg0, arg1);
5018
+ return __wbg_adapter_751(a, state0.b, arg0, arg1);
5058
5019
  } finally {
5059
5020
  state0.a = a;
5060
5021
  }
@@ -5161,19 +5122,19 @@ function __wbg_get_imports() {
5161
5122
  const ret = arg0.now();
5162
5123
  return ret;
5163
5124
  };
5164
- imports.wbg.__wbg_onconsentupdate_5a23153c4da12d2f = function(arg0, arg1) {
5125
+ imports.wbg.__wbg_onconsentupdate_54b444121968ec54 = function(arg0, arg1) {
5165
5126
  arg0.on_consent_update(arg1);
5166
5127
  };
5167
- imports.wbg.__wbg_onconversation_31b65a43349398a1 = function(arg0, arg1) {
5128
+ imports.wbg.__wbg_onconversation_04d5bcbf4cf0aca0 = function(arg0, arg1) {
5168
5129
  arg0.on_conversation(Conversation.__wrap(arg1));
5169
5130
  };
5170
- imports.wbg.__wbg_onerror_f9ea1c3816616b61 = function(arg0, arg1) {
5131
+ imports.wbg.__wbg_onerror_74a216da3c9154ed = function(arg0, arg1) {
5171
5132
  arg0.on_error(arg1);
5172
5133
  };
5173
- imports.wbg.__wbg_onmessage_c4f143e88c048184 = function(arg0, arg1) {
5134
+ imports.wbg.__wbg_onmessage_027fcf9b1c8f68e9 = function(arg0, arg1) {
5174
5135
  arg0.on_message(Message.__wrap(arg1));
5175
5136
  };
5176
- imports.wbg.__wbg_onuserpreferenceupdate_df90cad511ab99f8 = function(arg0, arg1, arg2) {
5137
+ imports.wbg.__wbg_onuserpreferenceupdate_b0f871f854fe68fd = function(arg0, arg1, arg2) {
5177
5138
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
5178
5139
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
5179
5140
  arg0.on_user_preference_update(v0);
@@ -5469,20 +5430,20 @@ function __wbg_get_imports() {
5469
5430
  const ret = false;
5470
5431
  return ret;
5471
5432
  };
5472
- imports.wbg.__wbindgen_closure_wrapper17267 = function(arg0, arg1, arg2) {
5433
+ imports.wbg.__wbindgen_closure_wrapper17265 = function(arg0, arg1, arg2) {
5473
5434
  const ret = makeMutClosure(arg0, arg1, 4093, __wbg_adapter_50);
5474
5435
  return ret;
5475
5436
  };
5476
- imports.wbg.__wbindgen_closure_wrapper17311 = function(arg0, arg1, arg2) {
5437
+ imports.wbg.__wbindgen_closure_wrapper17309 = function(arg0, arg1, arg2) {
5477
5438
  const ret = makeMutClosure(arg0, arg1, 4103, __wbg_adapter_53);
5478
5439
  return ret;
5479
5440
  };
5480
- imports.wbg.__wbindgen_closure_wrapper20525 = function(arg0, arg1, arg2) {
5481
- const ret = makeMutClosure(arg0, arg1, 4461, __wbg_adapter_56);
5441
+ imports.wbg.__wbindgen_closure_wrapper20550 = function(arg0, arg1, arg2) {
5442
+ const ret = makeMutClosure(arg0, arg1, 4460, __wbg_adapter_56);
5482
5443
  return ret;
5483
5444
  };
5484
- imports.wbg.__wbindgen_closure_wrapper20646 = function(arg0, arg1, arg2) {
5485
- const ret = makeMutClosure(arg0, arg1, 4475, __wbg_adapter_59);
5445
+ imports.wbg.__wbindgen_closure_wrapper20671 = function(arg0, arg1, arg2) {
5446
+ const ret = makeMutClosure(arg0, arg1, 4474, __wbg_adapter_59);
5486
5447
  return ret;
5487
5448
  };
5488
5449
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {