@xmtp/wasm-bindings 0.0.10 → 0.0.12

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.
@@ -200,6 +200,41 @@ function debugString(val) {
200
200
  return className;
201
201
  }
202
202
 
203
+ function _assertClass(instance, klass) {
204
+ if (!(instance instanceof klass)) {
205
+ throw new Error(`expected instance of ${klass.name}`);
206
+ }
207
+ }
208
+ /**
209
+ * @param {string} host
210
+ * @param {string} inbox_id
211
+ * @param {string} account_address
212
+ * @param {string | undefined} [db_path]
213
+ * @param {Uint8Array | undefined} [encryption_key]
214
+ * @param {string | undefined} [history_sync_url]
215
+ * @param {LogOptions | undefined} [log_options]
216
+ * @returns {Promise<Client>}
217
+ */
218
+ export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
219
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
220
+ const len0 = WASM_VECTOR_LEN;
221
+ const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
222
+ const len1 = WASM_VECTOR_LEN;
223
+ const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
224
+ const len2 = WASM_VECTOR_LEN;
225
+ var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
226
+ var len3 = WASM_VECTOR_LEN;
227
+ var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
228
+ var len4 = WASM_VECTOR_LEN;
229
+ let ptr5 = 0;
230
+ if (!isLikeNone(log_options)) {
231
+ _assertClass(log_options, LogOptions);
232
+ ptr5 = log_options.__destroy_into_raw();
233
+ }
234
+ const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
235
+ return ret;
236
+ }
237
+
203
238
  function passArrayJsValueToWasm0(array, malloc) {
204
239
  const ptr = malloc(array.length * 4, 4) >>> 0;
205
240
  const mem = getDataViewMemory0();
@@ -209,29 +244,6 @@ function passArrayJsValueToWasm0(array, malloc) {
209
244
  WASM_VECTOR_LEN = array.length;
210
245
  return ptr;
211
246
  }
212
-
213
- function takeFromExternrefTable0(idx) {
214
- const value = wasm.__wbindgen_export_5.get(idx);
215
- wasm.__externref_table_dealloc(idx);
216
- return value;
217
- }
218
-
219
- function getArrayJsValueFromWasm0(ptr, len) {
220
- ptr = ptr >>> 0;
221
- const mem = getDataViewMemory0();
222
- const result = [];
223
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
224
- result.push(wasm.__wbindgen_export_5.get(mem.getUint32(i, true)));
225
- }
226
- wasm.__externref_drop_slice(ptr, len);
227
- return result;
228
- }
229
-
230
- function _assertClass(instance, klass) {
231
- if (!(instance instanceof klass)) {
232
- throw new Error(`expected instance of ${klass.name}`);
233
- }
234
- }
235
247
  /**
236
248
  * @param {string} host
237
249
  * @param {string} account_address
@@ -246,6 +258,11 @@ export function getInboxIdForAddress(host, account_address) {
246
258
  return ret;
247
259
  }
248
260
 
261
+ function takeFromExternrefTable0(idx) {
262
+ const value = wasm.__wbindgen_export_5.get(idx);
263
+ wasm.__externref_table_dealloc(idx);
264
+ return value;
265
+ }
249
266
  /**
250
267
  * @param {string} account_address
251
268
  * @returns {string}
@@ -271,6 +288,16 @@ export function generateInboxId(account_address) {
271
288
  }
272
289
  }
273
290
 
291
+ function getArrayJsValueFromWasm0(ptr, len) {
292
+ ptr = ptr >>> 0;
293
+ const mem = getDataViewMemory0();
294
+ const result = [];
295
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
296
+ result.push(wasm.__wbindgen_export_5.get(mem.getUint32(i, true)));
297
+ }
298
+ wasm.__externref_drop_slice(ptr, len);
299
+ return result;
300
+ }
274
301
  /**
275
302
  * @param {string} signature_text
276
303
  * @param {Uint8Array} signature_bytes
@@ -285,42 +312,23 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
285
312
  }
286
313
  }
287
314
 
288
- /**
289
- * @param {string} host
290
- * @param {string} inbox_id
291
- * @param {string} account_address
292
- * @param {string | undefined} [db_path]
293
- * @param {Uint8Array | undefined} [encryption_key]
294
- * @param {string | undefined} [history_sync_url]
295
- * @param {LogOptions | undefined} [log_options]
296
- * @returns {Promise<Client>}
297
- */
298
- export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
299
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
300
- const len0 = WASM_VECTOR_LEN;
301
- const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
- const len1 = WASM_VECTOR_LEN;
303
- const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
- const len2 = WASM_VECTOR_LEN;
305
- var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
- var len3 = WASM_VECTOR_LEN;
307
- var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
308
- var len4 = WASM_VECTOR_LEN;
309
- let ptr5 = 0;
310
- if (!isLikeNone(log_options)) {
311
- _assertClass(log_options, LogOptions);
312
- ptr5 = log_options.__destroy_into_raw();
313
- }
314
- const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
315
- return ret;
315
+ function getArrayU8FromWasm0(ptr, len) {
316
+ ptr = ptr >>> 0;
317
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
316
318
  }
