@xmtp/wasm-bindings 1.7.0-rc2 → 1.8.0

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.
@@ -234,12 +234,98 @@ function passArrayJsValueToWasm0(array, malloc) {
234
234
  WASM_VECTOR_LEN = array.length;
235
235
  return ptr;
236
236
  }
237
+ /**
238
+ * @param {string} host
239
+ * @param {string | null | undefined} gatewayHost
240
+ * @param {string[]} inboxIds
241
+ * @returns {Promise<InboxState[]>}
242
+ */
243
+ export function inboxStateFromInboxIds(host, gatewayHost, inboxIds) {
244
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
245
+ const len0 = WASM_VECTOR_LEN;
246
+ var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
247
+ var len1 = WASM_VECTOR_LEN;
248
+ const ptr2 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
249
+ const len2 = WASM_VECTOR_LEN;
250
+ const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
251
+ return ret;
252
+ }
253
+
254
+ /**
255
+ * @param {MetadataField} field
256
+ * @returns {string}
257
+ */
258
+ export function metadataFieldName(field) {
259
+ let deferred1_0;
260
+ let deferred1_1;
261
+ try {
262
+ const ret = wasm.metadataFieldName(field);
263
+ deferred1_0 = ret[0];
264
+ deferred1_1 = ret[1];
265
+ return getStringFromWasm0(ret[0], ret[1]);
266
+ } finally {
267
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
268
+ }
269
+ }
237
270
 
238
271
  function takeFromExternrefTable0(idx) {
239
272
  const value = wasm.__wbindgen_externrefs.get(idx);
240
273
  wasm.__externref_table_dealloc(idx);
241
274
  return value;
242
275
  }
276
+ /**
277
+ * @returns {ContentTypeId}
278
+ */
279
+ export function contentTypeLeaveRequest() {
280
+ const ret = wasm.contentTypeLeaveRequest();
281
+ return ret;
282
+ }
283
+
284
+ function _assertClass(instance, klass) {
285
+ if (!(instance instanceof klass)) {
286
+ throw new Error(`expected instance of ${klass.name}`);
287
+ }
288
+ }
289
+ /**
290
+ * @param {Identifier} accountIdentifier
291
+ * @param {bigint | null} [nonce]
292
+ * @returns {string}
293
+ */
294
+ export function generateInboxId(accountIdentifier, nonce) {
295
+ let deferred2_0;
296
+ let deferred2_1;
297
+ try {
298
+ const ret = wasm.generateInboxId(accountIdentifier, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
299
+ var ptr1 = ret[0];
300
+ var len1 = ret[1];
301
+ if (ret[3]) {
302
+ ptr1 = 0; len1 = 0;
303
+ throw takeFromExternrefTable0(ret[2]);
304
+ }
305
+ deferred2_0 = ptr1;
306
+ deferred2_1 = len1;
307
+ return getStringFromWasm0(ptr1, len1);
308
+ } finally {
309
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
310
+ }
311
+ }
312
+
313
+ /**
314
+ * @param {string} host
315
+ * @param {string | null | undefined} gatewayHost
316
+ * @param {boolean} isSecure
317
+ * @param {Identifier} accountIdentifier
318
+ * @returns {Promise<string | undefined>}
319
+ */
320
+ export function getInboxIdForIdentifier(host, gatewayHost, isSecure, accountIdentifier) {
321
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
+ const len0 = WASM_VECTOR_LEN;
323
+ var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
324
+ var len1 = WASM_VECTOR_LEN;
325
+ const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, isSecure, accountIdentifier);
326
+ return ret;
327
+ }
328
+
243
329
  /**
244
330
  * @param {string} host
245
331
  * @param {string | null | undefined} gatewayHost
@@ -264,6 +350,22 @@ export function revokeInstallationsSignatureRequest(host, gatewayHost, recoveryI
264
350
  return SignatureRequestHandle.__wrap(ret[0]);
265
351
  }
266
352
 
353
+ /**
354
+ * @param {string} host
355
+ * @param {string | null | undefined} gatewayHost
356
+ * @param {SignatureRequestHandle} signatureRequest
357
+ * @returns {Promise<void>}
358
+ */
359
+ export function applySignatureRequest(host, gatewayHost, signatureRequest) {
360
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
361
+ const len0 = WASM_VECTOR_LEN;
362
+ var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
363
+ var len1 = WASM_VECTOR_LEN;
364
+ _assertClass(signatureRequest, SignatureRequestHandle);
365
+ const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signatureRequest.__wbg_ptr);
366
+ return ret;
367
+ }
368
+
267
369
  /**
268
370
  * @param {string} signatureText
269
371
  * @param {Uint8Array} signatureBytes
@@ -278,24 +380,11 @@ export function verifySignedWithPublicKey(signatureText, signatureBytes, publicK
278
380
  }
279
381
  }
280
382
 
281
- function _assertClass(instance, klass) {
282
- if (!(instance instanceof klass)) {
283
- throw new Error(`expected instance of ${klass.name}`);
284
- }
285
- }
286
383
  /**
287
- * @param {string} host
288
- * @param {string | null | undefined} gatewayHost
289
- * @param {SignatureRequestHandle} signatureRequest
290
- * @returns {Promise<void>}
384
+ * @returns {ContentTypeId}
291
385
  */
292
- export function applySignatureRequest(host, gatewayHost, signatureRequest) {
293
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294
- const len0 = WASM_VECTOR_LEN;
295
- var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
296
- var len1 = WASM_VECTOR_LEN;
297
- _assertClass(signatureRequest, SignatureRequestHandle);
298
- const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signatureRequest.__wbg_ptr);
386
+ export function contentTypeAttachment() {
387
+ const ret = wasm.contentTypeAttachment();
299
388
  return ret;
300
389
  }
301
390
 
