@xmtp/wasm-bindings 1.3.4 → 1.3.5

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.
@@ -215,44 +215,44 @@ function debugString(val) {
215
215
  // TODO we could test for more things here, like `Set`s and `Map`s.
216
216
  return className;
217
217
  }
218
+
219
+ function _assertClass(instance, klass) {
220
+ if (!(instance instanceof klass)) {
221
+ throw new Error(`expected instance of ${klass.name}`);
222
+ }
223
+ }
218
224
  /**
219
225
  * @param {string} host
220
- * @param {Identifier} accountIdentifier
221
- * @returns {Promise<string | undefined>}
226
+ * @param {string} inbox_id
227
+ * @param {Identifier} account_identifier
228
+ * @param {string | null} [db_path]
229
+ * @param {Uint8Array | null} [encryption_key]
230
+ * @param {string | null} [device_sync_server_url]
231
+ * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
232
+ * @param {LogOptions | null} [log_options]
233
+ * @param {boolean | null} [allow_offline]
234
+ * @param {boolean | null} [disable_events]
235
+ * @param {string | null} [app_version]
236
+ * @returns {Promise<Client>}
222
237
  */
223
- export function getInboxIdForIdentifier(host, accountIdentifier) {
238
+ export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline, disable_events, app_version) {
224
239
  const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
225
240
  const len0 = WASM_VECTOR_LEN;
226
- const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
227
- return ret;
228
- }
229
-
230
- function takeFromExternrefTable0(idx) {
231
- const value = wasm.__wbindgen_export_4.get(idx);
232
- wasm.__externref_table_dealloc(idx);
233
- return value;
234
- }
235
- /**
236
- * @param {Identifier} accountIdentifier
237
- * @returns {string}
238
- */
239
- export function generateInboxId(accountIdentifier) {
240
- let deferred2_0;
241
- let deferred2_1;
242
- try {
243
- const ret = wasm.generateInboxId(accountIdentifier);
244
- var ptr1 = ret[0];
245
- var len1 = ret[1];
246
- if (ret[3]) {
247
- ptr1 = 0; len1 = 0;
248
- throw takeFromExternrefTable0(ret[2]);
249
- }
250
- deferred2_0 = ptr1;
251
- deferred2_1 = len1;
252
- return getStringFromWasm0(ptr1, len1);
253
- } finally {
254
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
241
+ const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
242
+ const len1 = WASM_VECTOR_LEN;
243
+ var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
244
+ var len2 = WASM_VECTOR_LEN;
245
+ var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
246
+ var len3 = WASM_VECTOR_LEN;
247
+ let ptr4 = 0;
248
+ if (!isLikeNone(log_options)) {
249
+ _assertClass(log_options, LogOptions);
250
+ ptr4 = log_options.__destroy_into_raw();
255
251
  }
252
+ var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
253
+ var len5 = WASM_VECTOR_LEN;
254
+ 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, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0, isLikeNone(disable_events) ? 0xFFFFFF : disable_events ? 1 : 0, ptr5, len5);
255
+ return ret;
256
256
  }
257
257
 