317
319
 
318
- function __wbg_adapter_50(arg0, arg1, arg2) {
319
- wasm.closure2588_externref_shim(arg0, arg1, arg2);
320
+ function passArray8ToWasm0(arg, malloc) {
321
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
322
+ getUint8ArrayMemory0().set(arg, ptr / 1);
323
+ WASM_VECTOR_LEN = arg.length;
324
+ return ptr;
325
+ }
326
+ function __wbg_adapter_52(arg0, arg1, arg2) {
327
+ wasm.closure2568_externref_shim(arg0, arg1, arg2);
320
328
  }
321
329
 
322
- function __wbg_adapter_576(arg0, arg1, arg2, arg3) {
323
- wasm.closure3682_externref_shim(arg0, arg1, arg2, arg3);
330
+ function __wbg_adapter_591(arg0, arg1, arg2, arg3) {
331
+ wasm.closure3670_externref_shim(arg0, arg1, arg2, arg3);
324
332
  }
325
333
 
326
334
  /**
@@ -374,7 +382,7 @@ export const GroupMessageKind = Object.freeze({
374
382
  * @enum {0 | 1 | 2}
375
383
  */
376
384
  export const GroupPermissionsOptions = Object.freeze({
377
- AllMembers: 0, "0": "AllMembers",
385
+ Default: 0, "0": "Default",
378
386
  AdminOnly: 1, "1": "AdminOnly",
379
387
  CustomPolicy: 2, "2": "CustomPolicy",
380
388
  });
@@ -466,123 +474,6 @@ export class Client {
466
474
  const ptr = this.__destroy_into_raw();
467
475
  wasm.__wbg_client_free(ptr, 0);
468
476
  }
469
- /**
470
- * @param {(Consent)[]} records
471
- * @returns {Promise<void>}
472
- */
473
- setConsentStates(records) {
474
- const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
475
- const len0 = WASM_VECTOR_LEN;
476
- const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
477
- return ret;
478
- }
479
- /**
480
- * @param {ConsentEntityType} entity_type
481
- * @param {string} entity
482
- * @returns {Promise<ConsentState>}
483
- */
484
- getConsentState(entity_type, entity) {
485
- const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
486
- const len0 = WASM_VECTOR_LEN;
487
- const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
488
- return ret;
489
- }
490
- /**
491
- * @returns {Promise<string | undefined>}
492
- */
493
- createInboxSignatureText() {
494
- const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
495
- return ret;
496
- }
497
- /**
498
- * @param {string} new_wallet_address
499
- * @returns {Promise<string>}
500
- */
501
- addWalletSignatureText(new_wallet_address) {
502
- const ptr0 = passStringToWasm0(new_wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
503
- const len0 = WASM_VECTOR_LEN;
504
- const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0, len0);
505
- return ret;
506
- }
507
- /**
508
- * @param {string} wallet_address
509
- * @returns {Promise<string>}
510
- */
511
- revokeWalletSignatureText(wallet_address) {
512
- const ptr0 = passStringToWasm0(wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
513
- const len0 = WASM_VECTOR_LEN;
514
- const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, ptr0, len0);
515
- return ret;
516
- }
517
- /**
518
- * @returns {Promise<string>}
519
- */
520
- revokeAllOtherInstallationsSignatureText() {
521
- const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
522
- return ret;
523
- }
524
- /**
525
- * @param {(Uint8Array)[]} installation_ids
526
- * @returns {Promise<string>}
527
- */
528
- revokeInstallationsSignatureText(installation_ids) {
529
- const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
530
- const len0 = WASM_VECTOR_LEN;
531
- const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
532
- return ret;
533
- }
534
- /**
535
- * @param {SignatureRequestType} signature_type
536
- * @param {Uint8Array} signature_bytes
537
- * @returns {Promise<void>}
538
- */
539
- addSignature(signature_type, signature_bytes) {
540
- const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
541
- return ret;
542
- }
543
- /**
544
- * @param {SignatureRequestType} signature_type
545
- * @param {Uint8Array} signature_bytes
546
- * @param {bigint} chain_id
547
- * @param {bigint | undefined} [block_number]
548
- * @returns {Promise<void>}
549
- */
550
- addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
551
- const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
552
- return ret;
553
- }
554
- /**
555
- * @returns {Promise<void>}
556
- */
557
- applySignatureRequests() {
558
- const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
559
- return ret;
560
- }
561
- /**
562
- * @param {string} signature_text
563
- * @returns {Uint8Array}
564
- */
565
- signWithInstallationKey(signature_text) {
566
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
567
- const len0 = WASM_VECTOR_LEN;
568
- const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
569
- if (ret[2]) {
570
- throw takeFromExternrefTable0(ret[1]);
571
- }
572
- return takeFromExternrefTable0(ret[0]);
573
- }
574
- /**
575
- * @param {string} signature_text
576
- * @param {Uint8Array} signature_bytes
577
- */
578
- verifySignedWithInstallationKey(signature_text, signature_bytes) {
579
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
580
- const len0 = WASM_VECTOR_LEN;
581
- const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
582
- if (ret[1]) {
583
- throw takeFromExternrefTable0(ret[0]);
584
- }
585
- }
586
477
  /**
587
478
  * @returns {string}
588
479
  */
@@ -714,6 +605,123 @@ export class Client {
714
605
  const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
715
606
  return ret;
716
607
  }
608
+ /**
609
+ * @returns {Promise<string | undefined>}
610
+ */
611
+ createInboxSignatureText() {
612
+ const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
613
+ return ret;
614
+ }
615
+ /**
616
+ * @param {string} new_wallet_address
617
+ * @returns {Promise<string>}
618
+ */
619
+ addWalletSignatureText(new_wallet_address) {
620
+ const ptr0 = passStringToWasm0(new_wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
621
+ const len0 = WASM_VECTOR_LEN;
622
+ const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0, len0);
623
+ return ret;
624
+ }
625
+ /**
626
+ * @param {string} wallet_address
627
+ * @returns {Promise<string>}
628
+ */
629
+ revokeWalletSignatureText(wallet_address) {
630
+ const ptr0 = passStringToWasm0(wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
631
+ const len0 = WASM_VECTOR_LEN;
632
+ const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, ptr0, len0);
633
+ return ret;
634
+ }
635
+ /**
636
+ * @returns {Promise<string>}
637
+ */
638
+ revokeAllOtherInstallationsSignatureText() {
639
+ const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
640
+ return ret;
641
+ }
642
+ /**
643
+ * @param {(Uint8Array)[]} installation_ids
644
+ * @returns {Promise<string>}
645
+ */
646
+ revokeInstallationsSignatureText(installation_ids) {
647
+ const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
648
+ const len0 = WASM_VECTOR_LEN;
649
+ const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
650
+ return ret;
651
+ }
652
+ /**
653
+ * @param {SignatureRequestType} signature_type
654
+ * @param {Uint8Array} signature_bytes
655
+ * @returns {Promise<void>}
656
+ */
657
+ addSignature(signature_type, signature_bytes) {
658
+ const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
659
+ return ret;
660
+ }
661
+ /**
662
+ * @param {SignatureRequestType} signature_type
663
+ * @param {Uint8Array} signature_bytes
664
+ * @param {bigint} chain_id
665
+ * @param {bigint | undefined} [block_number]
666
+ * @returns {Promise<void>}
667
+ */
668
+ addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
669
+ const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
670
+ return ret;
671
+ }
672
+ /**
673
+ * @returns {Promise<void>}
674
+ */
675
+ applySignatureRequests() {
676
+ const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
677
+ return ret;
678
+ }
679
+ /**
680
+ * @param {string} signature_text
681
+ * @returns {Uint8Array}
682
+ */
683
+ signWithInstallationKey(signature_text) {
684
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
685
+ const len0 = WASM_VECTOR_LEN;
686
+ const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
687
+ if (ret[2]) {
688
+ throw takeFromExternrefTable0(ret[1]);
689
+ }
690
+ return takeFromExternrefTable0(ret[0]);
691
+ }
692
+ /**
693
+ * @param {string} signature_text
694
+ * @param {Uint8Array} signature_bytes
695
+ */
696
+ verifySignedWithInstallationKey(signature_text, signature_bytes) {
697
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
698
+ const len0 = WASM_VECTOR_LEN;
699
+ const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
700
+ if (ret[1]) {
701
+ throw takeFromExternrefTable0(ret[0]);
702
+ }
703
+ }
704
+ /**
705
+ * @param {(Consent)[]} records
706
+ * @returns {Promise<void>}
707
+ */
708
+ setConsentStates(records) {
709
+ const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
710
+ const len0 = WASM_VECTOR_LEN;
711
+ const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
712
+ return ret;
713
+ }
714
+ /**
715
+ * @param {ConsentEntityType} entity_type
716
+ * @param {string} entity
717
+ * @returns {Promise<ConsentState>}
718
+ */
719
+ getConsentState(entity_type, entity) {
720
+ const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
721
+ const len0 = WASM_VECTOR_LEN;
722
+ const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
723
+ return ret;
724
+ }
717
725
  }