@@ -314,8 +403,8 @@ export function encodeAttachment(attachment) {
314
403
  /**
315
404
  * @returns {ContentTypeId}
316
405
  */
317
- export function attachmentContentType() {
318
- const ret = wasm.attachmentContentType();
406
+ export function contentTypeReadReceipt() {
407
+ const ret = wasm.contentTypeReadReceipt();
319
408
  return ret;
320
409
  }
321
410
 
@@ -334,33 +423,27 @@ export function encodeReadReceipt(read_receipt) {
334
423
  /**
335
424
  * @returns {ContentTypeId}
336
425
  */
337
- export function readReceiptContentType() {
338
- const ret = wasm.readReceiptContentType();
339
- return ret;
340
- }
341
-
342
- /**
343
- * @returns {ContentTypeId}
344
- */
345
- export function groupUpdatedContentType() {
346
- const ret = wasm.groupUpdatedContentType();
426
+ export function contentTypeGroupUpdated() {
427
+ const ret = wasm.contentTypeGroupUpdated();
347
428
  return ret;
348
429
  }
349
430
 
350
- /**
351
- * @returns {ContentTypeId}
352
- */
353
- export function leaveRequestContentType() {
354
- const ret = wasm.leaveRequestContentType();
355
- return ret;
431
+ function passArray8ToWasm0(arg, malloc) {
432
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
433
+ getUint8ArrayMemory0().set(arg, ptr / 1);
434
+ WASM_VECTOR_LEN = arg.length;
435
+ return ptr;
356
436
  }
357
-
358
437
  /**
359
- * @param {RemoteAttachment} remote_attachment
360
- * @returns {EncodedContent}
438
+ * Decrypts an encrypted payload from a remote attachment.
439
+ * @param {Uint8Array} encryptedBytes
440
+ * @param {RemoteAttachment} remoteAttachment
441
+ * @returns {Attachment}
361
442
  */
362
- export function encodeRemoteAttachment(remote_attachment) {
363
- const ret = wasm.encodeRemoteAttachment(remote_attachment);
443
+ export function decryptAttachment(encryptedBytes, remoteAttachment) {
444
+ const ptr0 = passArray8ToWasm0(encryptedBytes, wasm.__wbindgen_malloc);
445
+ const len0 = WASM_VECTOR_LEN;
446
+ const ret = wasm.decryptAttachment(ptr0, len0, remoteAttachment);
364
447
  if (ret[2]) {
365
448
  throw takeFromExternrefTable0(ret[1]);
366
449
  }
@@ -380,22 +463,12 @@ export function encryptAttachment(attachment) {
380
463
  return takeFromExternrefTable0(ret[0]);
381
464
  }
382
465
 
383
- function passArray8ToWasm0(arg, malloc) {
384
- const ptr = malloc(arg.length * 1, 1) >>> 0;
385
- getUint8ArrayMemory0().set(arg, ptr / 1);
386
- WASM_VECTOR_LEN = arg.length;
387
- return ptr;
388
- }
389
466
  /**
390
- * Decrypts an encrypted payload from a remote attachment.
391
- * @param {Uint8Array} encryptedBytes
392
- * @param {RemoteAttachment} remoteAttachment
393
- * @returns {Attachment}
467
+ * @param {RemoteAttachment} remote_attachment
468
+ * @returns {EncodedContent}
394
469
  */
395
- export function decryptAttachment(encryptedBytes, remoteAttachment) {
396
- const ptr0 = passArray8ToWasm0(encryptedBytes, wasm.__wbindgen_malloc);
397
- const len0 = WASM_VECTOR_LEN;
398
- const ret = wasm.decryptAttachment(ptr0, len0, remoteAttachment);
470
+ export function encodeRemoteAttachment(remote_attachment) {
471
+ const ret = wasm.encodeRemoteAttachment(remote_attachment);
399
472
  if (ret[2]) {
400
473
  throw takeFromExternrefTable0(ret[1]);
401
474
  }
@@ -405,8 +478,8 @@ export function decryptAttachment(encryptedBytes, remoteAttachment) {
405
478
  /**
406
479
  * @returns {ContentTypeId}
407
480
  */
408
- export function remoteAttachmentContentType() {
409
- const ret = wasm.remoteAttachmentContentType();
481
+ export function contentTypeRemoteAttachment() {
482
+ const ret = wasm.contentTypeRemoteAttachment();
410
483
  return ret;
411
484
  }
412
485
 
@@ -425,16 +498,16 @@ export function encodeWalletSendCalls(wallet_send_calls) {
425
498
  /**
426
499
  * @returns {ContentTypeId}
427
500
  */
428
- export function walletSendCallsContentType() {
429
- const ret = wasm.walletSendCallsContentType();
501
+ export function contentTypeWalletSendCalls() {
502
+ const ret = wasm.contentTypeWalletSendCalls();
430
503
  return ret;
431
504
  }
432
505
 
433
506
  /**
434
507
  * @returns {ContentTypeId}
435
508
  */
436
- export function transactionReferenceContentType() {
437
- const ret = wasm.transactionReferenceContentType();
509
+ export function contentTypeTransactionReference() {
510
+ const ret = wasm.contentTypeTransactionReference();
438
511
  return ret;
439
512
  }
440
513
 
@@ -465,8 +538,8 @@ export function encodeMultiRemoteAttachment(multi_remote_attachment) {
465
538
  /**
466
539
  * @returns {ContentTypeId}
467
540
  */
468
- export function multiRemoteAttachmentContentType() {
469
- const ret = wasm.multiRemoteAttachmentContentType();
541
+ export function contentTypeMultiRemoteAttachment() {
542
+ const ret = wasm.contentTypeMultiRemoteAttachment();
470
543
  return ret;
471
544
  }
472
545
 
@@ -487,16 +560,16 @@ export function encodeText(text) {
487
560
  /**
488
561
  * @returns {ContentTypeId}
489
562
  */
490
- export function textContentType() {
491
- const ret = wasm.textContentType();
563
+ export function contentTypeText() {
564
+ const ret = wasm.contentTypeText();
492
565
  return ret;
493
566
  }
494
567
 
495
568
  /**
496
569
  * @returns {ContentTypeId}
497
570
  */
498
- export function replyContentType() {
499
- const ret = wasm.replyContentType();
571
+ export function contentTypeReply() {
572
+ const ret = wasm.contentTypeReply();
500
573
  return ret;
501
574
  }
502
575
 
@@ -515,8 +588,16 @@ export function encodeIntent(intent) {
515
588
  /**
516
589
  * @returns {ContentTypeId}
517
590
  */
518
- export function intentContentType() {
519
- const ret = wasm.intentContentType();
591
+ export function contentTypeIntent() {
592
+ const ret = wasm.contentTypeIntent();
593
+ return ret;
594
+ }
595
+
596
+ /**
597
+ * @returns {ContentTypeId}
598
+ */
599
+ export function contentTypeActions() {
600
+ const ret = wasm.contentTypeActions();
520
601
  return ret;
521
602
  }
522
603
 
@@ -535,16 +616,8 @@ export function encodeActions(actions) {
535
616
  /**
536
617
  * @returns {ContentTypeId}
537
618
  */
538
- export function actionsContentType() {
539
- const ret = wasm.actionsContentType();
540
- return ret;
541
- }
542
-
543
- /**
544
- * @returns {ContentTypeId}
545
- */
546
- export function markdownContentType() {
547
- const ret = wasm.markdownContentType();
619
+ export function contentTypeMarkdown() {
620
+ const ret = wasm.contentTypeMarkdown();
548
621
  return ret;
549
622
  }
550
623
 
@@ -577,8 +650,8 @@ export function encodeReaction(reaction) {
577
650
  /**
578
651
  * @returns {ContentTypeId}
579
652
  */
580
- export function reactionContentType() {
581
- const ret = wasm.reactionContentType();
653
+ export function contentTypeReaction() {
654
+ const ret = wasm.contentTypeReaction();
582
655
  return ret;
583
656
  }
584
657
 
@@ -618,63 +691,111 @@ export function createClient(host, inboxId, accountIdentifier, dbPath, encryptio
618
691
  _assertClass(authHandle, AuthHandle);
619
692
  ptr6 = authHandle.__destroy_into_raw();
620
693
  }
621
- const ret = wasm.createClient(ptr0, len0, ptr1, len1, accountIdentifier, ptr2, len2, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey), ptr3, len3, isLikeNone(deviceSyncWorkerMode) ? 0 : addToExternrefTable0(deviceSyncWorkerMode), isLikeNone(logOptions) ? 0 : addToExternrefTable0(logOptions), isLikeNone(allowOffline) ? 0xFFFFFF : allowOffline ? 1 : 0, ptr4, len4, ptr5, len5, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(authCallback) ? 0 : addToExternrefTable0(authCallback), ptr6, isLikeNone(clientMode) ? 0 : addToExternrefTable0(clientMode));
694
+ const ret = wasm.createClient(ptr0, len0, ptr1, len1, accountIdentifier, ptr2, len2, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey), ptr3, len3, isLikeNone(deviceSyncWorkerMode) ? 2 : deviceSyncWorkerMode, isLikeNone(logOptions) ? 0 : addToExternrefTable0(logOptions), isLikeNone(allowOffline) ? 0xFFFFFF : allowOffline ? 1 : 0, ptr4, len4, ptr5, len5, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(authCallback) ? 0 : addToExternrefTable0(authCallback), ptr6, isLikeNone(clientMode) ? 2 : clientMode);
622
695
  return ret;
623
696
  }
624
697
 
625
698
  /**
626
- * @param {string} host
627
- * @param {string | null | undefined} gatewayHost
628
- * @param {Identifier} accountIdentifier
629
- * @returns {Promise<string | undefined>}
699
+ * Get the number of database files stored in OPFS.
700
+ * @returns {Promise<number>}
630
701
  */
631
- export function getInboxIdForIdentifier(host, gatewayHost, accountIdentifier) {
632
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
702
+ export function opfsFileCount() {
703
+ const ret = wasm.opfsFileCount();
704
+ return ret;
705
+ }
706
+
707
+ /**
708
+ * Check if a database file exists in OPFS.
709
+ * @param {string} filename
710
+ * @returns {Promise<boolean>}
711
+ */
712
+ export function opfsFileExists(filename) {
713
+ const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
633
714
  const len0 = WASM_VECTOR_LEN;
634
- var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
635
- var len1 = WASM_VECTOR_LEN;
636
- const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
715
+ const ret = wasm.opfsFileExists(ptr0, len0);
637
716
  return ret;
638
717
  }
639
718
 
640
719
  /**
641
- * @param {Identifier} accountIdentifier
642
- * @param {bigint | null} [nonce]
643
- * @returns {string}
720
+ * Import a database from a byte array into OPFS.
721
+ * This will overwrite any existing database with the same name.
722
+ * The byte array must contain a valid SQLite database.
723
+ * Note: Any existing database with the same name must be closed before importing.
724
+ * @param {string} filename
725
+ * @param {Uint8Array} data
726
+ * @returns {Promise<void>}
644
727
  */
645
- export function generateInboxId(accountIdentifier, nonce) {
646
- let deferred2_0;
647
- let deferred2_1;
648
- try {
649
- const ret = wasm.generateInboxId(accountIdentifier, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
650
- var ptr1 = ret[0];
651
- var len1 = ret[1];
652
- if (ret[3]) {
653
- ptr1 = 0; len1 = 0;
654
- throw takeFromExternrefTable0(ret[2]);
655
- }
656
- deferred2_0 = ptr1;
657
- deferred2_1 = len1;
658
- return getStringFromWasm0(ptr1, len1);
659
- } finally {
660
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
661
- }
728
+ export function opfsImportDb(filename, data) {
729
+ const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
730
+ const len0 = WASM_VECTOR_LEN;
731
+ const ret = wasm.opfsImportDb(ptr0, len0, data);
732
+ return ret;
662
733
  }
663
734
 
664
735
  /**
665
- * @param {string} host
666
- * @param {string | null | undefined} gatewayHost
667
- * @param {string[]} inboxIds
668
- * @returns {Promise<InboxState[]>}
736
+ * Delete all database files from OPFS.
737
+ * Note: All databases must be closed before calling this function.
738
+ * @returns {Promise<void>}
669
739
  */
670
- export function inboxStateFromInboxIds(host, gatewayHost, inboxIds) {
671
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
740
+ export function opfsClearAll() {
741
+ const ret = wasm.opfsClearAll();
742
+ return ret;
743
+ }
744
+
745
+ /**
746
+ * Get the current capacity of the OPFS file pool.
747
+ * @returns {Promise<number>}
748
+ */
749
+ export function opfsPoolCapacity() {
750
+ const ret = wasm.opfsPoolCapacity();
751
+ return ret;
752
+ }
753
+
754
+ /**
755
+ * Export a database file from OPFS as a byte array.
756
+ * This can be used to backup or transfer a database.
757
+ * Note: The database should be closed before exporting for consistency.
758
+ * @param {string} filename
759
+ * @returns {Promise<Uint8Array>}
760
+ */
761
+ export function opfsExportDb(filename) {
762
+ const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
672
763
  const len0 = WASM_VECTOR_LEN;
673
- var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
674
- var len1 = WASM_VECTOR_LEN;
675
- const ptr2 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
676
- const len2 = WASM_VECTOR_LEN;
677
- const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
764
+ const ret = wasm.opfsExportDb(ptr0, len0);
765
+ return ret;
766
+ }
767
+
768
+ /**
769
+ * Delete a specific database file from OPFS.
770
+ * Returns true if the file was deleted, false if it didn't exist.
771
+ * Note: The database must be closed before calling this function.
772
+ * @param {string} filename
773
+ * @returns {Promise<boolean>}
774
+ */
775
+ export function opfsDeleteFile(filename) {
776
+ const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
777
+ const len0 = WASM_VECTOR_LEN;
778
+ const ret = wasm.opfsDeleteFile(ptr0, len0);
779
+ return ret;
780
+ }
781
+
782
+ /**
783
+ * Initialize the OPFS SQLite VFS if not already initialized.
784
+ * This must be called before using other OPFS functions.
785
+ * @returns {Promise<void>}
786
+ */
787
+ export function opfsInit() {
788
+ const ret = wasm.opfsInit();
789
+ return ret;
790
+ }
791
+
792
+ /**
793
+ * List all database files stored in OPFS.
794
+ * Returns an array of file names.
795
+ * @returns {Promise<string[]>}
796
+ */
797
+ export function opfsListFiles() {
798
+ const ret = wasm.opfsListFiles();
678
799
  return ret;
679
800
  }
680
801
 
@@ -709,6 +830,203 @@ function wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb(arg0, arg
709
830
  wasm.wasm_bindgen__convert__closures_____invoke__h47a8fb56fc48c5fb(arg0, arg1, arg2, arg3);
710
831
  }
711
832
 
833
+ /**
834
+ * @enum {0 | 1 | 2}
835
+ */
836
+ export const ActionStyle = Object.freeze({
837
+ Primary: 0, "0": "Primary",
838
+ Secondary: 1, "1": "Secondary",
839
+ Danger: 2, "2": "Danger",
840
+ });
841
+ /**
842
+ * @enum {0 | 1}
843
+ */
844
+ export const ClientMode = Object.freeze({
845
+ Default: 0, "0": "Default",
846
+ Notification: 1, "1": "Notification",
847
+ });
848
+ /**
849
+ * @enum {0 | 1}
850
+ */
851
+ export const ConsentEntityType = Object.freeze({
852
+ GroupId: 0, "0": "GroupId",
853
+ InboxId: 1, "1": "InboxId",
854
+ });
855
+ /**
856
+ * @enum {0 | 1 | 2}
857
+ */
858
+ export const ConsentState = Object.freeze({
859
+ Unknown: 0, "0": "Unknown",
860
+ Allowed: 1, "1": "Allowed",
861
+ Denied: 2, "2": "Denied",
862
+ });
863
+ /**
864
+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15}
865
+ */
866
+ export const ContentType = Object.freeze({
867
+ Actions: 0, "0": "Actions",
868
+ Attachment: 1, "1": "Attachment",
869
+ Custom: 2, "2": "Custom",
870
+ GroupMembershipChange: 3, "3": "GroupMembershipChange",
871
+ GroupUpdated: 4, "4": "GroupUpdated",
872
+ Intent: 5, "5": "Intent",
873
+ LeaveRequest: 6, "6": "LeaveRequest",
874
+ Markdown: 7, "7": "Markdown",
875
+ MultiRemoteAttachment: 8, "8": "MultiRemoteAttachment",
876
+ Reaction: 9, "9": "Reaction",
877
+ ReadReceipt: 10, "10": "ReadReceipt",
878
+ RemoteAttachment: 11, "11": "RemoteAttachment",
879
+ Reply: 12, "12": "Reply",
880
+ Text: 13, "13": "Text",
881
+ TransactionReference: 14, "14": "TransactionReference",
882
+ WalletSendCalls: 15, "15": "WalletSendCalls",
883
+ });
884
+ /**
885
+ * @enum {0 | 1 | 2 | 3}
886
+ */
887
+ export const ConversationType = Object.freeze({
888
+ Dm: 0, "0": "Dm",
889
+ Group: 1, "1": "Group",
890
+ Sync: 2, "2": "Sync",
891
+ Oneshot: 3, "3": "Oneshot",
892
+ });
893
+ /**
894
+ * @enum {0 | 1 | 2}
895
+ */
896
+ export const DeliveryStatus = Object.freeze({
897
+ Unpublished: 0, "0": "Unpublished",
898
+ Published: 1, "1": "Published",
899
+ Failed: 2, "2": "Failed",
900
+ });
901
+ /**
902
+ * @enum {0 | 1}
903
+ */
904
+ export const DeviceSyncWorkerMode = Object.freeze({
905
+ Enabled: 0, "0": "Enabled",
906
+ Disabled: 1, "1": "Disabled",
907
+ });
908
+ /**
909
+ * @enum {0 | 1 | 2 | 3 | 4}
910
+ */
911
+ export const GroupMembershipState = Object.freeze({
912
+ Allowed: 0, "0": "Allowed",
913
+ Rejected: 1, "1": "Rejected",
914
+ Pending: 2, "2": "Pending",
915
+ Restored: 3, "3": "Restored",
916
+ PendingRemove: 4, "4": "PendingRemove",
917
+ });
918
+ /**
919
+ * @enum {0 | 1}
920
+ */
921
+ export const GroupMessageKind = Object.freeze({
922
+ Application: 0, "0": "Application",
923
+ MembershipChange: 1, "1": "MembershipChange",
924
+ });
925
+ /**
926
+ * @enum {0 | 1 | 2}
927
+ */
928
+ export const GroupPermissionsOptions = Object.freeze({
929
+ Default: 0, "0": "Default",
930
+ AdminOnly: 1, "1": "AdminOnly",
931
+ CustomPolicy: 2, "2": "CustomPolicy",
932
+ });
933
+ /**
934
+ * @enum {0 | 1}
935
+ */
936
+ export const IdentifierKind = Object.freeze({
937
+ Ethereum: 0, "0": "Ethereum",
938
+ Passkey: 1, "1": "Passkey",
939
+ });
940
+ /**
941
+ * @enum {0 | 1}
942
+ */
943
+ export const ListConversationsOrderBy = Object.freeze({
944
+ CreatedAt: 0, "0": "CreatedAt",
945
+ LastActivity: 1, "1": "LastActivity",
946
+ });
947
+ /**
948
+ * @enum {0 | 1 | 2 | 3 | 4 | 5}
949
+ */
950
+ export const LogLevel = Object.freeze({
951
+ Off: 0, "0": "Off",
952
+ Error: 1, "1": "Error",
953
+ Warn: 2, "2": "Warn",
954
+ Info: 3, "3": "Info",
955
+ Debug: 4, "4": "Debug",
956
+ Trace: 5, "5": "Trace",
957
+ });
958
+ /**
959
+ * @enum {0 | 1}
960
+ */
961
+ export const MessageSortBy = Object.freeze({
962
+ SentAt: 0, "0": "SentAt",
963
+ InsertedAt: 1, "1": "InsertedAt",
964
+ });
965
+ /**
966
+ * @enum {0 | 1 | 2 | 3 | 4 | 5}
967
+ */
968
+ export const MetadataField = Object.freeze({
969
+ AppData: 0, "0": "AppData",
970
+ Description: 1, "1": "Description",
971
+ GroupName: 2, "2": "GroupName",
972
+ GroupImageUrlSquare: 3, "3": "GroupImageUrlSquare",
973
+ MessageExpirationFromNs: 4, "4": "MessageExpirationFromNs",
974
+ MessageExpirationInNs: 5, "5": "MessageExpirationInNs",
975
+ });
976
+ /**
977
+ * @enum {0 | 1 | 2}
978
+ */
979
+ export const PermissionLevel = Object.freeze({
980
+ Member: 0, "0": "Member",
981
+ Admin: 1, "1": "Admin",
982
+ SuperAdmin: 2, "2": "SuperAdmin",
983
+ });
984
+ /**
985
+ * @enum {0 | 1 | 2 | 3 | 4 | 5}
986
+ */
987
+ export const PermissionPolicy = Object.freeze({
988
+ Allow: 0, "0": "Allow",
989
+ Deny: 1, "1": "Deny",
990
+ Admin: 2, "2": "Admin",
991
+ SuperAdmin: 3, "3": "SuperAdmin",
992
+ DoesNotExist: 4, "4": "DoesNotExist",
993
+ Other: 5, "5": "Other",
994
+ });
995
+ /**
996
+ * @enum {0 | 1 | 2 | 3 | 4}
997
+ */
998
+ export const PermissionUpdateType = Object.freeze({
999
+ AddMember: 0, "0": "AddMember",
1000
+ RemoveMember: 1, "1": "RemoveMember",
1001
+ AddAdmin: 2, "2": "AddAdmin",
1002
+ RemoveAdmin: 3, "3": "RemoveAdmin",
1003
+ UpdateMetadata: 4, "4": "UpdateMetadata",
1004
+ });
1005
+ /**
1006
+ * @enum {0 | 1 | 2}
1007
+ */
1008
+ export const ReactionAction = Object.freeze({
1009
+ Unknown: 0, "0": "Unknown",
1010
+ Added: 1, "1": "Added",
1011
+ Removed: 2, "2": "Removed",
1012
+ });
1013
+ /**
1014
+ * @enum {0 | 1 | 2 | 3}
1015
+ */
1016
+ export const ReactionSchema = Object.freeze({
1017
+ Unknown: 0, "0": "Unknown",
1018
+ Unicode: 1, "1": "Unicode",
1019
+ Shortcode: 2, "2": "Shortcode",
1020
+ Custom: 3, "3": "Custom",
1021
+ });
1022
+ /**
1023
+ * @enum {0 | 1}
1024
+ */
1025
+ export const SortDirection = Object.freeze({
1026
+ Ascending: 0, "0": "Ascending",
1027
+ Descending: 1, "1": "Descending",
1028
+ });
1029
+
712
1030
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
713
1031
 
714
1032
  const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
@@ -787,6 +1105,66 @@ export class Client {
787
1105
  const ptr = this.__destroy_into_raw();
788
1106
  wasm.__wbg_client_free(ptr, 0);
789
1107
  }
1108
+ /**
1109
+ *
1110
+ * * Get the client's inbox state.
1111
+ * *
1112
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1113
+ * * Otherwise, the state will be read from the local database.
1114
+ *
1115
+ * @param {boolean} refreshFromNetwork
1116
+ * @returns {Promise<InboxState>}
1117
+ */
1118
+ inboxState(refreshFromNetwork) {
1119
+ const ret = wasm.client_inboxState(this.__wbg_ptr, refreshFromNetwork);
1120
+ return ret;
1121
+ }
1122
+ /**
1123
+ * @param {string} inboxId
1124
+ * @returns {Promise<InboxState>}
1125
+ */
1126
+ getLatestInboxState(inboxId) {
1127
+ const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1128
+ const len0 = WASM_VECTOR_LEN;
1129
+ const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1130
+ return ret;
1131
+ }
1132
+ /**
1133
+ *
1134
+ * * Get key package statuses for a list of installation IDs.
1135
+ * *
1136
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1137
+ *
1138
+ * @param {string[]} installationIds
1139
+ * @returns {Promise<any>}
1140
+ */
1141
+ getKeyPackageStatusesForInstallationIds(installationIds) {
1142
+ const ptr0 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
1143
+ const len0 = WASM_VECTOR_LEN;
1144
+ const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1145
+ return ret;
1146
+ }
1147
+ /**
1148
+ * @param {ConsentEntityType} entityType
1149
+ * @param {string} entity
1150
+ * @returns {Promise<ConsentState>}
1151
+ */
1152
+ getConsentState(entityType, entity) {
1153
+ const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1154
+ const len0 = WASM_VECTOR_LEN;
1155
+ const ret = wasm.client_getConsentState(this.__wbg_ptr, entityType, ptr0, len0);
1156
+ return ret;
1157
+ }
1158
+ /**
1159
+ * @param {Consent[]} records
1160
+ * @returns {Promise<void>}
1161
+ */
1162
+ setConsentStates(records) {
1163
+ const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
1164
+ const len0 = WASM_VECTOR_LEN;
1165
+ const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
1166
+ return ret;
1167
+ }
790
1168
  /**
791
1169
  * @param {SignatureRequestHandle} signatureRequest
792
1170
  * @returns {Promise<void>}
@@ -1046,66 +1424,6 @@ export class Client {
1046
1424
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1047
1425
  }
1048
1426
  }
1049
- /**
1050
- *
1051
- * * Get the client's inbox state.
1052
- * *
1053
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1054
- * * Otherwise, the state will be read from the local database.
1055
- *
1056
- * @param {boolean} refreshFromNetwork
1057
- * @returns {Promise<InboxState>}
1058
- */
1059
- inboxState(refreshFromNetwork) {
1060
- const ret = wasm.client_inboxState(this.__wbg_ptr, refreshFromNetwork);
1061
- return ret;
1062
- }
1063
- /**
1064
- * @param {string} inboxId
1065
- * @returns {Promise<InboxState>}
1066
- */
1067
- getLatestInboxState(inboxId) {
1068
- const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1069
- const len0 = WASM_VECTOR_LEN;
1070
- const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1071
- return ret;
1072
- }
1073
- /**
1074
- *
1075
- * * Get key package statuses for a list of installation IDs.
1076
- * *
1077
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1078
- *
1079
- * @param {string[]} installationIds
1080
- * @returns {Promise<any>}
1081
- */
1082
- getKeyPackageStatusesForInstallationIds(installationIds) {
1083
- const ptr0 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
1084
- const len0 = WASM_VECTOR_LEN;
1085
- const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1086
- return ret;
1087
- }
1088
- /**
1089
- * @param {ConsentEntityType} entityType
1090
- * @param {string} entity
1091
- * @returns {Promise<ConsentState>}
1092
- */
1093
- getConsentState(entityType, entity) {
1094
- const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1095
- const len0 = WASM_VECTOR_LEN;
1096
- const ret = wasm.client_getConsentState(this.__wbg_ptr, entityType, ptr0, len0);
1097
- return ret;
1098
- }
1099
- /**
1100
- * @param {Consent[]} records
1101
- * @returns {Promise<void>}
1102
- */
1103
- setConsentStates(records) {
1104
- const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
1105
- const len0 = WASM_VECTOR_LEN;
1106
- const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
1107
- return ret;
1108
- }
1109
1427
  }
1110
1428
  if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
1111
1429
 
@@ -1400,7 +1718,7 @@ export class Conversation {
1400
1718
  if (ret[2]) {
1401
1719
  throw takeFromExternrefTable0(ret[1]);
1402
1720
  }
1403
- return takeFromExternrefTable0(ret[0]);
1721
+ return ret[0];
1404
1722
  }
1405
1723
  /**
1406
1724
  * Publish all unpublished messages
@@ -1605,7 +1923,7 @@ export class Conversation {
1605
1923
  * @returns {Promise<void>}
1606
1924
  */
1607
1925
  updatePermissionPolicy(permissionUpdateType, permissionPolicyOption, metadataField) {
1608
- const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permissionUpdateType, permissionPolicyOption, isLikeNone(metadataField) ? 0 : addToExternrefTable0(metadataField));
1926
+ const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permissionUpdateType, permissionPolicyOption, isLikeNone(metadataField) ? 6 : metadataField);
1609
1927
  return ret;
1610
1928
  }
1611
1929
  /**
@@ -1812,7 +2130,7 @@ export class Conversation {
1812
2130
  if (ret[2]) {
1813
2131
  throw takeFromExternrefTable0(ret[1]);
1814
2132
  }
1815
- return takeFromExternrefTable0(ret[0]);
2133
+ return ret[0];
1816
2134
  }
1817
2135
  /**
1818
2136
  * @param {ConsentState} state
@@ -1980,7 +2298,7 @@ export class Conversations {
1980
2298
  }
1981
2299
  /**
1982
2300
  * @param {Identifier} accountIdentifier
1983
- * @param {CreateDMOptions | null} [options]
2301
+ * @param {CreateDmOptions | null} [options]
1984
2302
  * @returns {Promise<Conversation>}
1985
2303
  */
1986
2304
  createDm(accountIdentifier, options) {
@@ -2014,13 +2332,13 @@ export class Conversations {
2014
2332
  /**
2015
2333
  * @param {any} callback
2016
2334
  * @param {ConversationType | null} [conversationType]
2017
- * @param {ConsentState[] | null} [consentStates]
2335
+ * @param {any[] | null} [consentStates]
2018
2336
  * @returns {StreamCloser}
2019
2337
  */
2020
2338
  streamAllMessages(callback, conversationType, consentStates) {
2021
2339
  var ptr0 = isLikeNone(consentStates) ? 0 : passArrayJsValueToWasm0(consentStates, wasm.__wbindgen_malloc);
2022
2340
  var len0 = WASM_VECTOR_LEN;
2023
- const ret = wasm.conversations_streamAllMessages(this.__wbg_ptr, callback, isLikeNone(conversationType) ? 0 : addToExternrefTable0(conversationType), ptr0, len0);
2341
+ const ret = wasm.conversations_streamAllMessages(this.__wbg_ptr, callback, isLikeNone(conversationType) ? 4 : conversationType, ptr0, len0);
2024
2342
  if (ret[2]) {
2025
2343
  throw takeFromExternrefTable0(ret[1]);
2026
2344
  }
@@ -2040,7 +2358,7 @@ export class Conversations {
2040
2358
  return ret[0] >>> 0;
2041
2359
  }
2042
2360
  /**
2043
- * @param {ConsentState[] | null} [consentStates]
2361
+ * @param {any[] | null} [consentStates]
2044
2362
  * @returns {Promise<GroupSyncSummary>}
2045
2363
  */
2046
2364
  syncAllConversations(consentStates) {
@@ -2101,7 +2419,7 @@ export class Conversations {
2101
2419
  * @returns {Promise<ReadableStream>}
2102
2420
  */
2103
2421
  streamLocal(conversationType) {
2104
- const ret = wasm.conversations_streamLocal(this.__wbg_ptr, isLikeNone(conversationType) ? 0 : addToExternrefTable0(conversationType));
2422
+ const ret = wasm.conversations_streamLocal(this.__wbg_ptr, isLikeNone(conversationType) ? 4 : conversationType);
2105
2423
  return ret;
2106
2424
  }
2107
2425
  /**
@@ -2116,7 +2434,7 @@ export class Conversations {
2116
2434
  }
2117
2435
  /**
2118
2436
  * @param {string} inboxId
2119
- * @param {CreateDMOptions | null} [options]
2437
+ * @param {CreateDmOptions | null} [options]
2120
2438
  * @returns {Promise<Conversation>}
2121
2439
  */
2122
2440
  createDmByInboxId(inboxId, options) {
@@ -2149,7 +2467,7 @@ export class Conversations {
2149
2467
  * @returns {StreamCloser}
2150
2468
  */
2151
2469
  stream(callback, conversationType) {
2152
- const ret = wasm.conversations_stream(this.__wbg_ptr, callback, isLikeNone(conversationType) ? 0 : addToExternrefTable0(conversationType));
2470
+ const ret = wasm.conversations_stream(this.__wbg_ptr, callback, isLikeNone(conversationType) ? 4 : conversationType);
2153
2471
  if (ret[2]) {
2154
2472
  throw takeFromExternrefTable0(ret[1]);
2155
2473
  }
@@ -2538,6 +2856,12 @@ function __wbg_get_imports() {
2538
2856
  imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
2539
2857
  throw new Error(getStringFromWasm0(arg0, arg1));
2540
2858
  };
2859
+ imports.wbg.__wbg___wbindgen_try_into_number_e60ef6e208abc399 = function(arg0) {
2860
+ let result;
2861
+ try { result = +arg0 } catch (e) { result = e }
2862
+ const ret = result;
2863
+ return ret;
2864
+ };
2541
2865
  imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
2542
2866
  arg0._wbg_cb_unref();
2543
2867
  };
@@ -2616,6 +2940,9 @@ function __wbg_get_imports() {
2616
2940
  imports.wbg.__wbg_close_6956df845478561a = function() { return handleError(function (arg0) {
2617
2941
  arg0.close();
2618
2942
  }, arguments) };
2943
+ imports.wbg.__wbg_close_6b987dbb02427741 = function(arg0) {
2944
+ arg0.close();
2945
+ };
2619
2946
  imports.wbg.__wbg_code_218f5fdf8c7fcabd = function(arg0) {
2620
2947
  const ret = arg0.code;
2621
2948
  return ret;
@@ -3047,23 +3374,26 @@ function __wbg_get_imports() {
3047
3374
  const ret = Date.now();
3048
3375
  return ret;
3049
3376
  };
3050
- imports.wbg.__wbg_on_auth_required_e368aaddaa60794a = function() { return handleError(function (arg0) {
3377
+ imports.wbg.__wbg_on_auth_required_fd05f3c0815ef28f = function() { return handleError(function (arg0) {
3051
3378
  const ret = arg0.on_auth_required();
3052
3379
  return ret;
3053
3380
  }, arguments) };
3054
- imports.wbg.__wbg_on_close_d69734f43badf0eb = function(arg0) {
3381
+ imports.wbg.__wbg_on_close_1f957729f7d4d089 = function(arg0) {
3055
3382
  arg0.on_close();
3056
3383
  };
3057
- imports.wbg.__wbg_on_consent_update_4208639345abe4bc = function(arg0, arg1) {
3384
+ imports.wbg.__wbg_on_consent_update_631e88f8737af44e = function(arg0, arg1) {
3058
3385
  arg0.on_consent_update(arg1);
3059
3386
  };
3060
- imports.wbg.__wbg_on_conversation_3f44180a0d9b4cea = function(arg0, arg1) {
3387
+ imports.wbg.__wbg_on_conversation_08c1f27f26ec064c = function(arg0, arg1) {
3061
3388
  arg0.on_conversation(Conversation.__wrap(arg1));
3062
3389
  };
3063
- imports.wbg.__wbg_on_error_d7ae86c5b7c32997 = function(arg0, arg1) {
3390
+ imports.wbg.__wbg_on_error_385b8798e09f129a = function(arg0, arg1) {
3064
3391
  arg0.on_error(arg1);
3065
3392
  };
3066
- imports.wbg.__wbg_on_message_deleted_96ff70f0f1607b68 = function(arg0, arg1, arg2) {
3393
+ imports.wbg.__wbg_on_message_61f6880471fdefb7 = function(arg0, arg1) {
3394
+ arg0.on_message(arg1);
3395
+ };
3396
+ imports.wbg.__wbg_on_message_deleted_ecf04db9f637cbd6 = function(arg0, arg1, arg2) {
3067
3397
  let deferred0_0;
3068
3398
  let deferred0_1;
3069
3399
  try {
@@ -3074,10 +3404,7 @@ function __wbg_get_imports() {
3074
3404
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3075
3405
  }
3076
3406
  };
3077
- imports.wbg.__wbg_on_message_f4d392e5315b2bcd = function(arg0, arg1) {
3078
- arg0.on_message(arg1);
3079
- };
3080
- imports.wbg.__wbg_on_user_preference_update_ee6c6db0e041f04d = function(arg0, arg1, arg2) {
3407
+ imports.wbg.__wbg_on_user_preference_update_a8904bf6b28360b6 = function(arg0, arg1, arg2) {
3081
3408
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
3082
3409
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
3083
3410
  arg0.on_user_preference_update(v0);
@@ -3341,9 +3668,9 @@ function __wbg_get_imports() {
3341
3668
  const ret = arg0.write(arg1, arg2);
3342
3669
  return ret;
3343
3670
  }, arguments) };
3344
- imports.wbg.__wbindgen_cast_211e08c655cf62bf = function(arg0, arg1) {
3345
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6889, function: Function { arguments: [], shim_idx: 6890, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3346
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1, wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1);
3671
+ imports.wbg.__wbindgen_cast_173fbbcd3a731426 = function(arg0, arg1) {
3672
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7361, function: Function { arguments: [Externref], shim_idx: 7362, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3673
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hed8af60076250245, wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6);
3347
3674
  return ret;
3348
3675
  };
3349
3676
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
@@ -3351,6 +3678,23 @@ function __wbg_get_imports() {
3351
3678
  const ret = getStringFromWasm0(arg0, arg1);
3352
3679
  return ret;
3353
3680
  };
3681
+ imports.wbg.__wbindgen_cast_25a0a844437d0e92 = function(arg0, arg1) {
3682
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3683
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3684
+ // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
3685
+ const ret = v0;
3686
+ return ret;
3687
+ };
3688
+ imports.wbg.__wbindgen_cast_2900838d07f16ff6 = function(arg0, arg1) {
3689
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7168, function: Function { arguments: [], shim_idx: 7169, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3690
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hfbd660e60d498df9, wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040);
3691
+ return ret;
3692
+ };
3693
+ imports.wbg.__wbindgen_cast_3ab6bb23fa77e709 = function(arg0, arg1) {
3694
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 7328, function: Function { arguments: [], shim_idx: 7329, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3695
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3c5639ee43c80f22, wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005);
3696
+ return ret;
3697
+ };
3354
3698
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
3355
3699
  // Cast intrinsic for `U64 -> Externref`.
3356
3700
  const ret = BigInt.asUintN(64, arg0);
@@ -3363,16 +3707,6 @@ function __wbg_get_imports() {
3363
3707
  const ret = v0;
3364
3708
  return ret;
3365
3709
  };
3366
- imports.wbg.__wbindgen_cast_653b194fefadb0d3 = function(arg0, arg1) {
3367
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7298, function: Function { arguments: [Externref], shim_idx: 7299, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3368
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hed8af60076250245, wasm_bindgen__convert__closures_____invoke__hdff293b41f2cecc6);
3369
- return ret;
3370
- };
3371
- imports.wbg.__wbindgen_cast_71b65f902d88c9ed = function(arg0, arg1) {
3372
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7265, function: Function { arguments: [], shim_idx: 7266, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3373
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3c5639ee43c80f22, wasm_bindgen__convert__closures_____invoke__h956b60152b2cf005);
3374
- return ret;
3375
- };
3376
3710
  imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
3377
3711
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3378
3712
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -3392,11 +3726,6 @@ function __wbg_get_imports() {
3392
3726
  const ret = arg0;
3393
3727
  return ret;
3394
3728
  };
3395
- imports.wbg.__wbindgen_cast_c57c2f5798589a39 = function(arg0, arg1) {
3396
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7106, function: Function { arguments: [], shim_idx: 7107, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3397
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hfbd660e60d498df9, wasm_bindgen__convert__closures_____invoke__hceddd2b8fc291040);
3398
- return ret;
3399
- };
3400
3729
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
3401
3730
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
3402
3731
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -3421,6 +3750,11 @@ function __wbg_get_imports() {
3421
3750
  const ret = v0;
3422
3751
  return ret;
3423
3752
  };
3753
+ imports.wbg.__wbindgen_cast_f22164ae3d0f310b = function(arg0, arg1) {
3754
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 6956, function: Function { arguments: [], shim_idx: 6957, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3755
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he7b712e0eb1b5ac1, wasm_bindgen__convert__closures_____invoke__h6af3cd86eb56f4b1);
3756
+ return ret;
3757
+ };
3424
3758
  imports.wbg.__wbindgen_init_externref_table = function() {
3425
3759
  const table = wasm.__wbindgen_externrefs;
3426
3760
  const offset = table.grow(4);