258
258
  function passArrayJsValueToWasm0(array, malloc) {
@@ -265,37 +265,11 @@ function passArrayJsValueToWasm0(array, malloc) {
265
265
  return ptr;
266
266
  }
267
267
 
268
- function _assertClass(instance, klass) {
269
- if (!(instance instanceof klass)) {
270
- throw new Error(`expected instance of ${klass.name}`);
271
- }
272
- }
273
- /**
274
- * @param {MultiRemoteAttachment} multiRemoteAttachment
275
- * @returns {Uint8Array}
276
- */
277
- export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
278
- _assertClass(multiRemoteAttachment, MultiRemoteAttachment);
279
- var ptr0 = multiRemoteAttachment.__destroy_into_raw();
280
- const ret = wasm.encodeMultiRemoteAttachment(ptr0);
281
- if (ret[2]) {
282
- throw takeFromExternrefTable0(ret[1]);
283
- }
284
- return takeFromExternrefTable0(ret[0]);
285
- }
286
-
287
- /**
288
- * @param {Uint8Array} bytes
289
- * @returns {MultiRemoteAttachment}
290
- */
291
- export function decodeMultiRemoteAttachment(bytes) {
292
- const ret = wasm.decodeMultiRemoteAttachment(bytes);
293
- if (ret[2]) {
294
- throw takeFromExternrefTable0(ret[1]);
295
- }
296
- return MultiRemoteAttachment.__wrap(ret[0]);
268
+ function takeFromExternrefTable0(idx) {
269
+ const value = wasm.__wbindgen_export_4.get(idx);
270
+ wasm.__externref_table_dealloc(idx);
271
+ return value;
297
272
  }
298
-
299
273
  /**
300
274
  * @param {Reaction} reaction
301
275
  * @returns {Uint8Array}
@@ -328,6 +302,20 @@ function passArray8ToWasm0(arg, malloc) {
328
302
  WASM_VECTOR_LEN = arg.length;
329
303
  return ptr;
330
304
  }
305
+ /**
306
+ * @param {string} host
307
+ * @param {string[]} inbox_ids
308
+ * @returns {Promise<InboxState[]>}
309
+ */
310
+ export function inboxStateFromInboxIds(host, inbox_ids) {
311
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
312
+ const len0 = WASM_VECTOR_LEN;
313
+ const ptr1 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
314
+ const len1 = WASM_VECTOR_LEN;
315
+ const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1);
316
+ return ret;
317
+ }
318
+
331
319
  /**
332
320
  * @param {string} signature_text
333
321
  * @param {Uint8Array} signature_bytes
@@ -374,50 +362,66 @@ export function applySignatureRequest(host, signature_request) {
374
362
  }
375
363
 
376
364
  /**
377
- * @param {string} host
378
- * @param {string} inbox_id
379
- * @param {Identifier} account_identifier
380
- * @param {string | null} [db_path]
381
- * @param {Uint8Array | null} [encryption_key]
382
- * @param {string | null} [device_sync_server_url]
383
- * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
384
- * @param {LogOptions | null} [log_options]
385
- * @param {boolean | null} [allow_offline]
386
- * @param {boolean | null} [disable_events]
387
- * @returns {Promise<Client>}
365
+ * @param {MultiRemoteAttachment} multiRemoteAttachment
366
+ * @returns {Uint8Array}
388
367
  */
389
- export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline, disable_events) {
390
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
391
- const len0 = WASM_VECTOR_LEN;
392
- const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
393
- const len1 = WASM_VECTOR_LEN;
394
- var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
395
- var len2 = WASM_VECTOR_LEN;
396
- var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
397
- var len3 = WASM_VECTOR_LEN;
398
- let ptr4 = 0;
399
- if (!isLikeNone(log_options)) {
400
- _assertClass(log_options, LogOptions);
401
- ptr4 = log_options.__destroy_into_raw();
368
+ export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
369
+ _assertClass(multiRemoteAttachment, MultiRemoteAttachment);
370
+ var ptr0 = multiRemoteAttachment.__destroy_into_raw();
371
+ const ret = wasm.encodeMultiRemoteAttachment(ptr0);
372
+ if (ret[2]) {
373
+ throw takeFromExternrefTable0(ret[1]);
402
374
  }
403
- 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, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0, isLikeNone(disable_events) ? 0xFFFFFF : disable_events ? 1 : 0);
404
- return ret;
375
+ return takeFromExternrefTable0(ret[0]);
376
+ }
377
+
378
+ /**
379
+ * @param {Uint8Array} bytes
380
+ * @returns {MultiRemoteAttachment}
381
+ */
382
+ export function decodeMultiRemoteAttachment(bytes) {
383
+ const ret = wasm.decodeMultiRemoteAttachment(bytes);
384
+ if (ret[2]) {
385
+ throw takeFromExternrefTable0(ret[1]);
386
+ }
387
+ return MultiRemoteAttachment.__wrap(ret[0]);
405
388
  }
406
389
 
407
390
  /**
408
391
  * @param {string} host
409
- * @param {string[]} inbox_ids
410
- * @returns {Promise<InboxState[]>}
392
+ * @param {Identifier} accountIdentifier
393
+ * @returns {Promise<string | undefined>}
411
394
  */
412
- export function inboxStateFromInboxIds(host, inbox_ids) {
395
+ export function getInboxIdForIdentifier(host, accountIdentifier) {
413
396
  const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
414
397
  const len0 = WASM_VECTOR_LEN;
415
- const ptr1 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
416
- const len1 = WASM_VECTOR_LEN;
417
- const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1);
398
+ const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
418
399
  return ret;
419
400
  }
420
401
 