718
726
 
719
727
  const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -850,7 +858,7 @@ export class ContentTypeId {
850
858
  set authorityId(arg0) {
851
859
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
852
860
  const len0 = WASM_VECTOR_LEN;
853
- wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
861
+ wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
854
862
  }
855
863
  /**
856
864
  * @returns {string}
@@ -1496,7 +1504,7 @@ export class Conversations {
1496
1504
  }
1497
1505
  /**
1498
1506
  * @param {ListConversationsOptions | undefined} [opts]
1499
- * @returns {Promise<Array<any>>}
1507
+ * @returns {Array<any>}
1500
1508
  */
1501
1509
  list(opts) {
1502
1510
  let ptr0 = 0;
@@ -1505,11 +1513,14 @@ export class Conversations {
1505
1513
  ptr0 = opts.__destroy_into_raw();
1506
1514
  }
1507
1515
  const ret = wasm.conversations_list(this.__wbg_ptr, ptr0);
1508
- return ret;
1516
+ if (ret[2]) {
1517
+ throw takeFromExternrefTable0(ret[1]);
1518
+ }
1519
+ return takeFromExternrefTable0(ret[0]);
1509
1520
  }
1510
1521
  /**
1511
1522
  * @param {ListConversationsOptions | undefined} [opts]
1512
- * @returns {Promise<Array<any>>}
1523
+ * @returns {Array<any>}
1513
1524
  */
1514
1525
  listGroups(opts) {
1515
1526
  let ptr0 = 0;
@@ -1518,11 +1529,14 @@ export class Conversations {
1518
1529
  ptr0 = opts.__destroy_into_raw();
1519
1530
  }
1520
1531
  const ret = wasm.conversations_listGroups(this.__wbg_ptr, ptr0);
1521
- return ret;
1532
+ if (ret[2]) {
1533
+ throw takeFromExternrefTable0(ret[1]);
1534
+ }
1535
+ return takeFromExternrefTable0(ret[0]);
1522
1536
  }
1523
1537
  /**
1524
1538
  * @param {ListConversationsOptions | undefined} [opts]
1525
- * @returns {Promise<Array<any>>}
1539
+ * @returns {Array<any>}
1526
1540
  */
1527
1541
  listDms(opts) {
1528
1542
  let ptr0 = 0;
@@ -1531,7 +1545,20 @@ export class Conversations {
1531
1545
  ptr0 = opts.__destroy_into_raw();
1532
1546
  }
1533
1547
  const ret = wasm.conversations_listDms(this.__wbg_ptr, ptr0);
1534
- return ret;
1548
+ if (ret[2]) {
1549
+ throw takeFromExternrefTable0(ret[1]);
1550
+ }
1551
+ return takeFromExternrefTable0(ret[0]);
1552
+ }
1553
+ /**
1554
+ * @returns {any}
1555
+ */
1556
+ getHmacKeys() {
1557
+ const ret = wasm.conversations_getHmacKeys(this.__wbg_ptr);
1558
+ if (ret[2]) {
1559
+ throw takeFromExternrefTable0(ret[1]);
1560
+ }
1561
+ return takeFromExternrefTable0(ret[0]);
1535
1562
  }
1536
1563
  }
