@xmtp/wasm-bindings 1.6.0-dev.da83377 → 1.6.1-rc1

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.
@@ -229,51 +229,17 @@ function makeMutClosure(arg0, arg1, dtor, f) {
229
229
  return real;
230
230
  }
231
231
 
232
- function passArrayJsValueToWasm0(array, malloc) {
233
- const ptr = malloc(array.length * 4, 4) >>> 0;
234
- for (let i = 0; i < array.length; i++) {
235
- const add = addToExternrefTable0(array[i]);
236
- getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
237
- }
238
- WASM_VECTOR_LEN = array.length;
239
- return ptr;
240
- }
241
-
242
232
  function _assertClass(instance, klass) {
243
233
  if (!(instance instanceof klass)) {
244
234
  throw new Error(`expected instance of ${klass.name}`);
245
235
  }
246
236
  }
247
237
 
248
- function passArray8ToWasm0(arg, malloc) {
249
- const ptr = malloc(arg.length * 1, 1) >>> 0;
250
- getUint8ArrayMemory0().set(arg, ptr / 1);
251
- WASM_VECTOR_LEN = arg.length;
252
- return ptr;
253
- }
254
-
255
238
  function takeFromExternrefTable0(idx) {
256
239
  const value = wasm.__wbindgen_export_4.get(idx);
257
240
  wasm.__externref_table_dealloc(idx);
258
241
  return value;
259
242
  }
260
- /**
261
- * @param {string} v3_host
262
- * @param {string | null | undefined} gateway_host
263
- * @param {string[]} inbox_ids
264
- * @returns {Promise<InboxState[]>}
265
- */
266
- export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
267
- const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
268
- const len0 = WASM_VECTOR_LEN;
269
- var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
270
- var len1 = WASM_VECTOR_LEN;
271
- const ptr2 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
272
- const len2 = WASM_VECTOR_LEN;
273
- const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
274
- return ret;
275
- }
276
-
277
243
  /**
278
244
  * @param {Reaction} reaction
279
245
  * @returns {Uint8Array}
@@ -338,43 +304,6 @@ export function generateInboxId(accountIdentifier) {
338
304
  }
339
305
  }
340
306
 
341
- /**
342
- * @param {string} host
343
- * @param {string} inbox_id
344
- * @param {Identifier} account_identifier
345
- * @param {string | null} [db_path]
346
- * @param {Uint8Array | null} [encryption_key]
347
- * @param {string | null} [device_sync_server_url]
348
- * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
349
- * @param {LogOptions | null} [log_options]
350
- * @param {boolean | null} [allow_offline]
351
- * @param {boolean | null} [disable_events]
352
- * @param {string | null} [app_version]
353
- * @param {string | null} [gateway_host]
354
- * @returns {Promise<Client>}
355
- */
356
- 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, gateway_host) {
357
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
358
- const len0 = WASM_VECTOR_LEN;
359
- const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
360
- const len1 = WASM_VECTOR_LEN;
361
- var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
- var len2 = WASM_VECTOR_LEN;
363
- var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
364
- var len3 = WASM_VECTOR_LEN;
365
- let ptr4 = 0;
366
- if (!isLikeNone(log_options)) {
367
- _assertClass(log_options, LogOptions);
368
- ptr4 = log_options.__destroy_into_raw();
369
- }
370
- var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
371
- var len5 = WASM_VECTOR_LEN;
372
- var ptr6 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
373
- var len6 = WASM_VECTOR_LEN;
374
- 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, ptr6, len6);
375
- return ret;
376
- }
377
-
378
307
  /**
379
308
  * @param {string} signature_text
380
309
  * @param {Uint8Array} signature_bytes
@@ -389,6 +318,15 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
389
318
  }
390
319
  }
391
320
 
321
+ function passArrayJsValueToWasm0(array, malloc) {
322
+ const ptr = malloc(array.length * 4, 4) >>> 0;
323
+ for (let i = 0; i < array.length; i++) {
324
+ const add = addToExternrefTable0(array[i]);
325
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
326
+ }
327
+ WASM_VECTOR_LEN = array.length;
328
+ return ptr;
329
+ }
392
330
  /**
393
331
  * @param {string} v3_host
394
332
  * @param {string | null | undefined} gateway_host
@@ -429,6 +367,49 @@ export function applySignatureRequest(v3_host, gateway_host, signature_request)
429
367
  return ret;
430
368
  }
431
369
 
370
+ function passArray8ToWasm0(arg, malloc) {
371
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
372
+ getUint8ArrayMemory0().set(arg, ptr / 1);
373
+ WASM_VECTOR_LEN = arg.length;
374
+ return ptr;
375
+ }
376
+ /**
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
+ * @param {string | null} [app_version]
388
+ * @param {string | null} [gateway_host]
389
+ * @returns {Promise<Client>}
390
+ */
391
+ 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, gateway_host) {
392
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
393
+ const len0 = WASM_VECTOR_LEN;
394
+ const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
395
+ const len1 = WASM_VECTOR_LEN;
396
+ var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
397
+ var len2 = WASM_VECTOR_LEN;
398
+ var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
399
+ var len3 = WASM_VECTOR_LEN;
400
+ let ptr4 = 0;
401
+ if (!isLikeNone(log_options)) {
402
+ _assertClass(log_options, LogOptions);
403
+ ptr4 = log_options.__destroy_into_raw();
404
+ }
405
+ var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
406
+ var len5 = WASM_VECTOR_LEN;
407
+ var ptr6 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
408
+ var len6 = WASM_VECTOR_LEN;
409
+ 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, ptr6, len6);
410
+ return ret;
411
+ }
412
+
432
413
  /**
433
414
  * @param {MultiRemoteAttachment} multiRemoteAttachment
434
415
  * @returns {Uint8Array}
@@ -455,6 +436,23 @@ export function decodeMultiRemoteAttachment(bytes) {
455
436
  return MultiRemoteAttachment.__wrap(ret[0]);
456
437
  }
457
438
 
439
+ /**
440
+ * @param {string} v3_host
441
+ * @param {string | null | undefined} gateway_host
442
+ * @param {string[]} inbox_ids
443
+ * @returns {Promise<InboxState[]>}
444
+ */
445
+ export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
446
+ const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
+ const len0 = WASM_VECTOR_LEN;
448
+ var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
449
+ var len1 = WASM_VECTOR_LEN;
450
+ const ptr2 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
451
+ const len2 = WASM_VECTOR_LEN;
452
+ const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
453
+ return ret;
454
+ }
455
+
458
456
  /**
459
457
  * Entry point invoked by JavaScript in a worker.
460
458
  * @param {number} ptr
@@ -466,24 +464,24 @@ export function task_worker_entry_point(ptr) {
466
464
  }
467
465
  }
468
466
 
469
- function __wbg_adapter_6(arg0, arg1, arg2) {
470
- wasm.closure7014_externref_shim(arg0, arg1, arg2);
471
- }
472
-
473
- function __wbg_adapter_19(arg0, arg1) {
467
+ function __wbg_adapter_14(arg0, arg1) {
474
468
  wasm.wasm_bindgen__convert__closures_____invoke__h8d2688e22b07e25f(arg0, arg1);
475
469
  }
476
470
 
477
- function __wbg_adapter_28(arg0, arg1) {
471
+ function __wbg_adapter_21(arg0, arg1) {
478
472
  wasm.wasm_bindgen__convert__closures_____invoke__h040a93cf6078a98e(arg0, arg1);
479
473
  }
480
474
 
481
- function __wbg_adapter_33(arg0, arg1) {
475
+ function __wbg_adapter_24(arg0, arg1) {
482
476
  wasm.wasm_bindgen__convert__closures_____invoke__h6553f0a100c562a9(arg0, arg1);
483
477
  }
484
478
 
485
- function __wbg_adapter_938(arg0, arg1, arg2, arg3) {
486
- wasm.closure7982_externref_shim(arg0, arg1, arg2, arg3);
479
+ function __wbg_adapter_27(arg0, arg1, arg2) {
480
+ wasm.closure7152_externref_shim(arg0, arg1, arg2);
481
+ }
482
+
483
+ function __wbg_adapter_937(arg0, arg1, arg2, arg3) {
484
+ wasm.closure8118_externref_shim(arg0, arg1, arg2, arg3);
487
485
  }
488
486
 
489
487
  /**
@@ -534,13 +532,14 @@ export const DeliveryStatus = Object.freeze({
534
532
  Failed: 2, "2": "Failed",
535
533
  });
536
534
  /**
537
- * @enum {0 | 1 | 2 | 3}
535
+ * @enum {0 | 1 | 2 | 3 | 4}
538
536
  */
539
537
  export const GroupMembershipState = Object.freeze({
540
538
  Allowed: 0, "0": "Allowed",
541
539
  Rejected: 1, "1": "Rejected",
542
540
  Pending: 2, "2": "Pending",
543
541
  Restored: 3, "3": "Restored",
542
+ PendingRemove: 4, "4": "PendingRemove",
544
543
  });
545
544
  /**
546
545
  * @enum {0 | 1}
@@ -916,44 +915,100 @@ export class Client {
916
915
  wasm.__wbg_client_free(ptr, 0);
917
916
  }
918
917
  /**
919
- *
920
- * * Get the client's inbox state.
921
- * *
922
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
923
- * * Otherwise, the state will be read from the local database.
924
- *
925
- * @param {boolean} refresh_from_network
926
- * @returns {Promise<InboxState>}
918
+ * @returns {SignatureRequestHandle | undefined}
927
919
  */
928
- inboxState(refresh_from_network) {
929
- const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
920
+ createInboxSignatureRequest() {
921
+ const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
922
+ if (ret[2]) {
923
+ throw takeFromExternrefTable0(ret[1]);
924
+ }
925
+ return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
926
+ }
927
+ /**
928
+ * @param {Identifier} new_identifier
929
+ * @returns {Promise<SignatureRequestHandle>}
930
+ */
931
+ addWalletSignatureRequest(new_identifier) {
932
+ const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
930
933
  return ret;
931
934
  }
932
935
  /**
933
- * @param {string} inbox_id
934
- * @returns {Promise<InboxState>}
936
+ * @param {Identifier} identifier
937
+ * @returns {Promise<SignatureRequestHandle>}
935
938
  */
936
- getLatestInboxState(inbox_id) {
937
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
938
- const len0 = WASM_VECTOR_LEN;
939
- const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
939
+ revokeWalletSignatureRequest(identifier) {
940
+ const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
940
941
  return ret;
941
942
  }
942
943
  /**
943
- *
944
- * * Get key package statuses for a list of installation IDs.
945
- * *
946
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
947
- *
948
- * @param {string[]} installation_ids
949
- * @returns {Promise<any>}
944
+ * @returns {Promise<SignatureRequestHandle>}
950
945
  */
951
- getKeyPackageStatusesForInstallationIds(installation_ids) {
946
+ revokeAllOtherInstallationsSignatureRequest() {
947
+ const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
948
+ return ret;
949
+ }
950
+ /**
951
+ * @param {Uint8Array[]} installation_ids
952
+ * @returns {Promise<SignatureRequestHandle>}
953
+ */
954
+ revokeInstallationsSignatureRequest(installation_ids) {
952
955
  const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
953
956
  const len0 = WASM_VECTOR_LEN;
954
- const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
957
+ const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
958
+ return ret;
959
+ }
960
+ /**
961
+ * @param {Identifier} new_recovery_identifier
962
+ * @returns {Promise<SignatureRequestHandle>}
963
+ */
964
+ changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
965
+ const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
955
966
  return ret;
956
967
  }
968
+ /**
969
+ * @param {SignatureRequestHandle} signature_request
970
+ * @returns {Promise<void>}
971
+ */
972
+ applySignatureRequest(signature_request) {
973
+ _assertClass(signature_request, SignatureRequestHandle);
974
+ const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
975
+ return ret;
976
+ }
977
+ /**
978
+ * @param {SignatureRequestHandle} signature_request
979
+ * @returns {Promise<void>}
980
+ */
981
+ registerIdentity(signature_request) {
982
+ _assertClass(signature_request, SignatureRequestHandle);
983
+ var ptr0 = signature_request.__destroy_into_raw();
984
+ const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
985
+ return ret;
986
+ }
987
+ /**
988
+ * @param {string} signature_text
989
+ * @returns {Uint8Array}
990
+ */
991
+ signWithInstallationKey(signature_text) {
992
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
993
+ const len0 = WASM_VECTOR_LEN;
994
+ const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
995
+ if (ret[2]) {
996
+ throw takeFromExternrefTable0(ret[1]);
997
+ }
998
+ return takeFromExternrefTable0(ret[0]);
999
+ }
1000
+ /**
1001
+ * @param {string} signature_text
1002
+ * @param {Uint8Array} signature_bytes
1003
+ */
1004
+ verifySignedWithInstallationKey(signature_text, signature_bytes) {
1005
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1006
+ const len0 = WASM_VECTOR_LEN;
1007
+ const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
1008
+ if (ret[1]) {
1009
+ throw takeFromExternrefTable0(ret[0]);
1010
+ }
1011
+ }
957
1012
  /**
958
1013
  * @param {Consent[]} records
959
1014
  * @returns {Promise<void>}
@@ -1173,100 +1228,44 @@ export class Client {
1173
1228
  return ret;
1174
1229
  }
1175
1230
  /**
1176
- * @returns {SignatureRequestHandle | undefined}
1177
- */
1178
- createInboxSignatureRequest() {
1179
- const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
1180
- if (ret[2]) {
1181
- throw takeFromExternrefTable0(ret[1]);
1182
- }
1183
- return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
1184
- }
1185
- /**
1186
- * @param {Identifier} new_identifier
1187
- * @returns {Promise<SignatureRequestHandle>}
1188
- */
1189
- addWalletSignatureRequest(new_identifier) {
1190
- const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
1191
- return ret;
1192
- }
1193
- /**
1194
- * @param {Identifier} identifier
1195
- * @returns {Promise<SignatureRequestHandle>}
1231
+ *
1232
+ * * Get the client's inbox state.
1233
+ * *
1234
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1235
+ * * Otherwise, the state will be read from the local database.
1236
+ *
1237
+ * @param {boolean} refresh_from_network
1238
+ * @returns {Promise<InboxState>}
1196
1239
  */
1197
- revokeWalletSignatureRequest(identifier) {
1198
- const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
1240
+ inboxState(refresh_from_network) {
1241
+ const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
1199
1242
  return ret;
1200
1243
  }
1201
1244
  /**
1202
- * @returns {Promise<SignatureRequestHandle>}
1245
+ * @param {string} inbox_id
1246
+ * @returns {Promise<InboxState>}
1203
1247
  */
1204
- revokeAllOtherInstallationsSignatureRequest() {
1205
- const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
1248
+ getLatestInboxState(inbox_id) {
1249
+ const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1250
+ const len0 = WASM_VECTOR_LEN;
1251
+ const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1206
1252
  return ret;
1207
1253
  }
1208
1254
  /**
1209
- * @param {Uint8Array[]} installation_ids
1210
- * @returns {Promise<SignatureRequestHandle>}
1255
+ *
1256
+ * * Get key package statuses for a list of installation IDs.
1257
+ * *
1258
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1259
+ *
1260
+ * @param {string[]} installation_ids
1261
+ * @returns {Promise<any>}
1211
1262
  */
1212
- revokeInstallationsSignatureRequest(installation_ids) {
1263
+ getKeyPackageStatusesForInstallationIds(installation_ids) {
1213
1264
  const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1214
1265
  const len0 = WASM_VECTOR_LEN;
1215
- const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
1216
- return ret;
1217
- }
1218
- /**
1219
- * @param {Identifier} new_recovery_identifier
1220
- * @returns {Promise<SignatureRequestHandle>}
1221
- */
1222
- changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
1223
- const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
1224
- return ret;
1225
- }
1226
- /**
1227
- * @param {SignatureRequestHandle} signature_request
1228
- * @returns {Promise<void>}
1229
- */
1230
- applySignatureRequest(signature_request) {
1231
- _assertClass(signature_request, SignatureRequestHandle);
1232
- const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
1233
- return ret;
1234
- }
1235
- /**
1236
- * @param {SignatureRequestHandle} signature_request
1237
- * @returns {Promise<void>}
1238
- */
1239
- registerIdentity(signature_request) {
1240
- _assertClass(signature_request, SignatureRequestHandle);
1241
- var ptr0 = signature_request.__destroy_into_raw();
1242
- const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
1266
+ const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1243
1267
  return ret;
1244
1268
  }
1245
- /**
1246
- * @param {string} signature_text
1247
- * @returns {Uint8Array}
1248
- */
1249
- signWithInstallationKey(signature_text) {
1250
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1251
- const len0 = WASM_VECTOR_LEN;
1252
- const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
1253
- if (ret[2]) {
1254
- throw takeFromExternrefTable0(ret[1]);
1255
- }
1256
- return takeFromExternrefTable0(ret[0]);
1257
- }
1258
- /**
1259
- * @param {string} signature_text
1260
- * @param {Uint8Array} signature_bytes
1261
- */
1262
- verifySignedWithInstallationKey(signature_text, signature_bytes) {
1263
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1264
- const len0 = WASM_VECTOR_LEN;
1265
- const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
1266
- if (ret[1]) {
1267
- throw takeFromExternrefTable0(ret[0]);
1268
- }
1269
- }
1270
1269
  }
1271
1270
  if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
1272
1271
 
@@ -1341,7 +1340,7 @@ export class Consent {
1341
1340
  set entity(arg0) {
1342
1341
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1343
1342
  const len0 = WASM_VECTOR_LEN;
1344
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
1343
+ wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
1345
1344
  }
1346
1345
  /**
1347
1346
  * @param {ConsentEntityType} entity_type
@@ -3312,7 +3311,7 @@ export class GroupMember {
3312
3311
  set inboxId(arg0) {
3313
3312
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3314
3313
  const len0 = WASM_VECTOR_LEN;
3315
- wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
3314
+ wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
3316
3315
  }
3317
3316
  /**
3318
3317
  * @returns {Identifier[]}
@@ -3612,7 +3611,7 @@ export class GroupUpdated {
3612
3611
  set initiatedByInboxId(arg0) {
3613
3612
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3614
3613
  const len0 = WASM_VECTOR_LEN;
3615
- wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
3614
+ wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
3616
3615
  }
3617
3616
  /**
3618
3617
  * @returns {Inbox[]}
@@ -3851,7 +3850,7 @@ export class Inbox {
3851
3850
  set inboxId(arg0) {
3852
3851
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3853
3852
  const len0 = WASM_VECTOR_LEN;
3854
- wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
3853
+ wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
3855
3854
  }
3856
3855
  }
3857
3856
  if (Symbol.dispose) Inbox.prototype[Symbol.dispose] = Inbox.prototype.free;
@@ -3902,7 +3901,7 @@ export class InboxState {
3902
3901
  set inboxId(arg0) {
3903
3902
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3904
3903
  const len0 = WASM_VECTOR_LEN;
3905
- wasm.__wbg_set_inboxstate_inboxId(this.__wbg_ptr, ptr0, len0);
3904
+ wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
3906
3905
  }
3907
3906
  /**
3908
3907
  * @returns {Identifier}
@@ -5056,7 +5055,7 @@ export class MetadataFieldChange {
5056
5055
  set fieldName(arg0) {
5057
5056
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5058
5057
  const len0 = WASM_VECTOR_LEN;
5059
- wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
5058
+ wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
5060
5059
  }
5061
5060
  /**
5062
5061
  * @returns {string | undefined}
@@ -5514,7 +5513,7 @@ export class Reaction {
5514
5513
  set reference(arg0) {
5515
5514
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5516
5515
  const len0 = WASM_VECTOR_LEN;
5517
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
5516
+ wasm.__wbg_set_reaction_reference(this.__wbg_ptr, ptr0, len0);
5518
5517
  }
5519
5518
  /**
5520
5519
  * @returns {string}
@@ -5537,7 +5536,7 @@ export class Reaction {
5537
5536
  set referenceInboxId(arg0) {
5538
5537
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5539
5538
  const len0 = WASM_VECTOR_LEN;
5540
- wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
5539
+ wasm.__wbg_set_reaction_referenceInboxId(this.__wbg_ptr, ptr0, len0);
5541
5540
  }
5542
5541
  /**
5543
5542
  * @returns {ReactionAction}
@@ -5656,7 +5655,7 @@ export class ReactionPayload {
5656
5655
  set reference(arg0) {
5657
5656
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5658
5657
  const len0 = WASM_VECTOR_LEN;
5659
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
5658
+ wasm.__wbg_set_reaction_reference(this.__wbg_ptr, ptr0, len0);
5660
5659
  }
5661
5660
  /**
5662
5661
  * @returns {string}
@@ -5679,7 +5678,7 @@ export class ReactionPayload {
5679
5678
  set referenceInboxId(arg0) {
5680
5679
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5681
5680
  const len0 = WASM_VECTOR_LEN;
5682
- wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
5681
+ wasm.__wbg_set_reaction_referenceInboxId(this.__wbg_ptr, ptr0, len0);
5683
5682
  }
5684
5683
  /**
5685
5684
  * @returns {ReactionActionPayload}
@@ -5807,7 +5806,7 @@ export class RemoteAttachment {
5807
5806
  set url(arg0) {
5808
5807
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5809
5808
  const len0 = WASM_VECTOR_LEN;
5810
- wasm.__wbg_set_remoteattachment_url(this.__wbg_ptr, ptr0, len0);
5809
+ wasm.__wbg_set_conversationdebuginfo_forkDetails(this.__wbg_ptr, ptr0, len0);
5811
5810
  }
5812
5811
  /**
5813
5812
  * @returns {string}
@@ -5830,7 +5829,7 @@ export class RemoteAttachment {
5830
5829
  set contentDigest(arg0) {
5831
5830
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5832
5831
  const len0 = WASM_VECTOR_LEN;
5833
- wasm.__wbg_set_remoteattachment_contentDigest(this.__wbg_ptr, ptr0, len0);
5832
+ wasm.__wbg_set_conversationdebuginfo_localCommitLog(this.__wbg_ptr, ptr0, len0);
5834
5833
  }
5835
5834
  /**
5836
5835
  * @returns {Uint8Array}
@@ -5847,7 +5846,7 @@ export class RemoteAttachment {
5847
5846
  set secret(arg0) {
5848
5847
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
5849
5848
  const len0 = WASM_VECTOR_LEN;
5850
- wasm.__wbg_set_remoteattachment_secret(this.__wbg_ptr, ptr0, len0);
5849
+ wasm.__wbg_set_conversationdebuginfo_remoteCommitLog(this.__wbg_ptr, ptr0, len0);
5851
5850
  }
5852
5851
  /**
5853
5852
  * @returns {Uint8Array}
@@ -5910,14 +5909,14 @@ export class RemoteAttachment {
5910
5909
  * @returns {bigint}
5911
5910
  */
5912
5911
  get contentLength() {
5913
- const ret = wasm.__wbg_get_remoteattachment_contentLength(this.__wbg_ptr);
5912
+ const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
5914
5913
  return ret;
5915
5914
  }
5916
5915
  /**
5917
5916
  * @param {bigint} arg0
5918
5917
  */
5919
5918
  set contentLength(arg0) {
5920
- wasm.__wbg_set_remoteattachment_contentLength(this.__wbg_ptr, arg0);
5919
+ wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
5921
5920
  }
5922
5921
  /**
5923
5922
  * @returns {string | undefined}
@@ -6172,15 +6171,6 @@ export class SendMessageOpts {
6172
6171
  set shouldPush(arg0) {
6173
6172
  wasm.__wbg_set_sendmessageopts_shouldPush(this.__wbg_ptr, arg0);
6174
6173
  }
6175
- /**
6176
- * @param {boolean} should_push
6177
- */
6178
- constructor(should_push) {
6179
- const ret = wasm.sendmessageopts_new(should_push);
6180
- this.__wbg_ptr = ret >>> 0;
6181
- SendMessageOptsFinalization.register(this, this.__wbg_ptr, this);
6182
- return this;
6183
- }
6184
6174
  }
6185
6175
  if (Symbol.dispose) SendMessageOpts.prototype[Symbol.dispose] = SendMessageOpts.prototype.free;
6186
6176
 
@@ -6354,7 +6344,7 @@ export class TextContent {
6354
6344
  set content(arg0) {
6355
6345
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6356
6346
  const len0 = WASM_VECTOR_LEN;
6357
- wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
6347
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
6358
6348
  }
6359
6349
  }
6360
6350
  if (Symbol.dispose) TextContent.prototype[Symbol.dispose] = TextContent.prototype.free;
@@ -6405,7 +6395,7 @@ export class TransactionMetadata {
6405
6395
  set transactionType(arg0) {
6406
6396
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6407
6397
  const len0 = WASM_VECTOR_LEN;
6408
- wasm.__wbg_set_transactionmetadata_transactionType(this.__wbg_ptr, ptr0, len0);
6398
+ wasm.__wbg_set_conversationdebuginfo_forkDetails(this.__wbg_ptr, ptr0, len0);
6409
6399
  }
6410
6400
  /**
6411
6401
  * @returns {string}
@@ -6428,7 +6418,7 @@ export class TransactionMetadata {
6428
6418
  set currency(arg0) {
6429
6419
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6430
6420
  const len0 = WASM_VECTOR_LEN;
6431
- wasm.__wbg_set_transactionmetadata_currency(this.__wbg_ptr, ptr0, len0);
6421
+ wasm.__wbg_set_conversationdebuginfo_localCommitLog(this.__wbg_ptr, ptr0, len0);
6432
6422
  }
6433
6423
  /**
6434
6424
  * @returns {number}
@@ -6477,7 +6467,7 @@ export class TransactionMetadata {
6477
6467
  set fromAddress(arg0) {
6478
6468
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6479
6469
  const len0 = WASM_VECTOR_LEN;
6480
- wasm.__wbg_set_transactionmetadata_fromAddress(this.__wbg_ptr, ptr0, len0);
6470
+ wasm.__wbg_set_conversationdebuginfo_remoteCommitLog(this.__wbg_ptr, ptr0, len0);
6481
6471
  }
6482
6472
  /**
6483
6473
  * @returns {string}
@@ -6500,7 +6490,7 @@ export class TransactionMetadata {
6500
6490
  set toAddress(arg0) {
6501
6491
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6502
6492
  const len0 = WASM_VECTOR_LEN;
6503
- wasm.__wbg_set_transactionmetadata_toAddress(this.__wbg_ptr, ptr0, len0);
6493
+ wasm.__wbg_set_remoteattachment_salt(this.__wbg_ptr, ptr0, len0);
6504
6494
  }
6505
6495
  }
6506
6496
  if (Symbol.dispose) TransactionMetadata.prototype[Symbol.dispose] = TransactionMetadata.prototype.free;
@@ -7221,7 +7211,7 @@ function __wbg_get_imports() {
7221
7211
  const a = state0.a;
7222
7212
  state0.a = 0;
7223
7213
  try {
7224
- return __wbg_adapter_938(a, state0.b, arg0, arg1);
7214
+ return __wbg_adapter_937(a, state0.b, arg0, arg1);
7225
7215
  } finally {
7226
7216
  state0.a = a;
7227
7217
  }
@@ -7321,22 +7311,22 @@ function __wbg_get_imports() {
7321
7311
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
7322
7312
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
7323
7313
  };
7324
- imports.wbg.__wbg_onclose_7422fac0d15ba816 = function(arg0) {
7314
+ imports.wbg.__wbg_onclose_9d277338583535d0 = function(arg0) {
7325
7315
  arg0.on_close();
7326
7316
  };
7327
- imports.wbg.__wbg_onconsentupdate_1fde16f03b7fe79d = function(arg0, arg1) {
7317
+ imports.wbg.__wbg_onconsentupdate_29d0d04cc3ab6fb0 = function(arg0, arg1) {
7328
7318
  arg0.on_consent_update(arg1);
7329
7319
  };
7330
- imports.wbg.__wbg_onconversation_f27f15a5e1859b5c = function(arg0, arg1) {
7320
+ imports.wbg.__wbg_onconversation_5f6305fbafbfa5b3 = function(arg0, arg1) {
7331
7321
  arg0.on_conversation(Conversation.__wrap(arg1));
7332
7322
  };
7333
- imports.wbg.__wbg_onerror_58c8e2443560095b = function(arg0, arg1) {
7323
+ imports.wbg.__wbg_onerror_01f39d8e3616e274 = function(arg0, arg1) {
7334
7324
  arg0.on_error(arg1);
7335
7325
  };
7336
- imports.wbg.__wbg_onmessage_1fceb6d75cf0a1eb = function(arg0, arg1) {
7326
+ imports.wbg.__wbg_onmessage_b7e6250ad579b2f2 = function(arg0, arg1) {
7337
7327
  arg0.on_message(Message.__wrap(arg1));
7338
7328
  };
7339
- imports.wbg.__wbg_onuserpreferenceupdate_5b4ff69de2024e73 = function(arg0, arg1, arg2) {
7329
+ imports.wbg.__wbg_onuserpreferenceupdate_153f7585ec05ec1d = function(arg0, arg1, arg2) {
7340
7330
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
7341
7331
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
7342
7332
  arg0.on_user_preference_update(v0);
@@ -7720,14 +7710,19 @@ function __wbg_get_imports() {
7720
7710
  const ret = v0;
7721
7711
  return ret;
7722
7712
  };
7723
- imports.wbg.__wbindgen_cast_536121b45127786a = function(arg0, arg1) {
7724
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6990, function: Function { arguments: [], shim_idx: 6991, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7725
- const ret = makeMutClosure(arg0, arg1, 6990, __wbg_adapter_33);
7713
+ imports.wbg.__wbindgen_cast_53c92800d0d29e36 = function(arg0, arg1) {
7714
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 4890, function: Function { arguments: [], shim_idx: 4891, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7715
+ const ret = makeMutClosure(arg0, arg1, 4890, __wbg_adapter_14);
7716
+ return ret;
7717
+ };
7718
+ imports.wbg.__wbindgen_cast_6798c2a5eadbaf4c = function(arg0, arg1) {
7719
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 6731, function: Function { arguments: [], shim_idx: 6732, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7720
+ const ret = makeMutClosure(arg0, arg1, 6731, __wbg_adapter_21);
7726
7721
  return ret;
7727
7722
  };
7728
- imports.wbg.__wbindgen_cast_7924ea3df674d909 = function(arg0, arg1) {
7729
- // Cast intrinsic for `Closure(Closure { dtor_idx: 4753, function: Function { arguments: [], shim_idx: 4754, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7730
- const ret = makeMutClosure(arg0, arg1, 4753, __wbg_adapter_19);
7723
+ imports.wbg.__wbindgen_cast_8a5711609b1ed734 = function(arg0, arg1) {
7724
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7141, function: Function { arguments: [Externref], shim_idx: 7152, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7725
+ const ret = makeMutClosure(arg0, arg1, 7141, __wbg_adapter_27);
7731
7726
  return ret;
7732
7727
  };
7733
7728
  imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
@@ -7749,26 +7744,21 @@ function __wbg_get_imports() {
7749
7744
  const ret = arg0;
7750
7745
  return ret;
7751
7746
  };
7752
- imports.wbg.__wbindgen_cast_9ccb490273fba73e = function(arg0, arg1) {
7753
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7003, function: Function { arguments: [Externref], shim_idx: 7014, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7754
- const ret = makeMutClosure(arg0, arg1, 7003, __wbg_adapter_6);
7755
- return ret;
7756
- };
7757
7747
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
7758
7748
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
7759
7749
  const ret = getArrayU8FromWasm0(arg0, arg1);
7760
7750
  return ret;
7761
7751
  };
7762
- imports.wbg.__wbindgen_cast_cdd77e1d61f6b80f = function(arg0, arg1) {
7763
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6593, function: Function { arguments: [], shim_idx: 6594, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7764
- const ret = makeMutClosure(arg0, arg1, 6593, __wbg_adapter_28);
7765
- return ret;
7766
- };
7767
7752
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
7768
7753
  // Cast intrinsic for `F64 -> Externref`.
7769
7754
  const ret = arg0;
7770
7755
  return ret;
7771
7756
  };
7757
+ imports.wbg.__wbindgen_cast_dd692d1ee4d0d90d = function(arg0, arg1) {
7758
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7128, function: Function { arguments: [], shim_idx: 7129, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7759
+ const ret = makeMutClosure(arg0, arg1, 7128, __wbg_adapter_24);
7760
+ return ret;
7761
+ };
7772
7762
  imports.wbg.__wbindgen_cast_e081be35fe620ec4 = function(arg0, arg1) {
7773
7763
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
7774
7764
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);