402
+ /**
403
+ * @param {Identifier} accountIdentifier
404
+ * @returns {string}
405
+ */
406
+ export function generateInboxId(accountIdentifier) {
407
+ let deferred2_0;
408
+ let deferred2_1;
409
+ try {
410
+ const ret = wasm.generateInboxId(accountIdentifier);
411
+ var ptr1 = ret[0];
412
+ var len1 = ret[1];
413
+ if (ret[3]) {
414
+ ptr1 = 0; len1 = 0;
415
+ throw takeFromExternrefTable0(ret[2]);
416
+ }
417
+ deferred2_0 = ptr1;
418
+ deferred2_1 = len1;
419
+ return getStringFromWasm0(ptr1, len1);
420
+ } finally {
421
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
422
+ }
423
+ }
424
+
421
425
  /**
422
426
  * Entry point invoked by JavaScript in a worker.
423
427
  * @param {number} ptr
@@ -430,19 +434,19 @@ export function task_worker_entry_point(ptr) {
430
434
  }
431
435
 
432
436
  function __wbg_adapter_50(arg0, arg1) {
433
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h42782d8d6f6b94ef(arg0, arg1);
437
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h469745bf9f974f96(arg0, arg1);
434
438
  }
435
439
 
436
440
  function __wbg_adapter_53(arg0, arg1) {
437
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h912129f7a2cf8b7b(arg0, arg1);
441
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5db0b12f1fa1c9f(arg0, arg1);
438
442
  }
439
443
 
440
444
  function __wbg_adapter_56(arg0, arg1, arg2) {
441
- wasm.closure5049_externref_shim(arg0, arg1, arg2);
445
+ wasm.closure4980_externref_shim(arg0, arg1, arg2);
442
446
  }
443
447
 
444
- function __wbg_adapter_787(arg0, arg1, arg2, arg3) {
445
- wasm.closure5992_externref_shim(arg0, arg1, arg2, arg3);
448
+ function __wbg_adapter_785(arg0, arg1, arg2, arg3) {
449
+ wasm.closure5924_externref_shim(arg0, arg1, arg2, arg3);
446
450
  }
447
451
 
448
452
  /**
@@ -745,122 +749,6 @@ export class Client {
745
749
  const ptr = this.__destroy_into_raw();
746
750
  wasm.__wbg_client_free(ptr, 0);
747
751
  }
748
- /**
749
- * @param {Consent[]} records
750
- * @returns {Promise<void>}
751
- */
752
- setConsentStates(records) {
753
- const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
754
- const len0 = WASM_VECTOR_LEN;
755
- const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
756
- return ret;
757
- }
758
- /**
759
- * @param {ConsentEntityType} entity_type
760
- * @param {string} entity
761
- * @returns {Promise<ConsentState>}
762
- */
763
- getConsentState(entity_type, entity) {
764
- const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
765
- const len0 = WASM_VECTOR_LEN;
766
- const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
767
- return ret;
768
- }
769
- /**
770
- * @returns {SignatureRequestHandle | undefined}
771
- */
772
- createInboxSignatureRequest() {
773
- const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
774
- if (ret[2]) {
775
- throw takeFromExternrefTable0(ret[1]);
776
- }
777
- return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
778
- }
779
- /**
780
- * @param {Identifier} new_identifier
781
- * @returns {Promise<SignatureRequestHandle>}
782
- */
783
- addWalletSignatureRequest(new_identifier) {
784
- const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
785
- return ret;
786
- }
787
- /**
788
- * @param {Identifier} identifier
789
- * @returns {Promise<SignatureRequestHandle>}
790
- */
791
- revokeWalletSignatureRequest(identifier) {
792
- const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
793
- return ret;
794
- }
795
- /**
796
- * @returns {Promise<SignatureRequestHandle>}
797
- */
798
- revokeAllOtherInstallationsSignatureRequest() {
799
- const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
800
- return ret;
801
- }
802
- /**
803
- * @param {Uint8Array[]} installation_ids
804
- * @returns {Promise<SignatureRequestHandle>}
805
- */
806
- revokeInstallationsSignatureRequest(installation_ids) {
807
- const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
808
- const len0 = WASM_VECTOR_LEN;
809
- const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
810
- return ret;
811
- }
812
- /**
813
- * @param {Identifier} new_recovery_identifier
814
- * @returns {Promise<SignatureRequestHandle>}
815
- */
816
- changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
817
- const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
818
- return ret;
819
- }
820
- /**
821
- * @param {SignatureRequestHandle} signature_request
822
- * @returns {Promise<void>}
823
- */
824
- applySignatureRequest(signature_request) {
825
- _assertClass(signature_request, SignatureRequestHandle);
826
- const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
827
- return ret;
828
- }
829
- /**
830
- * @param {SignatureRequestHandle} signature_request
831
- * @returns {Promise<void>}
832
- */
833
- registerIdentity(signature_request) {
834
- _assertClass(signature_request, SignatureRequestHandle);
835
- var ptr0 = signature_request.__destroy_into_raw();
836
- const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
837
- return ret;
838
- }
839
- /**
840
- * @param {string} signature_text
841
- * @returns {Uint8Array}
842
- */
843
- signWithInstallationKey(signature_text) {
844
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
845
- const len0 = WASM_VECTOR_LEN;
846
- const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
847
- if (ret[2]) {
848
- throw takeFromExternrefTable0(ret[1]);
849
- }
850
- return takeFromExternrefTable0(ret[0]);
851
- }
852
- /**
853
- * @param {string} signature_text
854
- * @param {Uint8Array} signature_bytes
855
- */
856
- verifySignedWithInstallationKey(signature_text, signature_bytes) {
857
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
858
- const len0 = WASM_VECTOR_LEN;
859
- const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
860
- if (ret[1]) {
861
- throw takeFromExternrefTable0(ret[0]);
862
- }
863
- }
864
752
  /**
865
753
  * @returns {Identifier}
866
754
  */