1537
1564
 
@@ -1663,6 +1690,32 @@ export class CreateGroupOptions {
1663
1690
  }
1664
1691
  wasm.__wbg_set_creategroupoptions_customPermissionPolicySet(this.__wbg_ptr, ptr0);
1665
1692
  }
1693
+ /**
1694
+ * @returns {bigint | undefined}
1695
+ */
1696
+ get messageExpirationFromMillis() {
1697
+ const ret = wasm.__wbg_get_creategroupoptions_messageExpirationFromMillis(this.__wbg_ptr);
1698
+ return ret[0] === 0 ? undefined : ret[1];
1699
+ }
1700
+ /**
1701
+ * @param {bigint | undefined} [arg0]
1702
+ */
1703
+ set messageExpirationFromMillis(arg0) {
1704
+ wasm.__wbg_set_creategroupoptions_messageExpirationFromMillis(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
1705
+ }
1706
+ /**
1707
+ * @returns {bigint | undefined}
1708
+ */
1709
+ get messageExpirationMillis() {
1710
+ const ret = wasm.__wbg_get_creategroupoptions_messageExpirationMillis(this.__wbg_ptr);
1711
+ return ret[0] === 0 ? undefined : ret[1];
1712
+ }
1713
+ /**
1714
+ * @param {bigint | undefined} [arg0]
1715
+ */
1716
+ set messageExpirationMillis(arg0) {
1717
+ wasm.__wbg_set_creategroupoptions_messageExpirationMillis(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
1718
+ }
1666
1719
  /**
1667
1720
  * @param {GroupPermissionsOptions | undefined} [permissions]
1668
1721
  * @param {string | undefined} [group_name]
@@ -1670,8 +1723,10 @@ export class CreateGroupOptions {
1670
1723
  * @param {string | undefined} [group_description]
1671
1724
  * @param {string | undefined} [group_pinned_frame_url]
1672
1725
  * @param {PermissionPolicySet | undefined} [custom_permission_policy_set]
1726
+ * @param {bigint | undefined} [message_expiration_from_ms]
1727
+ * @param {bigint | undefined} [message_expiration_ms]
1673
1728
  */
1674
- constructor(permissions, group_name, group_image_url_square, group_description, group_pinned_frame_url, custom_permission_policy_set) {
1729
+ constructor(permissions, group_name, group_image_url_square, group_description, group_pinned_frame_url, custom_permission_policy_set, message_expiration_from_ms, message_expiration_ms) {
1675
1730
  var ptr0 = isLikeNone(group_name) ? 0 : passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1676
1731
  var len0 = WASM_VECTOR_LEN;
1677
1732
  var ptr1 = isLikeNone(group_image_url_square) ? 0 : passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1685,7 +1740,7 @@ export class CreateGroupOptions {
1685
1740
  _assertClass(custom_permission_policy_set, PermissionPolicySet);
1686
1741
  ptr4 = custom_permission_policy_set.__destroy_into_raw();
1687
1742
  }
1688
- const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4);
1743
+ const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, !isLikeNone(message_expiration_from_ms), isLikeNone(message_expiration_from_ms) ? BigInt(0) : message_expiration_from_ms, !isLikeNone(message_expiration_ms), isLikeNone(message_expiration_ms) ? BigInt(0) : message_expiration_ms);
1689
1744
  this.__wbg_ptr = ret >>> 0;
1690
1745
  CreateGroupOptionsFinalization.register(this, this.__wbg_ptr, this);
1691
1746
  return this;
@@ -1854,7 +1909,7 @@ export class GroupMember {
1854
1909
  set inboxId(arg0) {
1855
1910
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1856
1911
  const len0 = WASM_VECTOR_LEN;
1857
- wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
1912
+ wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
1858
1913
  }
1859
1914
  /**
1860
1915
  * @returns {(string)[]}
@@ -2041,6 +2096,55 @@ export class GroupPermissions {
2041
2096
  }
2042
2097
  }
2043
2098
 
2099
+ const HmacKeyFinalization = (typeof FinalizationRegistry === 'undefined')
2100
+ ? { register: () => {}, unregister: () => {} }
2101
+ : new FinalizationRegistry(ptr => wasm.__wbg_hmackey_free(ptr >>> 0, 1));
2102
+
2103
+ export class HmacKey {
2104
+
2105
+ __destroy_into_raw() {
2106
+ const ptr = this.__wbg_ptr;
2107
+ this.__wbg_ptr = 0;
2108
+ HmacKeyFinalization.unregister(this);
2109
+ return ptr;
2110
+ }
2111
+
2112
+ free() {
2113
+ const ptr = this.__destroy_into_raw();
2114
+ wasm.__wbg_hmackey_free(ptr, 0);
2115
+ }
2116
+ /**
2117
+ * @returns {Uint8Array}
2118
+ */
2119
+ get key() {
2120
+ const ret = wasm.__wbg_get_hmackey_key(this.__wbg_ptr);
2121
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2122
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2123
+ return v1;
2124
+ }
2125
+ /**
2126
+ * @param {Uint8Array} arg0
2127
+ */
2128
+ set key(arg0) {
2129
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
2130
+ const len0 = WASM_VECTOR_LEN;
2131
+ wasm.__wbg_set_hmackey_key(this.__wbg_ptr, ptr0, len0);
2132
+ }
2133
+ /**
2134
+ * @returns {bigint}
2135
+ */
2136
+ get epoch() {
2137
+ const ret = wasm.__wbg_get_hmackey_epoch(this.__wbg_ptr);
2138
+ return ret;
2139
+ }
2140
+ /**
2141
+ * @param {bigint} arg0
2142
+ */
2143
+ set epoch(arg0) {
2144
+ wasm.__wbg_set_hmackey_epoch(this.__wbg_ptr, arg0);
2145
+ }
2146
+ }
2147
+
2044
2148
  const InboxStateFinalization = (typeof FinalizationRegistry === 'undefined')
2045
2149
  ? { register: () => {}, unregister: () => {} }
2046
2150
  : new FinalizationRegistry(ptr => wasm.__wbg_inboxstate_free(ptr >>> 0, 1));
@@ -2087,7 +2191,7 @@ export class InboxState {
2087
2191
  set inboxId(arg0) {
2088
2192
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2089
2193
  const len0 = WASM_VECTOR_LEN;
2090
- wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
2194
+ wasm.__wbg_set_inboxstate_inboxId(this.__wbg_ptr, ptr0, len0);
2091
2195
  }
2092
2196
  /**
2093
2197
  * @returns {string}
@@ -2200,6 +2304,19 @@ export class Installation {
2200
2304
  const ptr = this.__destroy_into_raw();
2201
2305
  wasm.__wbg_installation_free(ptr, 0);
2202
2306
  }
2307
+ /**
2308
+ * @returns {Uint8Array}
2309
+ */
2310
+ get bytes() {
2311
+ const ret = wasm.__wbg_get_installation_bytes(this.__wbg_ptr);
2312
+ return ret;
2313
+ }
2314
+ /**
2315
+ * @param {Uint8Array} arg0
2316
+ */
2317
+ set bytes(arg0) {
2318
+ wasm.__wbg_set_installation_bytes(this.__wbg_ptr, arg0);
2319
+ }
2203
2320
  /**
2204
2321
  * @returns {string}
2205
2322
  */
@@ -2237,13 +2354,14 @@ export class Installation {
2237
2354
  wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2238
2355
  }
2239
2356
  /**
2357
+ * @param {Uint8Array} bytes
2240
2358
  * @param {string} id
2241
2359
  * @param {bigint | undefined} [client_timestamp_ns]
2242
2360
  */
2243
- constructor(id, client_timestamp_ns) {
2361
+ constructor(bytes, id, client_timestamp_ns) {
2244
2362
  const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2245
2363
  const len0 = WASM_VECTOR_LEN;
2246
- const ret = wasm.installation_new(ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
2364
+ const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
2247
2365
  this.__wbg_ptr = ret >>> 0;
2248
2366
  InstallationFinalization.register(this, this.__wbg_ptr, this);
2249
2367
  return this;
@@ -2437,7 +2555,7 @@ export class ListConversationsOptions {
2437
2555
  * @param {bigint | undefined} [arg0]
2438
2556
  */
2439
2557
  set createdAfterNs(arg0) {
2440
- wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2558
+ wasm.__wbg_set_creategroupoptions_messageExpirationFromMillis(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2441
2559
  }
2442
2560
  /**
2443
2561
  * @returns {bigint | undefined}
@@ -2450,7 +2568,7 @@ export class ListConversationsOptions {
2450
2568
  * @param {bigint | undefined} [arg0]
2451
2569
  */
2452
2570
  set createdBeforeNs(arg0) {
2453
- wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2571
+ wasm.__wbg_set_creategroupoptions_messageExpirationMillis(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2454
2572
  }
2455
2573
  /**
2456
2574
  * @returns {bigint | undefined}
@@ -2510,7 +2628,7 @@ export class ListMessagesOptions {
2510
2628
  * @param {bigint | undefined} [arg0]
2511
2629
  */
2512
2630
  set sentBeforeNs(arg0) {
2513
- wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2631
+ wasm.__wbg_set_creategroupoptions_messageExpirationFromMillis(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2514
2632
  }
2515
2633
  /**
2516
2634
  * @returns {bigint | undefined}
@@ -2523,7 +2641,7 @@ export class ListMessagesOptions {
2523
2641
  * @param {bigint | undefined} [arg0]
2524
2642
  */
2525
2643
  set sentAfterNs(arg0) {
2526
- wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2644
+ wasm.__wbg_set_creategroupoptions_messageExpirationMillis(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
2527
2645
  }
2528
2646
  /**
2529
2647
  * @returns {bigint | undefined}
@@ -2708,14 +2826,14 @@ export class Message {
2708
2826
  * @returns {bigint}
2709
2827
  */
2710
2828
  get sentAtNs() {
2711
- const ret = wasm.__wbg_get_message_sentAtNs(this.__wbg_ptr);
2829
+ const ret = wasm.__wbg_get_hmackey_epoch(this.__wbg_ptr);
2712
2830
  return ret;
2713
2831
  }
2714
2832
  /**
2715
2833
  * @param {bigint} arg0
2716
2834
  */
2717
2835
  set sentAtNs(arg0) {
2718
- wasm.__wbg_set_message_sentAtNs(this.__wbg_ptr, arg0);
2836
+ wasm.__wbg_set_hmackey_epoch(this.__wbg_ptr, arg0);
2719
2837
  }
2720
2838
  /**
2721
2839
  * @returns {string}
@@ -2958,6 +3076,19 @@ export class PermissionPolicySet {
2958
3076
  set updateGroupPinnedFrameUrlPolicy(arg0) {
2959
3077
  wasm.__wbg_set_permissionpolicyset_updateGroupPinnedFrameUrlPolicy(this.__wbg_ptr, arg0);
2960
3078
  }
3079
+ /**
3080
+ * @returns {PermissionPolicy}
3081
+ */
3082
+ get updateMessageExpirationPolicy() {
3083
+ const ret = wasm.__wbg_get_permissionpolicyset_updateMessageExpirationPolicy(this.__wbg_ptr);
3084
+ return ret;
3085
+ }
3086
+ /**
3087
+ * @param {PermissionPolicy} arg0
3088
+ */
3089
+ set updateMessageExpirationPolicy(arg0) {
3090
+ wasm.__wbg_set_permissionpolicyset_updateMessageExpirationPolicy(this.__wbg_ptr, arg0);
3091
+ }
2961
3092
  /**
2962
3093
  * @param {PermissionPolicy} add_member_policy
2963
3094
  * @param {PermissionPolicy} remove_member_policy
@@ -2967,9 +3098,10 @@ export class PermissionPolicySet {
2967
3098
  * @param {PermissionPolicy} update_group_description_policy
2968
3099
  * @param {PermissionPolicy} update_group_image_url_square_policy
2969
3100
  * @param {PermissionPolicy} update_group_pinned_frame_url_policy
3101
+ * @param {PermissionPolicy} update_message_expiration_ms_policy
2970
3102
  */
2971
- constructor(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_group_pinned_frame_url_policy) {
2972
- const ret = wasm.permissionpolicyset_new(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_group_pinned_frame_url_policy);
3103
+ constructor(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_group_pinned_frame_url_policy, update_message_expiration_ms_policy) {
3104
+ const ret = wasm.permissionpolicyset_new(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_group_pinned_frame_url_policy, update_message_expiration_ms_policy);
2973
3105
  this.__wbg_ptr = ret >>> 0;
2974
3106
  PermissionPolicySetFinalization.register(this, this.__wbg_ptr, this);
2975
3107
  return this;
@@ -3491,7 +3623,7 @@ function __wbg_get_imports() {
3491
3623
  const a = state0.a;
3492
3624
  state0.a = 0;
3493
3625
  try {
3494
- return __wbg_adapter_576(a, state0.b, arg0, arg1);
3626
+ return __wbg_adapter_591(a, state0.b, arg0, arg1);
3495
3627
  } finally {
3496
3628
  state0.a = a;
3497
3629
  }
@@ -3801,6 +3933,10 @@ function __wbg_get_imports() {
3801
3933
  const ret = +arg0;
3802
3934
  return ret;
3803
3935
  };
3936
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
3937
+ const ret = arg0;
3938
+ return ret;
3939
+ };
3804
3940
  imports.wbg.__wbindgen_boolean_get = function(arg0) {
3805
3941
  const v = arg0;
3806
3942
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
@@ -3815,8 +3951,8 @@ function __wbg_get_imports() {
3815
3951
  const ret = false;
3816
3952
  return ret;
3817
3953
  };
3818
- imports.wbg.__wbindgen_closure_wrapper11191 = function(arg0, arg1, arg2) {
3819
- const ret = makeMutClosure(arg0, arg1, 2589, __wbg_adapter_50);
3954
+ imports.wbg.__wbindgen_closure_wrapper11337 = function(arg0, arg1, arg2) {
3955
+ const ret = makeMutClosure(arg0, arg1, 2569, __wbg_adapter_52);
3820
3956
  return ret;
3821
3957
  };
3822
3958
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {