@xmtp/wasm-bindings 1.6.2 → 1.6.8

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.
@@ -225,9 +225,22 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
 
228
- function _assertClass(instance, klass) {
229
- if (!(instance instanceof klass)) {
230
- throw new Error(`expected instance of ${klass.name}`);
228
+ function takeFromExternrefTable0(idx) {
229
+ const value = wasm.__wbindgen_externrefs.get(idx);
230
+ wasm.__externref_table_dealloc(idx);
231
+ return value;
232
+ }
233
+ /**
234
+ * @param {string} signature_text
235
+ * @param {Uint8Array} signature_bytes
236
+ * @param {Uint8Array} public_key
237
+ */
238
+ export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
239
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
240
+ const len0 = WASM_VECTOR_LEN;
241
+ const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
242
+ if (ret[1]) {
243
+ throw takeFromExternrefTable0(ret[0]);
231
244
  }
232
245
  }
233
246
 
@@ -240,6 +253,51 @@ function passArrayJsValueToWasm0(array, malloc) {
240
253
  WASM_VECTOR_LEN = array.length;
241
254
  return ptr;
242
255
  }
256
+ /**
257
+ * @param {string} v3_host
258
+ * @param {string | null | undefined} gateway_host
259
+ * @param {Identifier} recovery_identifier
260
+ * @param {string} inbox_id
261
+ * @param {Uint8Array[]} installation_ids
262
+ * @returns {SignatureRequestHandle}
263
+ */
264
+ export function revokeInstallationsSignatureRequest(v3_host, gateway_host, recovery_identifier, inbox_id, installation_ids) {
265
+ const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
266
+ const len0 = WASM_VECTOR_LEN;
267
+ var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
268
+ var len1 = WASM_VECTOR_LEN;
269
+ const ptr2 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
270
+ const len2 = WASM_VECTOR_LEN;
271
+ const ptr3 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
272
+ const len3 = WASM_VECTOR_LEN;
273
+ const ret = wasm.revokeInstallationsSignatureRequest(ptr0, len0, ptr1, len1, recovery_identifier, ptr2, len2, ptr3, len3);
274
+ if (ret[2]) {
275
+ throw takeFromExternrefTable0(ret[1]);
276
+ }
277
+ return SignatureRequestHandle.__wrap(ret[0]);
278
+ }
279
+
280
+ function _assertClass(instance, klass) {
281
+ if (!(instance instanceof klass)) {
282
+ throw new Error(`expected instance of ${klass.name}`);
283
+ }
284
+ }
285
+ /**
286
+ * @param {string} v3_host
287
+ * @param {string | null | undefined} gateway_host
288
+ * @param {SignatureRequestHandle} signature_request
289
+ * @returns {Promise<void>}
290
+ */
291
+ export function applySignatureRequest(v3_host, gateway_host, signature_request) {
292
+ const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
293
+ const len0 = WASM_VECTOR_LEN;
294
+ var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
295
+ var len1 = WASM_VECTOR_LEN;
296
+ _assertClass(signature_request, SignatureRequestHandle);
297
+ const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
298
+ return ret;
299
+ }
300
+
243
301
  /**
244
302
  * @param {string} v3_host
245
303
  * @param {string | null | undefined} gateway_host
@@ -257,38 +315,26 @@ export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
257
315
  return ret;
258
316
  }
259
317
 
260
- function takeFromExternrefTable0(idx) {
261
- const value = wasm.__wbindgen_externrefs.get(idx);
262
- wasm.__externref_table_dealloc(idx);
263
- return value;
264
- }
265
-
266
- function passArray8ToWasm0(arg, malloc) {
267
- const ptr = malloc(arg.length * 1, 1) >>> 0;
268
- getUint8ArrayMemory0().set(arg, ptr / 1);
269
- WASM_VECTOR_LEN = arg.length;
270
- return ptr;
271
- }
272
318
  /**
273
319
  * @param {Uint8Array} bytes
274
- * @returns {Reply}
320
+ * @returns {LeaveRequest}
275
321
  */
276
- export function decodeReply(bytes) {
277
- const ret = wasm.decodeReply(bytes);
322
+ export function decodeLeaveRequest(bytes) {
323
+ const ret = wasm.decodeLeaveRequest(bytes);
278
324
  if (ret[2]) {
279
325
  throw takeFromExternrefTable0(ret[1]);
280
326
  }
281
- return Reply.__wrap(ret[0]);
327
+ return LeaveRequest.__wrap(ret[0]);
282
328
  }
283
329
 
284
330
  /**
285
- * @param {Reply} reply
331
+ * @param {LeaveRequest} leaveRequest
286
332
  * @returns {Uint8Array}
287
333
  */
288
- export function encodeReply(reply) {
289
- _assertClass(reply, Reply);
290
- var ptr0 = reply.__destroy_into_raw();
291
- const ret = wasm.encodeReply(ptr0);
334
+ export function encodeLeaveRequest(leaveRequest) {
335
+ _assertClass(leaveRequest, LeaveRequest);
336
+ var ptr0 = leaveRequest.__destroy_into_raw();
337
+ const ret = wasm.encodeLeaveRequest(ptr0);
292
338
  if (ret[2]) {
293
339
  throw takeFromExternrefTable0(ret[1]);
294
340
  }
@@ -296,13 +342,25 @@ export function encodeReply(reply) {
296
342
  }
297
343
 
298
344
  /**
299
- * @param {Actions} actions
345
+ * @param {Uint8Array} bytes
346
+ * @returns {MultiRemoteAttachment}
347
+ */
348
+ export function decodeMultiRemoteAttachment(bytes) {
349
+ const ret = wasm.decodeMultiRemoteAttachment(bytes);
350
+ if (ret[2]) {
351
+ throw takeFromExternrefTable0(ret[1]);
352
+ }
353
+ return MultiRemoteAttachment.__wrap(ret[0]);
354
+ }
355
+
356
+ /**
357
+ * @param {MultiRemoteAttachment} multiRemoteAttachment
300
358
  * @returns {Uint8Array}
301
359
  */
302
- export function encodeActions(actions) {
303
- _assertClass(actions, Actions);
304
- var ptr0 = actions.__destroy_into_raw();
305
- const ret = wasm.encodeActions(ptr0);
360
+ export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
361
+ _assertClass(multiRemoteAttachment, MultiRemoteAttachment);
362
+ var ptr0 = multiRemoteAttachment.__destroy_into_raw();
363
+ const ret = wasm.encodeMultiRemoteAttachment(ptr0);
306
364
  if (ret[2]) {
307
365
  throw takeFromExternrefTable0(ret[1]);
308
366
  }
@@ -322,13 +380,27 @@ export function decodeActions(bytes) {
322
380
  }
323
381
 
324
382
  /**
325
- * @param {MultiRemoteAttachment} multiRemoteAttachment
383
+ * @param {Actions} actions
326
384
  * @returns {Uint8Array}
327
385
  */
328
- export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
329
- _assertClass(multiRemoteAttachment, MultiRemoteAttachment);
330
- var ptr0 = multiRemoteAttachment.__destroy_into_raw();
331
- const ret = wasm.encodeMultiRemoteAttachment(ptr0);
386
+ export function encodeActions(actions) {
387
+ _assertClass(actions, Actions);
388
+ var ptr0 = actions.__destroy_into_raw();
389
+ const ret = wasm.encodeActions(ptr0);
390
+ if (ret[2]) {
391
+ throw takeFromExternrefTable0(ret[1]);
392
+ }
393
+ return takeFromExternrefTable0(ret[0]);
394
+ }
395
+
396
+ /**
397
+ * @param {Reaction} reaction
398
+ * @returns {Uint8Array}
399
+ */
400
+ export function encodeReaction(reaction) {
401
+ _assertClass(reaction, Reaction);
402
+ var ptr0 = reaction.__destroy_into_raw();
403
+ const ret = wasm.encodeReaction(ptr0);
332
404
  if (ret[2]) {
333
405
  throw takeFromExternrefTable0(ret[1]);
334
406
  }
@@ -337,14 +409,66 @@ export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
337
409
 
338
410
  /**
339
411
  * @param {Uint8Array} bytes
340
- * @returns {MultiRemoteAttachment}
412
+ * @returns {Reaction}
341
413
  */
342
- export function decodeMultiRemoteAttachment(bytes) {
343
- const ret = wasm.decodeMultiRemoteAttachment(bytes);
414
+ export function decodeReaction(bytes) {
415
+ const ret = wasm.decodeReaction(bytes);
344
416
  if (ret[2]) {
345
417
  throw takeFromExternrefTable0(ret[1]);
346
418
  }
347
- return MultiRemoteAttachment.__wrap(ret[0]);
419
+ return Reaction.__wrap(ret[0]);
420
+ }
421
+
422
+ function passArray8ToWasm0(arg, malloc) {
423
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
424
+ getUint8ArrayMemory0().set(arg, ptr / 1);
425
+ WASM_VECTOR_LEN = arg.length;
426
+ return ptr;
427
+ }
428
+ /**
429
+ * @param {string} host
430
+ * @param {string} inbox_id
431
+ * @param {Identifier} account_identifier
432
+ * @param {string | null} [db_path]
433
+ * @param {Uint8Array | null} [encryption_key]
434
+ * @param {string | null} [device_sync_server_url]
435
+ * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
436
+ * @param {LogOptions | null} [log_options]
437
+ * @param {boolean | null} [allow_offline]
438
+ * @param {boolean | null} [disable_events]
439
+ * @param {string | null} [app_version]
440
+ * @param {string | null} [gateway_host]
441
+ * @param {bigint | null} [nonce]
442
+ * @param {any | null} [auth_callback]
443
+ * @param {AuthHandle | null} [auth_handle]
444
+ * @param {ClientMode | null} [client_mode]
445
+ * @returns {Promise<Client>}
446
+ */
447
+ 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, nonce, auth_callback, auth_handle, client_mode) {
448
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
449
+ const len0 = WASM_VECTOR_LEN;
450
+ const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
451
+ const len1 = WASM_VECTOR_LEN;
452
+ var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
453
+ var len2 = WASM_VECTOR_LEN;
454
+ var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
455
+ var len3 = WASM_VECTOR_LEN;
456
+ let ptr4 = 0;
457
+ if (!isLikeNone(log_options)) {
458
+ _assertClass(log_options, LogOptions);
459
+ ptr4 = log_options.__destroy_into_raw();
460
+ }
461
+ var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ var len5 = WASM_VECTOR_LEN;
463
+ var ptr6 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
464
+ var len6 = WASM_VECTOR_LEN;
465
+ let ptr7 = 0;
466
+ if (!isLikeNone(auth_handle)) {
467
+ _assertClass(auth_handle, AuthHandle);
468
+ ptr7 = auth_handle.__destroy_into_raw();
469
+ }
470
+ 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, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(auth_callback) ? 0 : addToExternrefTable0(auth_callback), ptr7, isLikeNone(client_mode) ? 2 : client_mode);
471
+ return ret;
348
472
  }
349
473
 
350
474
  /**
@@ -387,67 +511,86 @@ export function getInboxIdForIdentifier(host, gatewayHost, accountIdentifier) {
387
511
  }
388
512
 
389
513
  /**
390
- * @param {string} v3_host
391
- * @param {string | null | undefined} gateway_host
392
- * @param {SignatureRequestHandle} signature_request
393
- * @returns {Promise<void>}
514
+ * @param {Uint8Array} bytes
515
+ * @returns {GroupUpdated}
394
516
  */
395
- export function applySignatureRequest(v3_host, gateway_host, signature_request) {
396
- const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
397
- const len0 = WASM_VECTOR_LEN;
398
- var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
399
- var len1 = WASM_VECTOR_LEN;
400
- _assertClass(signature_request, SignatureRequestHandle);
401
- const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
402
- return ret;
517
+ export function decodeGroupUpdated(bytes) {
518
+ const ret = wasm.decodeGroupUpdated(bytes);
519
+ if (ret[2]) {
520
+ throw takeFromExternrefTable0(ret[1]);
521
+ }
522
+ return GroupUpdated.__wrap(ret[0]);
403
523
  }
404
524
 
405
525
  /**
406
- * @param {string} v3_host
407
- * @param {string | null | undefined} gateway_host
408
- * @param {Identifier} recovery_identifier
409
- * @param {string} inbox_id
410
- * @param {Uint8Array[]} installation_ids
411
- * @returns {SignatureRequestHandle}
526
+ * @param {Uint8Array} bytes
527
+ * @returns {any}
412
528
  */
413
- export function revokeInstallationsSignatureRequest(v3_host, gateway_host, recovery_identifier, inbox_id, installation_ids) {
414
- const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
415
- const len0 = WASM_VECTOR_LEN;
416
- var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
417
- var len1 = WASM_VECTOR_LEN;
418
- const ptr2 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
419
- const len2 = WASM_VECTOR_LEN;
420
- const ptr3 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
421
- const len3 = WASM_VECTOR_LEN;
422
- const ret = wasm.revokeInstallationsSignatureRequest(ptr0, len0, ptr1, len1, recovery_identifier, ptr2, len2, ptr3, len3);
529
+ export function decodeWalletSendCalls(bytes) {
530
+ const ret = wasm.decodeWalletSendCalls(bytes);
423
531
  if (ret[2]) {
424
532
  throw takeFromExternrefTable0(ret[1]);
425
533
  }
426
- return SignatureRequestHandle.__wrap(ret[0]);
534
+ return takeFromExternrefTable0(ret[0]);
427
535
  }
428
536
 
429
537
  /**
430
- * @param {string} signature_text
431
- * @param {Uint8Array} signature_bytes
432
- * @param {Uint8Array} public_key
538
+ * @param {any} wallet_send_calls
539
+ * @returns {Uint8Array}
433
540
  */
434
- export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
435
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
541
+ export function encodeWalletSendCalls(wallet_send_calls) {
542
+ const ret = wasm.encodeWalletSendCalls(wallet_send_calls);
543
+ if (ret[2]) {
544
+ throw takeFromExternrefTable0(ret[1]);
545
+ }
546
+ return takeFromExternrefTable0(ret[0]);
547
+ }
548
+
549
+ /**
550
+ * @param {Uint8Array} bytes
551
+ * @returns {string}
552
+ */
553
+ export function decodeXmtpText(bytes) {
554
+ let deferred2_0;
555
+ let deferred2_1;
556
+ try {
557
+ const ret = wasm.decodeXmtpText(bytes);
558
+ var ptr1 = ret[0];
559
+ var len1 = ret[1];
560
+ if (ret[3]) {
561
+ ptr1 = 0; len1 = 0;
562
+ throw takeFromExternrefTable0(ret[2]);
563
+ }
564
+ deferred2_0 = ptr1;
565
+ deferred2_1 = len1;
566
+ return getStringFromWasm0(ptr1, len1);
567
+ } finally {
568
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
569
+ }
570
+ }
571
+
572
+ /**
573
+ * @param {string} text
574
+ * @returns {Uint8Array}
575
+ */
576
+ export function encodeXmtpText(text) {
577
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
436
578
  const len0 = WASM_VECTOR_LEN;
437
- const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
438
- if (ret[1]) {
439
- throw takeFromExternrefTable0(ret[0]);
579
+ const ret = wasm.encodeXmtpText(ptr0, len0);
580
+ if (ret[2]) {
581
+ throw takeFromExternrefTable0(ret[1]);
440
582
  }
583
+ return takeFromExternrefTable0(ret[0]);
441
584
  }
442
585
 
443
586
  /**
444
- * @param {Intent} intent
587
+ * @param {Attachment} attachment
445
588
  * @returns {Uint8Array}
446
589
  */
447
- export function encodeIntent(intent) {
448
- _assertClass(intent, Intent);
449
- var ptr0 = intent.__destroy_into_raw();
450
- const ret = wasm.encodeIntent(ptr0);
590
+ export function encodeAttachment(attachment) {
591
+ _assertClass(attachment, Attachment);
592
+ var ptr0 = attachment.__destroy_into_raw();
593
+ const ret = wasm.encodeAttachment(ptr0);
451
594
  if (ret[2]) {
452
595
  throw takeFromExternrefTable0(ret[1]);
453
596
  }
@@ -456,24 +599,50 @@ export function encodeIntent(intent) {
456
599
 
457
600
  /**
458
601
  * @param {Uint8Array} bytes
459
- * @returns {Intent}
602
+ * @returns {Attachment}
460
603
  */
461
- export function decodeIntent(bytes) {
462
- const ret = wasm.decodeIntent(bytes);
604
+ export function decodeAttachment(bytes) {
605
+ const ret = wasm.decodeAttachment(bytes);
463
606
  if (ret[2]) {
464
607
  throw takeFromExternrefTable0(ret[1]);
465
608
  }
466
- return Intent.__wrap(ret[0]);
609
+ return Attachment.__wrap(ret[0]);
467
610
  }
468
611
 
469
612
  /**
470
- * @param {Reaction} reaction
613
+ * @param {Uint8Array} bytes
614
+ * @returns {ReadReceipt}
615
+ */
616
+ export function decodeReadReceipt(bytes) {
617
+ const ret = wasm.decodeReadReceipt(bytes);
618
+ if (ret[2]) {
619
+ throw takeFromExternrefTable0(ret[1]);
620
+ }
621
+ return ReadReceipt.__wrap(ret[0]);
622
+ }
623
+
624
+ /**
625
+ * @param {ReadReceipt} readReceipt
471
626
  * @returns {Uint8Array}
472
627
  */
473
- export function encodeReaction(reaction) {
474
- _assertClass(reaction, Reaction);
475
- var ptr0 = reaction.__destroy_into_raw();
476
- const ret = wasm.encodeReaction(ptr0);
628
+ export function encodeReadReceipt(readReceipt) {
629
+ _assertClass(readReceipt, ReadReceipt);
630
+ var ptr0 = readReceipt.__destroy_into_raw();
631
+ const ret = wasm.encodeReadReceipt(ptr0);
632
+ if (ret[2]) {
633
+ throw takeFromExternrefTable0(ret[1]);
634
+ }
635
+ return takeFromExternrefTable0(ret[0]);
636
+ }
637
+
638
+ /**
639
+ * @param {RemoteAttachment} remoteAttachment
640
+ * @returns {Uint8Array}
641
+ */
642
+ export function encodeRemoteAttachment(remoteAttachment) {
643
+ _assertClass(remoteAttachment, RemoteAttachment);
644
+ var ptr0 = remoteAttachment.__destroy_into_raw();
645
+ const ret = wasm.encodeRemoteAttachment(ptr0);
477
646
  if (ret[2]) {
478
647
  throw takeFromExternrefTable0(ret[1]);
479
648
  }
@@ -482,60 +651,92 @@ export function encodeReaction(reaction) {
482
651
 
483
652
  /**
484
653
  * @param {Uint8Array} bytes
485
- * @returns {Reaction}
654
+ * @returns {RemoteAttachment}
486
655
  */
487
- export function decodeReaction(bytes) {
488
- const ret = wasm.decodeReaction(bytes);
656
+ export function decodeRemoteAttachment(bytes) {
657
+ const ret = wasm.decodeRemoteAttachment(bytes);
489
658
  if (ret[2]) {
490
659
  throw takeFromExternrefTable0(ret[1]);
491
660
  }
492
- return Reaction.__wrap(ret[0]);
661
+ return RemoteAttachment.__wrap(ret[0]);
493
662
  }
494
663
 
495
664
  /**
496
- * @param {string} host
497
- * @param {string} inbox_id
498
- * @param {Identifier} account_identifier
499
- * @param {string | null} [db_path]
500
- * @param {Uint8Array | null} [encryption_key]
501
- * @param {string | null} [device_sync_server_url]
502
- * @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
503
- * @param {LogOptions | null} [log_options]
504
- * @param {boolean | null} [allow_offline]
505
- * @param {boolean | null} [disable_events]
506
- * @param {string | null} [app_version]
507
- * @param {string | null} [gateway_host]
508
- * @param {bigint | null} [nonce]
509
- * @param {any | null} [auth_callback]
510
- * @param {AuthHandle | null} [auth_handle]
511
- * @param {ClientMode | null} [client_mode]
512
- * @returns {Promise<Client>}
665
+ * @param {Uint8Array} bytes
666
+ * @returns {TransactionReference}
513
667
  */
514
- 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, nonce, auth_callback, auth_handle, client_mode) {
515
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
516
- const len0 = WASM_VECTOR_LEN;
517
- const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
518
- const len1 = WASM_VECTOR_LEN;
519
- var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
520
- var len2 = WASM_VECTOR_LEN;
521
- var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
522
- var len3 = WASM_VECTOR_LEN;
523
- let ptr4 = 0;
524
- if (!isLikeNone(log_options)) {
525
- _assertClass(log_options, LogOptions);
526
- ptr4 = log_options.__destroy_into_raw();
668
+ export function decodeTransactionReference(bytes) {
669
+ const ret = wasm.decodeTransactionReference(bytes);
670
+ if (ret[2]) {
671
+ throw takeFromExternrefTable0(ret[1]);
527
672
  }
528
- var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
529
- var len5 = WASM_VECTOR_LEN;
530
- var ptr6 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
531
- var len6 = WASM_VECTOR_LEN;
532
- let ptr7 = 0;
533
- if (!isLikeNone(auth_handle)) {
534
- _assertClass(auth_handle, AuthHandle);
535
- ptr7 = auth_handle.__destroy_into_raw();
673
+ return TransactionReference.__wrap(ret[0]);
674
+ }
675
+
676
+ /**
677
+ * @param {TransactionReference} transactionReference
678
+ * @returns {Uint8Array}
679
+ */
680
+ export function encodeTransactionReference(transactionReference) {
681
+ _assertClass(transactionReference, TransactionReference);
682
+ var ptr0 = transactionReference.__destroy_into_raw();
683
+ const ret = wasm.encodeTransactionReference(ptr0);
684
+ if (ret[2]) {
685
+ throw takeFromExternrefTable0(ret[1]);
536
686
  }
537
- 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, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(auth_callback) ? 0 : addToExternrefTable0(auth_callback), ptr7, isLikeNone(client_mode) ? 2 : client_mode);
538
- return ret;
687
+ return takeFromExternrefTable0(ret[0]);
688
+ }
689
+
690
+ /**
691
+ * @param {Reply} reply
692
+ * @returns {Uint8Array}
693
+ */
694
+ export function encodeReply(reply) {
695
+ _assertClass(reply, Reply);
696
+ var ptr0 = reply.__destroy_into_raw();
697
+ const ret = wasm.encodeReply(ptr0);
698
+ if (ret[2]) {
699
+ throw takeFromExternrefTable0(ret[1]);
700
+ }
701
+ return takeFromExternrefTable0(ret[0]);
702
+ }
703
+
704
+ /**
705
+ * @param {Uint8Array} bytes
706
+ * @returns {Reply}
707
+ */
708
+ export function decodeReply(bytes) {
709
+ const ret = wasm.decodeReply(bytes);
710
+ if (ret[2]) {
711
+ throw takeFromExternrefTable0(ret[1]);
712
+ }
713
+ return Reply.__wrap(ret[0]);
714
+ }
715
+
716
+ /**
717
+ * @param {Uint8Array} bytes
718
+ * @returns {Intent}
719
+ */
720
+ export function decodeIntent(bytes) {
721
+ const ret = wasm.decodeIntent(bytes);
722
+ if (ret[2]) {
723
+ throw takeFromExternrefTable0(ret[1]);
724
+ }
725
+ return Intent.__wrap(ret[0]);
726
+ }
727
+
728
+ /**
729
+ * @param {Intent} intent
730
+ * @returns {Uint8Array}
731
+ */
732
+ export function encodeIntent(intent) {
733
+ _assertClass(intent, Intent);
734
+ var ptr0 = intent.__destroy_into_raw();
735
+ const ret = wasm.encodeIntent(ptr0);
736
+ if (ret[2]) {
737
+ throw takeFromExternrefTable0(ret[1]);
738
+ }
739
+ return takeFromExternrefTable0(ret[0]);
539
740
  }
540
741
 
541
742
  /**
@@ -549,22 +750,22 @@ export function task_worker_entry_point(ptr) {
549
750
  }
550
751
  }
551
752
 
552
- function wasm_bindgen__convert__closures_____invoke__hafab8b28acda63ce(arg0, arg1) {
553
- wasm.wasm_bindgen__convert__closures_____invoke__hafab8b28acda63ce(arg0, arg1);
554
- }
555
-
556
- function wasm_bindgen__convert__closures_____invoke__h34df32c886f66f02(arg0, arg1, arg2) {
557
- wasm.wasm_bindgen__convert__closures_____invoke__h34df32c886f66f02(arg0, arg1, arg2);
558
- }
559
-
560
753
  function wasm_bindgen__convert__closures_____invoke__h753a3e053785270d(arg0, arg1) {
561
754
  wasm.wasm_bindgen__convert__closures_____invoke__h753a3e053785270d(arg0, arg1);
562
755
  }
563
756
 
757
+ function wasm_bindgen__convert__closures_____invoke__hafab8b28acda63ce(arg0, arg1) {
758
+ wasm.wasm_bindgen__convert__closures_____invoke__hafab8b28acda63ce(arg0, arg1);
759
+ }
760
+
564
761
  function wasm_bindgen__convert__closures_____invoke__h9011598bdd38acb2(arg0, arg1) {
565
762
  wasm.wasm_bindgen__convert__closures_____invoke__h9011598bdd38acb2(arg0, arg1);
566
763
  }
567
764
 
765
+ function wasm_bindgen__convert__closures_____invoke__h34df32c886f66f02(arg0, arg1, arg2) {
766
+ wasm.wasm_bindgen__convert__closures_____invoke__h34df32c886f66f02(arg0, arg1, arg2);
767
+ }
768
+
568
769
  function wasm_bindgen__convert__closures_____invoke__h18a484e2affd7fe5(arg0, arg1, arg2, arg3) {
569
770
  wasm.wasm_bindgen__convert__closures_____invoke__h18a484e2affd7fe5(arg0, arg1, arg2, arg3);
570
771
  }
@@ -600,19 +801,20 @@ export const ConsentState = Object.freeze({
600
801
  Denied: 2, "2": "Denied",
601
802
  });
602
803
  /**
603
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}
804
+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}
604
805
  */
605
806
  export const ContentType = Object.freeze({
606
807
  Unknown: 0, "0": "Unknown",
607
808
  Text: 1, "1": "Text",
608
- GroupMembershipChange: 2, "2": "GroupMembershipChange",
609
- GroupUpdated: 3, "3": "GroupUpdated",
610
- Reaction: 4, "4": "Reaction",
611
- ReadReceipt: 5, "5": "ReadReceipt",
612
- Reply: 6, "6": "Reply",
613
- Attachment: 7, "7": "Attachment",
614
- RemoteAttachment: 8, "8": "RemoteAttachment",
615
- TransactionReference: 9, "9": "TransactionReference",
809
+ LeaveRequest: 2, "2": "LeaveRequest",
810
+ GroupMembershipChange: 3, "3": "GroupMembershipChange",
811
+ GroupUpdated: 4, "4": "GroupUpdated",
812
+ Reaction: 5, "5": "Reaction",
813
+ ReadReceipt: 6, "6": "ReadReceipt",
814
+ Reply: 7, "7": "Reply",
815
+ Attachment: 8, "8": "Attachment",
816
+ RemoteAttachment: 9, "9": "RemoteAttachment",
817
+ TransactionReference: 10, "10": "TransactionReference",
616
818
  });
617
819
  /**
618
820
  * @enum {0 | 1 | 2 | 3}
@@ -681,7 +883,7 @@ export const MetadataField = Object.freeze({
681
883
  MessageExpirationMS: 4, "4": "MessageExpirationMS",
682
884
  });
683
885
  /**
684
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}
886
+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13}
685
887
  */
686
888
  export const PayloadType = Object.freeze({
687
889
  Text: 0, "0": "Text",
@@ -693,10 +895,11 @@ export const PayloadType = Object.freeze({
693
895
  TransactionReference: 6, "6": "TransactionReference",
694
896
  GroupUpdated: 7, "7": "GroupUpdated",
695
897
  ReadReceipt: 8, "8": "ReadReceipt",
696
- WalletSendCalls: 9, "9": "WalletSendCalls",
697
- Intent: 10, "10": "Intent",
698
- Actions: 11, "11": "Actions",
699
- Custom: 12, "12": "Custom",
898
+ LeaveRequest: 9, "9": "LeaveRequest",
899
+ WalletSendCalls: 10, "10": "WalletSendCalls",
900
+ Intent: 11, "11": "Intent",
901
+ Actions: 12, "12": "Actions",
902
+ Custom: 13, "13": "Custom",
700
903
  });
701
904
  /**
702
905
  * @enum {0 | 1 | 2}
@@ -1346,45 +1549,6 @@ export class Client {
1346
1549
  const ptr = this.__destroy_into_raw();
1347
1550
  wasm.__wbg_client_free(ptr, 0);
1348
1551
  }
1349
- /**
1350
- *
1351
- * * Get the client's inbox state.
1352
- * *
1353
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1354
- * * Otherwise, the state will be read from the local database.
1355
- *
1356
- * @param {boolean} refresh_from_network
1357
- * @returns {Promise<InboxState>}
1358
- */
1359
- inboxState(refresh_from_network) {
1360
- const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
1361
- return ret;
1362
- }
1363
- /**
1364
- * @param {string} inbox_id
1365
- * @returns {Promise<InboxState>}
1366
- */
1367
- getLatestInboxState(inbox_id) {
1368
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1369
- const len0 = WASM_VECTOR_LEN;
1370
- const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1371
- return ret;
1372
- }
1373
- /**
1374
- *
1375
- * * Get key package statuses for a list of installation IDs.
1376
- * *
1377
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1378
- *
1379
- * @param {string[]} installation_ids
1380
- * @returns {Promise<any>}
1381
- */
1382
- getKeyPackageStatusesForInstallationIds(installation_ids) {
1383
- const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1384
- const len0 = WASM_VECTOR_LEN;
1385
- const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1386
- return ret;
1387
- }
1388
1552
  /**
1389
1553
  * @param {SignatureRequestHandle} signature_request
1390
1554
  * @returns {Promise<void>}
@@ -1459,25 +1623,64 @@ export class Client {
1459
1623
  * @param {Uint8Array[]} installation_ids
1460
1624
  * @returns {Promise<SignatureRequestHandle>}
1461
1625
  */
1462
- revokeInstallationsSignatureRequest(installation_ids) {
1463
- const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1464
- const len0 = WASM_VECTOR_LEN;
1465
- const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
1626
+ revokeInstallationsSignatureRequest(installation_ids) {
1627
+ const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1628
+ const len0 = WASM_VECTOR_LEN;
1629
+ const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
1630
+ return ret;
1631
+ }
1632
+ /**
1633
+ * @param {Identifier} new_recovery_identifier
1634
+ * @returns {Promise<SignatureRequestHandle>}
1635
+ */
1636
+ changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
1637
+ const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
1638
+ return ret;
1639
+ }
1640
+ /**
1641
+ * @returns {Promise<SignatureRequestHandle | undefined>}
1642
+ */
1643
+ revokeAllOtherInstallationsSignatureRequest() {
1644
+ const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
1645
+ return ret;
1646
+ }
1647
+ /**
1648
+ *
1649
+ * * Get the client's inbox state.
1650
+ * *
1651
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1652
+ * * Otherwise, the state will be read from the local database.
1653
+ *
1654
+ * @param {boolean} refresh_from_network
1655
+ * @returns {Promise<InboxState>}
1656
+ */
1657
+ inboxState(refresh_from_network) {
1658
+ const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
1466
1659
  return ret;
1467
1660
  }
1468
1661
  /**
1469
- * @param {Identifier} new_recovery_identifier
1470
- * @returns {Promise<SignatureRequestHandle>}
1662
+ * @param {string} inbox_id
1663
+ * @returns {Promise<InboxState>}
1471
1664
  */
1472
- changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
1473
- const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
1665
+ getLatestInboxState(inbox_id) {
1666
+ const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1667
+ const len0 = WASM_VECTOR_LEN;
1668
+ const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1474
1669
  return ret;
1475
1670
  }
1476
1671
  /**
1477
- * @returns {Promise<SignatureRequestHandle | undefined>}
1672
+ *
1673
+ * * Get key package statuses for a list of installation IDs.
1674
+ * *
1675
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1676
+ *
1677
+ * @param {string[]} installation_ids
1678
+ * @returns {Promise<any>}
1478
1679
  */
1479
- revokeAllOtherInstallationsSignatureRequest() {
1480
- const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
1680
+ getKeyPackageStatusesForInstallationIds(installation_ids) {
1681
+ const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1682
+ const len0 = WASM_VECTOR_LEN;
1683
+ const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1481
1684
  return ret;
1482
1685
  }
1483
1686
  /**
@@ -1852,7 +2055,7 @@ export class ContentTypeId {
1852
2055
  set authorityId(arg0) {
1853
2056
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1854
2057
  const len0 = WASM_VECTOR_LEN;
1855
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
2058
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
1856
2059
  }
1857
2060
  /**
1858
2061
  * @returns {string}
@@ -1875,7 +2078,7 @@ export class ContentTypeId {
1875
2078
  set typeId(arg0) {
1876
2079
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1877
2080
  const len0 = WASM_VECTOR_LEN;
1878
- wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
2081
+ wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
1879
2082
  }
1880
2083
  /**
1881
2084
  * @returns {number}
@@ -1931,6 +2134,25 @@ export class Conversation {
1931
2134
  const ptr = this.__destroy_into_raw();
1932
2135
  wasm.__wbg_conversation_free(ptr, 0);
1933
2136
  }
2137
+ /**
2138
+ * @returns {ConsentState}
2139
+ */
2140
+ consentState() {
2141
+ const ret = wasm.conversation_consentState(this.__wbg_ptr);
2142
+ if (ret[2]) {
2143
+ throw takeFromExternrefTable0(ret[1]);
2144
+ }
2145
+ return ret[0];
2146
+ }
2147
+ /**
2148
+ * @param {ConsentState} state
2149
+ */
2150
+ updateConsentState(state) {
2151
+ const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
2152
+ if (ret[1]) {
2153
+ throw takeFromExternrefTable0(ret[0]);
2154
+ }
2155
+ }
1934
2156
  /**
1935
2157
  * @returns {string[]}
1936
2158
  */
@@ -1981,6 +2203,13 @@ export class Conversation {
1981
2203
  const ret = wasm.conversation_addMembers(this.__wbg_ptr, ptr0, len0);
1982
2204
  return ret;
1983
2205
  }
2206
+ /**
2207
+ * @returns {Promise<void>}
2208
+ */
2209
+ leaveGroup() {
2210
+ const ret = wasm.conversation_leaveGroup(this.__wbg_ptr);
2211
+ return ret;
2212
+ }
1984
2213
  /**
1985
2214
  * @returns {Promise<any>}
1986
2215
  */
@@ -2140,6 +2369,16 @@ export class Conversation {
2140
2369
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2141
2370
  }
2142
2371
  }
2372
+ /**
2373
+ * @returns {GroupMembershipState}
2374
+ */
2375
+ membershipState() {
2376
+ const ret = wasm.conversation_membershipState(this.__wbg_ptr);
2377
+ if (ret[2]) {
2378
+ throw takeFromExternrefTable0(ret[1]);
2379
+ }
2380
+ return ret[0];
2381
+ }
2143
2382
  /**
2144
2383
  * Publish all unpublished messages
2145
2384
  * @returns {Promise<void>}
@@ -2181,19 +2420,6 @@ export class Conversation {
2181
2420
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2182
2421
  }
2183
2422
  }
2184
- /**
2185
- * @param {ListMessagesOptions | null} [opts]
2186
- * @returns {Promise<DecodedMessage[]>}
2187
- */
2188
- findMessagesV2(opts) {
2189
- let ptr0 = 0;
2190
- if (!isLikeNone(opts)) {
2191
- _assertClass(opts, ListMessagesOptions);
2192
- ptr0 = opts.__destroy_into_raw();
2193
- }
2194
- const ret = wasm.conversation_findMessagesV2(this.__wbg_ptr, ptr0);
2195
- return ret;
2196
- }
2197
2423
  /**
2198
2424
  * @returns {string}
2199
2425
  */
@@ -2274,6 +2500,19 @@ export class Conversation {
2274
2500
  const ret = wasm.conversation_getLastReadTimes(this.__wbg_ptr);
2275
2501
  return ret;
2276
2502
  }
2503
+ /**
2504
+ * @param {ListMessagesOptions | null} [opts]
2505
+ * @returns {Promise<DecodedMessage[]>}
2506
+ */
2507
+ findEnrichedMessages(opts) {
2508
+ let ptr0 = 0;
2509
+ if (!isLikeNone(opts)) {
2510
+ _assertClass(opts, ListMessagesOptions);
2511
+ ptr0 = opts.__destroy_into_raw();
2512
+ }
2513
+ const ret = wasm.conversation_findEnrichedMessages(this.__wbg_ptr, ptr0);
2514
+ return ret;
2515
+ }
2277
2516
  /**
2278
2517
  * @returns {string}
2279
2518
  */
@@ -2383,6 +2622,14 @@ export class Conversation {
2383
2622
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2384
2623
  }
2385
2624
  }
2625
+ /**
2626
+ * @param {Uint8Array} envelope_bytes
2627
+ * @returns {Promise<Message>}
2628
+ */
2629
+ processStreamedGroupMessage(envelope_bytes) {
2630
+ const ret = wasm.conversation_processStreamedGroupMessage(this.__wbg_ptr, envelope_bytes);
2631
+ return ret;
2632
+ }
2386
2633
  /**
2387
2634
  * @returns {boolean}
2388
2635
  */
@@ -2495,25 +2742,6 @@ export class Conversation {
2495
2742
  }
2496
2743
  return ret[0] !== 0;
2497
2744
  }
2498
- /**
2499
- * @returns {ConsentState}
2500
- */
2501
- consentState() {
2502
- const ret = wasm.conversation_consentState(this.__wbg_ptr);
2503
- if (ret[2]) {
2504
- throw takeFromExternrefTable0(ret[1]);
2505
- }
2506
- return ret[0];
2507
- }
2508
- /**
2509
- * @param {ConsentState} state
2510
- */
2511
- updateConsentState(state) {
2512
- const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
2513
- if (ret[1]) {
2514
- throw takeFromExternrefTable0(ret[0]);
2515
- }
2516
- }
2517
2745
  }
2518
2746
  if (Symbol.dispose) Conversation.prototype[Symbol.dispose] = Conversation.prototype.free;
2519
2747
 
@@ -3578,6 +3806,13 @@ export class DecodedMessageContent {
3578
3806
  const ret = wasm.decodedmessagecontent_asGroupUpdated(this.__wbg_ptr);
3579
3807
  return ret === 0 ? undefined : GroupUpdated.__wrap(ret);
3580
3808
  }
3809
+ /**
3810
+ * @returns {LeaveRequest | undefined}
3811
+ */
3812
+ asLeaveRequest() {
3813
+ const ret = wasm.decodedmessagecontent_asLeaveRequest(this.__wbg_ptr);
3814
+ return ret === 0 ? undefined : LeaveRequest.__wrap(ret);
3815
+ }
3581
3816
  /**
3582
3817
  * @returns {RemoteAttachment | undefined}
3583
3818
  */
@@ -3882,7 +4117,7 @@ export class GroupMember {
3882
4117
  set inboxId(arg0) {
3883
4118
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3884
4119
  const len0 = WASM_VECTOR_LEN;
3885
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
4120
+ wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
3886
4121
  }
3887
4122
  /**
3888
4123
  * @returns {Identifier[]}
@@ -4163,7 +4398,7 @@ export class GroupUpdated {
4163
4398
  set initiatedByInboxId(arg0) {
4164
4399
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4165
4400
  const len0 = WASM_VECTOR_LEN;
4166
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
4401
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
4167
4402
  }
4168
4403
  /**
4169
4404
  * @returns {Inbox[]}
@@ -4199,6 +4434,23 @@ export class GroupUpdated {
4199
4434
  const len0 = WASM_VECTOR_LEN;
4200
4435
  wasm.__wbg_set_groupupdated_removedInboxes(this.__wbg_ptr, ptr0, len0);
4201
4436
  }
4437
+ /**
4438
+ * @returns {Inbox[]}
4439
+ */
4440
+ get leftInboxes() {
4441
+ const ret = wasm.__wbg_get_groupupdated_leftInboxes(this.__wbg_ptr);
4442
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4443
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4444
+ return v1;
4445
+ }
4446
+ /**
4447
+ * @param {Inbox[]} arg0
4448
+ */
4449
+ set leftInboxes(arg0) {
4450
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4451
+ const len0 = WASM_VECTOR_LEN;
4452
+ wasm.__wbg_set_groupupdated_leftInboxes(this.__wbg_ptr, ptr0, len0);
4453
+ }
4202
4454
  /**
4203
4455
  * @returns {MetadataFieldChange[]}
4204
4456
  */
@@ -4216,6 +4468,74 @@ export class GroupUpdated {
4216
4468
  const len0 = WASM_VECTOR_LEN;
4217
4469
  wasm.__wbg_set_groupupdated_metadataFieldChanges(this.__wbg_ptr, ptr0, len0);
4218
4470
  }
4471
+ /**
4472
+ * @returns {Inbox[]}
4473
+ */
4474
+ get addedAdminInboxes() {
4475
+ const ret = wasm.__wbg_get_groupupdated_addedAdminInboxes(this.__wbg_ptr);
4476
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4477
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4478
+ return v1;
4479
+ }
4480
+ /**
4481
+ * @param {Inbox[]} arg0
4482
+ */
4483
+ set addedAdminInboxes(arg0) {
4484
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4485
+ const len0 = WASM_VECTOR_LEN;
4486
+ wasm.__wbg_set_groupupdated_addedAdminInboxes(this.__wbg_ptr, ptr0, len0);
4487
+ }
4488
+ /**
4489
+ * @returns {Inbox[]}
4490
+ */
4491
+ get removedAdminInboxes() {
4492
+ const ret = wasm.__wbg_get_groupupdated_removedAdminInboxes(this.__wbg_ptr);
4493
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4494
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4495
+ return v1;
4496
+ }
4497
+ /**
4498
+ * @param {Inbox[]} arg0
4499
+ */
4500
+ set removedAdminInboxes(arg0) {
4501
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4502
+ const len0 = WASM_VECTOR_LEN;
4503
+ wasm.__wbg_set_groupupdated_removedAdminInboxes(this.__wbg_ptr, ptr0, len0);
4504
+ }
4505
+ /**
4506
+ * @returns {Inbox[]}
4507
+ */
4508
+ get addedSuperAdminInboxes() {
4509
+ const ret = wasm.__wbg_get_groupupdated_addedSuperAdminInboxes(this.__wbg_ptr);
4510
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4511
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4512
+ return v1;
4513
+ }
4514
+ /**
4515
+ * @param {Inbox[]} arg0
4516
+ */
4517
+ set addedSuperAdminInboxes(arg0) {
4518
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4519
+ const len0 = WASM_VECTOR_LEN;
4520
+ wasm.__wbg_set_groupupdated_addedSuperAdminInboxes(this.__wbg_ptr, ptr0, len0);
4521
+ }
4522
+ /**
4523
+ * @returns {Inbox[]}
4524
+ */
4525
+ get removedSuperAdminInboxes() {
4526
+ const ret = wasm.__wbg_get_groupupdated_removedSuperAdminInboxes(this.__wbg_ptr);
4527
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4528
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4529
+ return v1;
4530
+ }
4531
+ /**
4532
+ * @param {Inbox[]} arg0
4533
+ */
4534
+ set removedSuperAdminInboxes(arg0) {
4535
+ const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
4536
+ const len0 = WASM_VECTOR_LEN;
4537
+ wasm.__wbg_set_groupupdated_removedSuperAdminInboxes(this.__wbg_ptr, ptr0, len0);
4538
+ }
4219
4539
  }
4220
4540
  if (Symbol.dispose) GroupUpdated.prototype[Symbol.dispose] = GroupUpdated.prototype.free;
4221
4541
 
@@ -4402,7 +4722,7 @@ export class Inbox {
4402
4722
  set inboxId(arg0) {
4403
4723
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4404
4724
  const len0 = WASM_VECTOR_LEN;
4405
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
4725
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
4406
4726
  }
4407
4727
  }
4408
4728
  if (Symbol.dispose) Inbox.prototype[Symbol.dispose] = Inbox.prototype.free;
@@ -4471,7 +4791,7 @@ export class InboxState {
4471
4791
  set inboxId(arg0) {
4472
4792
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4473
4793
  const len0 = WASM_VECTOR_LEN;
4474
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
4794
+ wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
4475
4795
  }
4476
4796
  /**
4477
4797
  * @returns {Identifier}
@@ -4666,7 +4986,7 @@ export class Intent {
4666
4986
  set id(arg0) {
4667
4987
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4668
4988
  const len0 = WASM_VECTOR_LEN;
4669
- wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
4989
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
4670
4990
  }
4671
4991
  /**
4672
4992
  * @returns {string}
@@ -4689,7 +5009,7 @@ export class Intent {
4689
5009
  set actionId(arg0) {
4690
5010
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4691
5011
  const len0 = WASM_VECTOR_LEN;
4692
- wasm.__wbg_set_intent_actionId(this.__wbg_ptr, ptr0, len0);
5012
+ wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
4693
5013
  }
4694
5014
  /**
4695
5015
  * @returns {any}
@@ -4917,6 +5237,47 @@ export class KeyPackageStatus {
4917
5237
  }
4918
5238
  if (Symbol.dispose) KeyPackageStatus.prototype[Symbol.dispose] = KeyPackageStatus.prototype.free;
4919
5239
 
5240
+ const LeaveRequestFinalization = (typeof FinalizationRegistry === 'undefined')
5241
+ ? { register: () => {}, unregister: () => {} }
5242
+ : new FinalizationRegistry(ptr => wasm.__wbg_leaverequest_free(ptr >>> 0, 1));
5243
+
5244
+ export class LeaveRequest {
5245
+
5246
+ static __wrap(ptr) {
5247
+ ptr = ptr >>> 0;
5248
+ const obj = Object.create(LeaveRequest.prototype);
5249
+ obj.__wbg_ptr = ptr;
5250
+ LeaveRequestFinalization.register(obj, obj.__wbg_ptr, obj);
5251
+ return obj;
5252
+ }
5253
+
5254
+ __destroy_into_raw() {
5255
+ const ptr = this.__wbg_ptr;
5256
+ this.__wbg_ptr = 0;
5257
+ LeaveRequestFinalization.unregister(this);
5258
+ return ptr;
5259
+ }
5260
+
5261
+ free() {
5262
+ const ptr = this.__destroy_into_raw();
5263
+ wasm.__wbg_leaverequest_free(ptr, 0);
5264
+ }
5265
+ /**
5266
+ * @returns {Uint8Array | undefined}
5267
+ */
5268
+ get authenticatedNote() {
5269
+ const ret = wasm.__wbg_get_leaverequest_authenticatedNote(this.__wbg_ptr);
5270
+ return ret;
5271
+ }
5272
+ /**
5273
+ * @param {Uint8Array | null} [arg0]
5274
+ */
5275
+ set authenticatedNote(arg0) {
5276
+ wasm.__wbg_set_leaverequest_authenticatedNote(this.__wbg_ptr, isLikeNone(arg0) ? 0 : addToExternrefTable0(arg0));
5277
+ }
5278
+ }
5279
+ if (Symbol.dispose) LeaveRequest.prototype[Symbol.dispose] = LeaveRequest.prototype.free;
5280
+
4920
5281
  const LifetimeFinalization = (typeof FinalizationRegistry === 'undefined')
4921
5282
  ? { register: () => {}, unregister: () => {} }
4922
5283
  : new FinalizationRegistry(ptr => wasm.__wbg_lifetime_free(ptr >>> 0, 1));
@@ -4946,27 +5307,27 @@ export class Lifetime {
4946
5307
  * @returns {bigint}
4947
5308
  */
4948
5309
  get not_before() {
4949
- const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
5310
+ const ret = wasm.__wbg_get_apistats_upload_key_package(this.__wbg_ptr);
4950
5311
  return BigInt.asUintN(64, ret);
4951
5312
  }
4952
5313
  /**
4953
5314
  * @param {bigint} arg0
4954
5315
  */
4955
5316
  set not_before(arg0) {
4956
- wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
5317
+ wasm.__wbg_set_apistats_upload_key_package(this.__wbg_ptr, arg0);
4957
5318
  }
4958
5319
  /**
4959
5320
  * @returns {bigint}
4960
5321
  */
4961
5322
  get not_after() {
4962
- const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
5323
+ const ret = wasm.__wbg_get_apistats_fetch_key_package(this.__wbg_ptr);
4963
5324
  return BigInt.asUintN(64, ret);
4964
5325
  }
4965
5326
  /**
4966
5327
  * @param {bigint} arg0
4967
5328
  */
4968
5329
  set not_after(arg0) {
4969
- wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
5330
+ wasm.__wbg_set_apistats_fetch_key_package(this.__wbg_ptr, arg0);
4970
5331
  }
4971
5332
  }
4972
5333
  if (Symbol.dispose) Lifetime.prototype[Symbol.dispose] = Lifetime.prototype.free;
@@ -5200,7 +5561,7 @@ export class ListMessagesOptions {
5200
5561
  * @param {bigint | null} [arg0]
5201
5562
  */
5202
5563
  set sentBeforeNs(arg0) {
5203
- wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
5564
+ wasm.__wbg_set_listmessagesoptions_sentBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
5204
5565
  }
5205
5566
  /**
5206
5567
  * @returns {bigint | undefined}
@@ -5213,7 +5574,7 @@ export class ListMessagesOptions {
5213
5574
  * @param {bigint | null} [arg0]
5214
5575
  */
5215
5576
  set sentAfterNs(arg0) {
5216
- wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
5577
+ wasm.__wbg_set_listmessagesoptions_sentAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
5217
5578
  }
5218
5579
  /**
5219
5580
  * @returns {bigint | undefined}
@@ -5226,7 +5587,7 @@ export class ListMessagesOptions {
5226
5587
  * @param {bigint | null} [arg0]
5227
5588
  */
5228
5589
  set limit(arg0) {
5229
- wasm.__wbg_set_listconversationsoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
5590
+ wasm.__wbg_set_listmessagesoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
5230
5591
  }
5231
5592
  /**
5232
5593
  * @returns {DeliveryStatus | undefined}
@@ -5466,14 +5827,14 @@ export class Message {
5466
5827
  * @returns {bigint}
5467
5828
  */
5468
5829
  get sentAtNs() {
5469
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
5830
+ const ret = wasm.__wbg_get_message_sentAtNs(this.__wbg_ptr);
5470
5831
  return ret;
5471
5832
  }
5472
5833
  /**
5473
5834
  * @param {bigint} arg0
5474
5835
  */
5475
5836
  set sentAtNs(arg0) {
5476
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
5837
+ wasm.__wbg_set_message_sentAtNs(this.__wbg_ptr, arg0);
5477
5838
  }
5478
5839
  /**
5479
5840
  * @returns {string}
@@ -5765,7 +6126,7 @@ export class MetadataFieldChange {
5765
6126
  set fieldName(arg0) {
5766
6127
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5767
6128
  const len0 = WASM_VECTOR_LEN;
5768
- wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
6129
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
5769
6130
  }
5770
6131
  /**
5771
6132
  * @returns {string | undefined}
@@ -5805,7 +6166,7 @@ export class MetadataFieldChange {
5805
6166
  set newValue(arg0) {
5806
6167
  var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5807
6168
  var len0 = WASM_VECTOR_LEN;
5808
- wasm.__wbg_set_attachment_filename(this.__wbg_ptr, ptr0, len0);
6169
+ wasm.__wbg_set_metadatafieldchange_newValue(this.__wbg_ptr, ptr0, len0);
5809
6170
  }
5810
6171
  }
5811
6172
  if (Symbol.dispose) MetadataFieldChange.prototype[Symbol.dispose] = MetadataFieldChange.prototype.free;
@@ -6246,7 +6607,7 @@ export class Reaction {
6246
6607
  set referenceInboxId(arg0) {
6247
6608
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6248
6609
  const len0 = WASM_VECTOR_LEN;
6249
- wasm.__wbg_set_intent_actionId(this.__wbg_ptr, ptr0, len0);
6610
+ wasm.__wbg_set_reaction_referenceInboxId(this.__wbg_ptr, ptr0, len0);
6250
6611
  }
6251
6612
  /**
6252
6613
  * @returns {ReactionAction}
@@ -6388,7 +6749,7 @@ export class ReactionPayload {
6388
6749
  set referenceInboxId(arg0) {
6389
6750
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6390
6751
  const len0 = WASM_VECTOR_LEN;
6391
- wasm.__wbg_set_intent_actionId(this.__wbg_ptr, ptr0, len0);
6752
+ wasm.__wbg_set_reaction_referenceInboxId(this.__wbg_ptr, ptr0, len0);
6392
6753
  }
6393
6754
  /**
6394
6755
  * @returns {ReactionActionPayload}
@@ -6516,7 +6877,7 @@ export class RemoteAttachment {
6516
6877
  set url(arg0) {
6517
6878
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6518
6879
  const len0 = WASM_VECTOR_LEN;
6519
- wasm.__wbg_set_remoteattachment_url(this.__wbg_ptr, ptr0, len0);
6880
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
6520
6881
  }
6521
6882
  /**
6522
6883
  * @returns {string}
@@ -6539,7 +6900,7 @@ export class RemoteAttachment {
6539
6900
  set contentDigest(arg0) {
6540
6901
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6541
6902
  const len0 = WASM_VECTOR_LEN;
6542
- wasm.__wbg_set_remoteattachment_contentDigest(this.__wbg_ptr, ptr0, len0);
6903
+ wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
6543
6904
  }
6544
6905
  /**
6545
6906
  * @returns {Uint8Array}
@@ -6616,14 +6977,14 @@ export class RemoteAttachment {
6616
6977
  wasm.__wbg_set_remoteattachment_scheme(this.__wbg_ptr, ptr0, len0);
6617
6978
  }
6618
6979
  /**
6619
- * @returns {bigint}
6980
+ * @returns {number}
6620
6981
  */
6621
6982
  get contentLength() {
6622
6983
  const ret = wasm.__wbg_get_remoteattachment_contentLength(this.__wbg_ptr);
6623
- return ret;
6984
+ return ret >>> 0;
6624
6985
  }
6625
6986
  /**
6626
- * @param {bigint} arg0
6987
+ * @param {number} arg0
6627
6988
  */
6628
6989
  set contentLength(arg0) {
6629
6990
  wasm.__wbg_set_remoteattachment_contentLength(this.__wbg_ptr, arg0);
@@ -6776,7 +7137,7 @@ export class RemoteAttachmentInfo {
6776
7137
  set url(arg0) {
6777
7138
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6778
7139
  const len0 = WASM_VECTOR_LEN;
6779
- wasm.__wbg_set_remoteattachmentinfo_url(this.__wbg_ptr, ptr0, len0);
7140
+ wasm.__wbg_set_action_label(this.__wbg_ptr, ptr0, len0);
6780
7141
  }
6781
7142
  /**
6782
7143
  * @returns {Uint8Array}
@@ -6912,7 +7273,7 @@ export class Reply {
6912
7273
  set reference(arg0) {
6913
7274
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6914
7275
  const len0 = WASM_VECTOR_LEN;
6915
- wasm.__wbg_set_reply_reference(this.__wbg_ptr, ptr0, len0);
7276
+ wasm.__wbg_set_remoteattachment_scheme(this.__wbg_ptr, ptr0, len0);
6916
7277
  }
6917
7278
  /**
6918
7279
  * @returns {string | undefined}
@@ -6932,7 +7293,7 @@ export class Reply {
6932
7293
  set referenceInboxId(arg0) {
6933
7294
  var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6934
7295
  var len0 = WASM_VECTOR_LEN;
6935
- wasm.__wbg_set_reply_referenceInboxId(this.__wbg_ptr, ptr0, len0);
7296
+ wasm.__wbg_set_remoteattachment_filename(this.__wbg_ptr, ptr0, len0);
6936
7297
  }
6937
7298
  /**
6938
7299
  * @param {EncodedContent} content
@@ -7166,7 +7527,7 @@ export class TextContent {
7166
7527
  set content(arg0) {
7167
7528
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
7168
7529
  const len0 = WASM_VECTOR_LEN;
7169
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
7530
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
7170
7531
  }
7171
7532
  }
7172
7533
  if (Symbol.dispose) TextContent.prototype[Symbol.dispose] = TextContent.prototype.free;
@@ -7240,7 +7601,7 @@ export class TransactionMetadata {
7240
7601
  set currency(arg0) {
7241
7602
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
7242
7603
  const len0 = WASM_VECTOR_LEN;
7243
- wasm.__wbg_set_transactionmetadata_currency(this.__wbg_ptr, ptr0, len0);
7604
+ wasm.__wbg_set_remoteattachment_secret(this.__wbg_ptr, ptr0, len0);
7244
7605
  }
7245
7606
  /**
7246
7607
  * @returns {number}
@@ -7312,7 +7673,7 @@ export class TransactionMetadata {
7312
7673
  set toAddress(arg0) {
7313
7674
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
7314
7675
  const len0 = WASM_VECTOR_LEN;
7315
- wasm.__wbg_set_transactionmetadata_toAddress(this.__wbg_ptr, ptr0, len0);
7676
+ wasm.__wbg_set_remoteattachment_nonce(this.__wbg_ptr, ptr0, len0);
7316
7677
  }
7317
7678
  }
7318
7679
  if (Symbol.dispose) TransactionMetadata.prototype[Symbol.dispose] = TransactionMetadata.prototype.free;
@@ -8201,26 +8562,26 @@ function __wbg_get_imports() {
8201
8562
  const ret = Date.now();
8202
8563
  return ret;
8203
8564
  };
8204
- imports.wbg.__wbg_on_auth_required_5ac1caba0598597f = function() { return handleError(function (arg0) {
8565
+ imports.wbg.__wbg_on_auth_required_884c3ae8438cc478 = function() { return handleError(function (arg0) {
8205
8566
  const ret = arg0.on_auth_required();
8206
8567
  return ret;
8207
8568
  }, arguments) };
8208
- imports.wbg.__wbg_on_close_73985efed19dd92e = function(arg0) {
8569
+ imports.wbg.__wbg_on_close_db7d4d40c2a42d99 = function(arg0) {
8209
8570
  arg0.on_close();
8210
8571
  };
8211
- imports.wbg.__wbg_on_consent_update_35b5db29591b8109 = function(arg0, arg1) {
8572
+ imports.wbg.__wbg_on_consent_update_f7a1e7774ce44423 = function(arg0, arg1) {
8212
8573
  arg0.on_consent_update(arg1);
8213
8574
  };
8214
- imports.wbg.__wbg_on_conversation_2254cf97d597e25f = function(arg0, arg1) {
8575
+ imports.wbg.__wbg_on_conversation_3c5fe02f5d11dd38 = function(arg0, arg1) {
8215
8576
  arg0.on_conversation(Conversation.__wrap(arg1));
8216
8577
  };
8217
- imports.wbg.__wbg_on_error_dda0110e69022a6e = function(arg0, arg1) {
8578
+ imports.wbg.__wbg_on_error_de1dd00d3e3ad8c1 = function(arg0, arg1) {
8218
8579
  arg0.on_error(arg1);
8219
8580
  };
8220
- imports.wbg.__wbg_on_message_50fa665d9bc370db = function(arg0, arg1) {
8581
+ imports.wbg.__wbg_on_message_d54c6d4e3fbf933f = function(arg0, arg1) {
8221
8582
  arg0.on_message(Message.__wrap(arg1));
8222
8583
  };
8223
- imports.wbg.__wbg_on_message_deleted_c49779aec3c7e0a3 = function(arg0, arg1, arg2) {
8584
+ imports.wbg.__wbg_on_message_deleted_3cbc940dccca9a39 = function(arg0, arg1, arg2) {
8224
8585
  let deferred0_0;
8225
8586
  let deferred0_1;
8226
8587
  try {
@@ -8231,7 +8592,7 @@ function __wbg_get_imports() {
8231
8592
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
8232
8593
  }
8233
8594
  };
8234
- imports.wbg.__wbg_on_user_preference_update_73815006f3995f17 = function(arg0, arg1, arg2) {
8595
+ imports.wbg.__wbg_on_user_preference_update_3e76d73275e49cc8 = function(arg0, arg1, arg2) {
8235
8596
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
8236
8597
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
8237
8598
  arg0.on_user_preference_update(v0);
@@ -8515,21 +8876,16 @@ function __wbg_get_imports() {
8515
8876
  const ret = XmtpCursor.__unwrap(arg0);
8516
8877
  return ret;
8517
8878
  };
8879
+ imports.wbg.__wbindgen_cast_0a6e8e0063ffb241 = function(arg0, arg1) {
8880
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7180, function: Function { arguments: [], shim_idx: 7181, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8881
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h83869f5b20c236a6, wasm_bindgen__convert__closures_____invoke__hafab8b28acda63ce);
8882
+ return ret;
8883
+ };
8518
8884
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
8519
8885
  // Cast intrinsic for `Ref(String) -> Externref`.
8520
8886
  const ret = getStringFromWasm0(arg0, arg1);
8521
8887
  return ret;
8522
8888
  };
8523
- imports.wbg.__wbindgen_cast_2f81a6d5c564a490 = function(arg0, arg1) {
8524
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6970, function: Function { arguments: [], shim_idx: 6971, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8525
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8a0c80adf0f210e5, wasm_bindgen__convert__closures_____invoke__h753a3e053785270d);
8526
- return ret;
8527
- };
8528
- imports.wbg.__wbindgen_cast_34976a163ea3aeae = function(arg0, arg1) {
8529
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6766, function: Function { arguments: [], shim_idx: 6767, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8530
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5e0a3136249b832f, wasm_bindgen__convert__closures_____invoke__h9011598bdd38acb2);
8531
- return ret;
8532
- };
8533
8889
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
8534
8890
  // Cast intrinsic for `U64 -> Externref`.
8535
8891
  const ret = BigInt.asUintN(64, arg0);
@@ -8542,13 +8898,13 @@ function __wbg_get_imports() {
8542
8898
  const ret = v0;
8543
8899
  return ret;
8544
8900
  };
8545
- imports.wbg.__wbindgen_cast_7ddadc9b977993ea = function(arg0, arg1) {
8546
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7133, function: Function { arguments: [], shim_idx: 7134, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8547
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h83869f5b20c236a6, wasm_bindgen__convert__closures_____invoke__hafab8b28acda63ce);
8901
+ imports.wbg.__wbindgen_cast_4df210e5afc68b63 = function(arg0, arg1) {
8902
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 6803, function: Function { arguments: [], shim_idx: 6804, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8903
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5e0a3136249b832f, wasm_bindgen__convert__closures_____invoke__h9011598bdd38acb2);
8548
8904
  return ret;
8549
8905
  };
8550
- imports.wbg.__wbindgen_cast_8b962a3b668e3729 = function(arg0, arg1) {
8551
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7169, function: Function { arguments: [Externref], shim_idx: 7180, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8906
+ imports.wbg.__wbindgen_cast_653b2620668ca290 = function(arg0, arg1) {
8907
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7216, function: Function { arguments: [Externref], shim_idx: 7227, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8552
8908
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5faecc40242ea0ca, wasm_bindgen__convert__closures_____invoke__h34df32c886f66f02);
8553
8909
  return ret;
8554
8910
  };
@@ -8571,6 +8927,11 @@ function __wbg_get_imports() {
8571
8927
  const ret = arg0;
8572
8928
  return ret;
8573
8929
  };
8930
+ imports.wbg.__wbindgen_cast_bf4309e1be8fe4e3 = function(arg0, arg1) {
8931
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7017, function: Function { arguments: [], shim_idx: 7018, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8932
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8a0c80adf0f210e5, wasm_bindgen__convert__closures_____invoke__h753a3e053785270d);
8933
+ return ret;
8934
+ };
8574
8935
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
8575
8936
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
8576
8937
  const ret = getArrayU8FromWasm0(arg0, arg1);