@@ -912,6 +800,36 @@ export class Client {
912
800
  const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
913
801
  return ret;
914
802
  }
803
+ /**
804
+ * @returns {string}
805
+ */
806
+ get appVersion() {
807
+ let deferred1_0;
808
+ let deferred1_1;
809
+ try {
810
+ const ret = wasm.client_appVersion(this.__wbg_ptr);
811
+ deferred1_0 = ret[0];
812
+ deferred1_1 = ret[1];
813
+ return getStringFromWasm0(ret[0], ret[1]);
814
+ } finally {
815
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
816
+ }
817
+ }
818
+ /**
819
+ * @returns {string}
820
+ */
821
+ get libxmtpVersion() {
822
+ let deferred1_0;
823
+ let deferred1_1;
824
+ try {
825
+ const ret = wasm.client_libxmtpVersion(this.__wbg_ptr);
826
+ deferred1_0 = ret[0];
827
+ deferred1_1 = ret[1];
828
+ return getStringFromWasm0(ret[0], ret[1]);
829
+ } finally {
830
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
831
+ }
832
+ }
915
833
  /**
916
834
  * Output booleans should be zipped with the index of input identifiers
917
835
  * @param {Identifier[]} account_identifiers
@@ -1005,6 +923,27 @@ export class Client {
1005
923
  const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
1006
924
  return ret;
1007
925
  }
926
+ /**
927
+ * @param {Consent[]} records
928
+ * @returns {Promise<void>}
929
+ */
930
+ setConsentStates(records) {
931
+ const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
932
+ const len0 = WASM_VECTOR_LEN;
933
+ const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
934
+ return ret;
935
+ }
936
+ /**
937
+ * @param {ConsentEntityType} entity_type
938
+ * @param {string} entity
939
+ * @returns {Promise<ConsentState>}
940
+ */
941
+ getConsentState(entity_type, entity) {
942
+ const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
943
+ const len0 = WASM_VECTOR_LEN;
944
+ const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
945
+ return ret;
946
+ }
1008
947
  /**
1009
948
  *
1010
949
  * * Get the client's inbox state.
@@ -1044,6 +983,101 @@ export class Client {
1044
983
  const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1045
984
  return ret;
1046
985
  }
986
+ /**
987
+ * @returns {SignatureRequestHandle | undefined}
988
+ */
989
+ createInboxSignatureRequest() {
990
+ const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
991
+ if (ret[2]) {
992
+ throw takeFromExternrefTable0(ret[1]);
993
+ }
994
+ return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
995
+ }
996
+ /**
997
+ * @param {Identifier} new_identifier
998
+ * @returns {Promise<SignatureRequestHandle>}
999
+ */
1000
+ addWalletSignatureRequest(new_identifier) {
1001
+ const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
1002
+ return ret;
1003
+ }
1004
+ /**
1005
+ * @param {Identifier} identifier
1006
+ * @returns {Promise<SignatureRequestHandle>}
1007
+ */
1008
+ revokeWalletSignatureRequest(identifier) {
1009
+ const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
1010
+ return ret;
1011
+ }
1012
+ /**
1013
+ * @returns {Promise<SignatureRequestHandle>}
1014
+ */
1015
+ revokeAllOtherInstallationsSignatureRequest() {
1016
+ const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
1017
+ return ret;
1018
+ }
1019
+ /**
1020
+ * @param {Uint8Array[]} installation_ids
1021
+ * @returns {Promise<SignatureRequestHandle>}
1022
+ */
1023
+ revokeInstallationsSignatureRequest(installation_ids) {
1024
+ const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1025
+ const len0 = WASM_VECTOR_LEN;
1026
+ const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
1027
+ return ret;
1028
+ }
1029
+ /**
1030
+ * @param {Identifier} new_recovery_identifier
1031
+ * @returns {Promise<SignatureRequestHandle>}
1032
+ */
1033
+ changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
1034
+ const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
1035
+ return ret;
1036
+ }
1037
+ /**
1038
+ * @param {SignatureRequestHandle} signature_request
1039
+ * @returns {Promise<void>}
1040
+ */
1041
+ applySignatureRequest(signature_request) {
1042
+ _assertClass(signature_request, SignatureRequestHandle);
1043
+ const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
1044
+ return ret;
1045
+ }
1046
+ /**
1047
+ * @param {SignatureRequestHandle} signature_request
1048
+ * @returns {Promise<void>}
1049
+ */
1050
+ registerIdentity(signature_request) {
1051
+ _assertClass(signature_request, SignatureRequestHandle);
1052
+ var ptr0 = signature_request.__destroy_into_raw();
1053
+ const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
1054
+ return ret;
1055
+ }
1056
+ /**
1057
+ * @param {string} signature_text
1058
+ * @returns {Uint8Array}
1059
+ */
1060
+ signWithInstallationKey(signature_text) {
1061
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1062
+ const len0 = WASM_VECTOR_LEN;
1063
+ const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
1064
+ if (ret[2]) {
1065
+ throw takeFromExternrefTable0(ret[1]);
1066
+ }
1067
+ return takeFromExternrefTable0(ret[0]);
1068
+ }
1069
+ /**
1070
+ * @param {string} signature_text
1071
+ * @param {Uint8Array} signature_bytes
1072
+ */
1073
+ verifySignedWithInstallationKey(signature_text, signature_bytes) {
1074
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1075
+ const len0 = WASM_VECTOR_LEN;
1076
+ const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
1077
+ if (ret[1]) {
1078
+ throw takeFromExternrefTable0(ret[0]);
1079
+ }
1080
+ }
1047
1081
  }
1048
1082
 
1049
1083
  const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1810,14 +1844,14 @@ export class ConversationDebugInfo {
1810
1844
  * @returns {bigint}
1811
1845
  */
1812
1846
  get epoch() {
1813
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
1847
+ const ret = wasm.__wbg_get_apistats_upload_key_package(this.__wbg_ptr);
1814
1848
  return BigInt.asUintN(64, ret);
1815
1849
  }
1816
1850
  /**
1817
1851
  * @param {bigint} arg0
1818
1852
  */
1819
1853
  set epoch(arg0) {
1820
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
1854
+ wasm.__wbg_set_apistats_upload_key_package(this.__wbg_ptr, arg0);
1821
1855
  }
1822
1856
  /**
1823
1857
  * @returns {boolean}
@@ -1882,14 +1916,14 @@ export class ConversationDebugInfo {
1882
1916
  * @returns {bigint}
1883
1917
  */
1884
1918
  get cursor() {
1885
- const ret = wasm.__wbg_get_conversationdebuginfo_cursor(this.__wbg_ptr);
1919
+ const ret = wasm.__wbg_get_apistats_fetch_key_package(this.__wbg_ptr);
1886
1920
  return ret;
1887
1921
  }
1888
1922
  /**
1889
1923
  * @param {bigint} arg0
1890
1924
  */
1891
1925
  set cursor(arg0) {
1892
- wasm.__wbg_set_conversationdebuginfo_cursor(this.__wbg_ptr, arg0);
1926
+ wasm.__wbg_set_apistats_fetch_key_package(this.__wbg_ptr, arg0);
1893
1927
  }
1894
1928
  }
1895
1929
 
@@ -2811,14 +2845,14 @@ export class HmacKey {
2811
2845
  * @returns {bigint}
2812
2846
  */
2813
2847
  get epoch() {
2814
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
2848
+ const ret = wasm.__wbg_get_apistats_upload_key_package(this.__wbg_ptr);
2815
2849
  return ret;
2816
2850
  }
2817
2851
  /**
2818
2852
  * @param {bigint} arg0
2819
2853
  */
2820
2854
  set epoch(arg0) {
2821
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
2855
+ wasm.__wbg_set_apistats_upload_key_package(this.__wbg_ptr, arg0);
2822
2856
  }
2823
2857
  }
2824
2858
 
@@ -2947,7 +2981,7 @@ export class InboxState {
2947
2981
  set inboxId(arg0) {
2948
2982
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2949
2983
  const len0 = WASM_VECTOR_LEN;
2950
- wasm.__wbg_set_inboxstate_inboxId(this.__wbg_ptr, ptr0, len0);
2984
+ wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
2951
2985
  }
2952
2986
  /**
2953
2987
  * @returns {Identifier}
@@ -3082,7 +3116,7 @@ export class Installation {
3082
3116
  set id(arg0) {
3083
3117
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3084
3118
  const len0 = WASM_VECTOR_LEN;
3085
- wasm.__wbg_set_installation_id(this.__wbg_ptr, ptr0, len0);
3119
+ wasm.__wbg_set_conversationdebuginfo_forkDetails(this.__wbg_ptr, ptr0, len0);
3086
3120
  }
3087
3121
  /**
3088
3122
  * @returns {bigint | undefined}
@@ -3267,7 +3301,7 @@ export class KeyPackageStatus {
3267
3301
  * @returns {Lifetime | undefined}
3268
3302
  */
3269
3303
  get lifetime() {
3270
- const ret = wasm.__wbg_get_keypackagestatus_lifetime(this.__wbg_ptr);
3304
+ const ret = wasm.__wbg_get_createdmoptions_messageDisappearingSettings(this.__wbg_ptr);
3271
3305
  return ret === 0 ? undefined : Lifetime.__wrap(ret);
3272
3306
  }
3273
3307
  /**
@@ -3279,7 +3313,7 @@ export class KeyPackageStatus {
3279
3313
  _assertClass(arg0, Lifetime);
3280
3314
  ptr0 = arg0.__destroy_into_raw();
3281
3315
  }
3282
- wasm.__wbg_set_keypackagestatus_lifetime(this.__wbg_ptr, ptr0);
3316
+ wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
3283
3317
  }
3284
3318
  /**
3285
3319
  * @returns {string | undefined}
@@ -3417,7 +3451,7 @@ export class ListConversationsOptions {
3417
3451
  * @param {bigint | null} [arg0]
3418
3452
  */
3419
3453
  set createdAfterNs(arg0) {
3420
- wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3454
+ wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3421
3455
  }
3422
3456
  /**
3423
3457
  * @returns {bigint | undefined}
@@ -3524,7 +3558,7 @@ export class ListMessagesOptions {
3524
3558
  * @param {bigint | null} [arg0]
3525
3559
  */
3526
3560
  set sentBeforeNs(arg0) {
3527
- wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3561
+ wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
3528
3562
  }
3529
3563
  /**
3530
3564
  * @returns {bigint | undefined}
@@ -3746,14 +3780,14 @@ export class Message {
3746
3780
  * @returns {bigint}
3747
3781
  */
3748
3782
  get sentAtNs() {
3749
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
3783
+ const ret = wasm.__wbg_get_apistats_upload_key_package(this.__wbg_ptr);
3750
3784
  return ret;
3751
3785
  }
3752
3786
  /**
3753
3787
  * @param {bigint} arg0
3754
3788
  */
3755
3789
  set sentAtNs(arg0) {
3756
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
3790
+ wasm.__wbg_set_apistats_upload_key_package(this.__wbg_ptr, arg0);
3757
3791
  }
3758
3792
  /**
3759
3793
  * @returns {string}
@@ -3896,27 +3930,27 @@ export class MessageDisappearingSettings {
3896
3930
  * @returns {bigint}
3897
3931
  */
3898
3932
  get fromNs() {
3899
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
3933
+ const ret = wasm.__wbg_get_apistats_upload_key_package(this.__wbg_ptr);
3900
3934
  return ret;
3901
3935
  }
3902
3936
  /**
3903
3937
  * @param {bigint} arg0
3904
3938
  */
3905
3939
  set fromNs(arg0) {
3906
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
3940
+ wasm.__wbg_set_apistats_upload_key_package(this.__wbg_ptr, arg0);
3907
3941
  }
3908
3942
  /**
3909
3943
  * @returns {bigint}
3910
3944
  */
3911
3945
  get inNs() {
3912
- const ret = wasm.__wbg_get_conversationdebuginfo_cursor(this.__wbg_ptr);
3946
+ const ret = wasm.__wbg_get_apistats_fetch_key_package(this.__wbg_ptr);
3913
3947
  return ret;
3914
3948
  }
3915
3949
  /**
3916
3950
  * @param {bigint} arg0
3917
3951
  */
3918
3952
  set inNs(arg0) {
3919
- wasm.__wbg_set_conversationdebuginfo_cursor(this.__wbg_ptr, arg0);
3953
+ wasm.__wbg_set_apistats_fetch_key_package(this.__wbg_ptr, arg0);
3920
3954
  }
3921
3955
  /**
3922
3956
  * @param {bigint} from_ns
@@ -4618,7 +4652,7 @@ export class RemoteAttachmentInfo {
4618
4652
  set url(arg0) {
4619
4653
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4620
4654
  const len0 = WASM_VECTOR_LEN;
4621
- wasm.__wbg_set_conversationdebuginfo_localCommitLog(this.__wbg_ptr, ptr0, len0);
4655
+ wasm.__wbg_set_remoteattachmentinfo_url(this.__wbg_ptr, ptr0, len0);
4622
4656
  }
4623
4657
  /**
4624
4658
  * @returns {Uint8Array}
@@ -4916,7 +4950,7 @@ function __wbg_get_imports() {
4916
4950
  const ret = clearInterval(arg0);
4917
4951
  return ret;
4918
4952
  };
4919
- imports.wbg.__wbg_clearTimeout_121ece162c044c80 = function(arg0) {
4953
+ imports.wbg.__wbg_clearTimeout_0b53d391c1b94dda = function(arg0) {
4920
4954
  const ret = clearTimeout(arg0);
4921
4955
  return ret;
4922
4956
  };
@@ -5020,7 +5054,7 @@ function __wbg_get_imports() {
5020
5054
  imports.wbg.__wbg_error_e98c298703cffa97 = function(arg0, arg1) {
5021
5055
  console.error(getStringFromWasm0(arg0, arg1));
5022
5056
  };
5023
- imports.wbg.__wbg_fetch_43e69ddf509149f8 = function(arg0) {
5057
+ imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function(arg0) {
5024
5058
  const ret = fetch(arg0);
5025
5059
  return ret;
5026
5060
  };
@@ -5075,10 +5109,10 @@ function __wbg_get_imports() {
5075
5109
  const ret = arg0.getMonth();
5076
5110
  return ret;
5077
5111
  };
5078
- imports.wbg.__wbg_getRandomValues_3136dfb92779283b = function() { return handleError(function (arg0, arg1) {
5112
+ imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
5079
5113
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
5080
5114
  }, arguments) };
5081
- imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
5115
+ imports.wbg.__wbg_getRandomValues_6a045a3b2ebf24ca = function() { return handleError(function (arg0, arg1) {
5082
5116
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
5083
5117
  }, arguments) };
5084
5118
  imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
@@ -5315,7 +5349,7 @@ function __wbg_get_imports() {
5315
5349
  const a = state0.a;
5316
5350
  state0.a = 0;
5317
5351
  try {
5318
- return __wbg_adapter_787(a, state0.b, arg0, arg1);
5352
+ return __wbg_adapter_785(a, state0.b, arg0, arg1);
5319
5353
  } finally {
5320
5354
  state0.a = a;
5321
5355
  }
@@ -5370,10 +5404,6 @@ function __wbg_get_imports() {
5370
5404
  const ret = new Function(getStringFromWasm0(arg0, arg1));
5371
5405
  return ret;
5372
5406
  };
5373
- imports.wbg.__wbg_newwithbase_161c299e7a34e2eb = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5374
- const ret = new URL(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
5375
- return ret;
5376
- }, arguments) };
5377
5407
  imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
5378
5408
  const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
5379
5409
  return ret;
@@ -5414,46 +5444,39 @@ function __wbg_get_imports() {
5414
5444
  const ret = arg0.now();
5415
5445
  return ret;
5416
5446
  };
5417
- imports.wbg.__wbg_now_807e54c39636c349 = function() {
5418
- const ret = Date.now();
5419
- return ret;
5420
- };
5421
- imports.wbg.__wbg_now_8acb9b4a8cf17365 = function(arg0) {
5447
+ imports.wbg.__wbg_now_683d7b91b94bab7e = function(arg0) {
5422
5448
  const ret = globalThis.performance.now();
5423
5449
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
5424
5450
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
5425
5451
  };
5452
+ imports.wbg.__wbg_now_807e54c39636c349 = function() {
5453
+ const ret = Date.now();
5454
+ return ret;
5455
+ };
5426
5456
  imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {
5427
5457
  const ret = arg0.now();
5428
5458
  return ret;
5429
5459
  };
5430
- imports.wbg.__wbg_onclose_8bf7ba8a4a849c92 = function(arg0) {
5460
+ imports.wbg.__wbg_onclose_a9f796841c1a29f2 = function(arg0) {
5431
5461
  arg0.on_close();
5432
5462
  };
5433
- imports.wbg.__wbg_onconsentupdate_930b2bf861ef07ed = function(arg0, arg1) {
5463
+ imports.wbg.__wbg_onconsentupdate_c62bfe942ceafce6 = function(arg0, arg1) {
5434
5464
  arg0.on_consent_update(arg1);
5435
5465
  };
5436
- imports.wbg.__wbg_onconversation_930ef848b11b5567 = function(arg0, arg1) {
5466
+ imports.wbg.__wbg_onconversation_1096518febd6d077 = function(arg0, arg1) {
5437
5467
  arg0.on_conversation(Conversation.__wrap(arg1));
5438
5468
  };
5439
- imports.wbg.__wbg_onerror_93b1a65a545ad640 = function(arg0, arg1) {
5469
+ imports.wbg.__wbg_onerror_541be1bbcfd71e2b = function(arg0, arg1) {
5440
5470
  arg0.on_error(arg1);
5441
5471
  };
5442
- imports.wbg.__wbg_onmessage_6280dbb99367eae7 = function(arg0, arg1) {
5472
+ imports.wbg.__wbg_onmessage_3f9a2b0832eeb414 = function(arg0, arg1) {
5443
5473
  arg0.on_message(Message.__wrap(arg1));
5444
5474
  };
5445
- imports.wbg.__wbg_onuserpreferenceupdate_2961886528c86197 = function(arg0, arg1, arg2) {
5475
+ imports.wbg.__wbg_onuserpreferenceupdate_1018cdb398602922 = function(arg0, arg1, arg2) {
5446
5476
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
5447
5477
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
5448
5478
  arg0.on_user_preference_update(v0);
5449
5479
  };
5450
- imports.wbg.__wbg_pathname_9b0b04c4e19316d0 = function(arg0, arg1) {
5451
- const ret = arg1.pathname;
5452
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5453
- const len1 = WASM_VECTOR_LEN;
5454
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5455
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5456
- };
5457
5480
  imports.wbg.__wbg_performance_121b9855d716e029 = function() {
5458
5481
  const ret = globalThis.performance;
5459
5482
  return ret;
@@ -5529,6 +5552,10 @@ function __wbg_get_imports() {
5529
5552
  const ret = setInterval(arg0, arg1);
5530
5553
  return ret;
5531
5554
  }, arguments) };
5555
+ imports.wbg.__wbg_setTimeout_73ce8df12de4f2f2 = function(arg0, arg1) {
5556
+ const ret = setTimeout(arg0, arg1);
5557
+ return ret;
5558
+ };
5532
5559
  imports.wbg.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
5533
5560
  globalThis.setTimeout(arg0, arg1);
5534
5561
  };
@@ -5536,10 +5563,6 @@ function __wbg_get_imports() {
5536
5563
  const ret = setTimeout(arg0, arg1);
5537
5564
  return ret;
5538
5565
  }, arguments) };
5539
- imports.wbg.__wbg_setTimeout_e64b2910d9d7169a = function(arg0, arg1) {
5540
- const ret = setTimeout(arg0, arg1);
5541
- return ret;
5542
- };
5543
5566
  imports.wbg.__wbg_setUint32_ad8826b8caeaf63d = function(arg0, arg1, arg2) {
5544
5567
  arg0.setUint32(arg1 >>> 0, arg2 >>> 0);
5545
5568
  };
@@ -5735,16 +5758,16 @@ function __wbg_get_imports() {
5735
5758
  const ret = false;
5736
5759
  return ret;
5737
5760
  };
5738
- imports.wbg.__wbindgen_closure_wrapper18914 = function(arg0, arg1, arg2) {
5739
- const ret = makeMutClosure(arg0, arg1, 4691, __wbg_adapter_50);
5761
+ imports.wbg.__wbindgen_closure_wrapper19576 = function(arg0, arg1, arg2) {
5762
+ const ret = makeMutClosure(arg0, arg1, 4664, __wbg_adapter_50);
5740
5763
  return ret;
5741
5764
  };
5742
- imports.wbg.__wbindgen_closure_wrapper21502 = function(arg0, arg1, arg2) {
5743
- const ret = makeMutClosure(arg0, arg1, 5026, __wbg_adapter_53);
5765
+ imports.wbg.__wbindgen_closure_wrapper21727 = function(arg0, arg1, arg2) {
5766
+ const ret = makeMutClosure(arg0, arg1, 4957, __wbg_adapter_53);
5744
5767
  return ret;
5745
5768
  };
5746
- imports.wbg.__wbindgen_closure_wrapper22229 = function(arg0, arg1, arg2) {
5747
- const ret = makeMutClosure(arg0, arg1, 5050, __wbg_adapter_56);
5769
+ imports.wbg.__wbindgen_closure_wrapper22376 = function(arg0, arg1, arg2) {
5770
+ const ret = makeMutClosure(arg0, arg1, 4981, __wbg_adapter_56);
5748
5771
  return ret;
5749
5772
  };
5750
5773
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {