@xmtp/wasm-bindings 0.0.21 → 1.0.0-rc2

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.
@@ -230,48 +230,11 @@ function _assertClass(instance, klass) {
230
230
  }
231
231
  }
232
232
 
233
- function passArray8ToWasm0(arg, malloc) {
234
- const ptr = malloc(arg.length * 1, 1) >>> 0;
235
- getUint8ArrayMemory0().set(arg, ptr / 1);
236
- WASM_VECTOR_LEN = arg.length;
237
- return ptr;
238
- }
239
-
240
233
  function takeFromExternrefTable0(idx) {
241
234
  const value = wasm.__wbindgen_export_4.get(idx);
242
235
  wasm.__externref_table_dealloc(idx);
243
236
  return value;
244
237
  }
245
- /**
246
- * @param {string} host
247
- * @param {string} inbox_id
248
- * @param {string} account_address
249
- * @param {string | null} [db_path]
250
- * @param {Uint8Array | null} [encryption_key]
251
- * @param {string | null} [history_sync_url]
252
- * @param {LogOptions | null} [log_options]
253
- * @returns {Promise<Client>}
254
- */
255
- export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
256
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
- const len0 = WASM_VECTOR_LEN;
258
- const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
259
- const len1 = WASM_VECTOR_LEN;
260
- const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
261
- const len2 = WASM_VECTOR_LEN;
262
- var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
263
- var len3 = WASM_VECTOR_LEN;
264
- var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
265
- var len4 = WASM_VECTOR_LEN;
266
- let ptr5 = 0;
267
- if (!isLikeNone(log_options)) {
268
- _assertClass(log_options, LogOptions);
269
- ptr5 = log_options.__destroy_into_raw();
270
- }
271
- const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
272
- return ret;
273
- }
274
-
275
238
  /**
276
239
  * @param {MultiRemoteAttachment} multiRemoteAttachment
277
240
  * @returns {Uint8Array}
@@ -326,29 +289,29 @@ export function decodeReaction(bytes) {
326
289
 
327
290
  /**
328
291
  * @param {string} host
329
- * @param {string} account_address
292
+ * @param {Identifier} accountIdentifier
330
293
  * @returns {Promise<string | undefined>}
331
294
  */
332
- export function getInboxIdForAddress(host, account_address) {
295
+ export function getInboxIdForIdentifier(host, accountIdentifier) {
333
296
  const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
334
297
  const len0 = WASM_VECTOR_LEN;
335
- const ptr1 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
336
- const len1 = WASM_VECTOR_LEN;
337
- const ret = wasm.getInboxIdForAddress(ptr0, len0, ptr1, len1);
298
+ _assertClass(accountIdentifier, Identifier);
299
+ var ptr1 = accountIdentifier.__destroy_into_raw();
300
+ const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1);
338
301
  return ret;
339
302
  }
340
303
 
341
304
  /**
342
- * @param {string} account_address
305
+ * @param {Identifier} accountIdentifier
343
306
  * @returns {string}
344
307
  */
345
- export function generateInboxId(account_address) {
308
+ export function generateInboxId(accountIdentifier) {
346
309
  let deferred3_0;
347
310
  let deferred3_1;
348
311
  try {
349
- const ptr0 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
350
- const len0 = WASM_VECTOR_LEN;
351
- const ret = wasm.generateInboxId(ptr0, len0);
312
+ _assertClass(accountIdentifier, Identifier);
313
+ var ptr0 = accountIdentifier.__destroy_into_raw();
314
+ const ret = wasm.generateInboxId(ptr0);
352
315
  var ptr2 = ret[0];
353
316
  var len2 = ret[1];
354
317
  if (ret[3]) {
@@ -363,6 +326,42 @@ export function generateInboxId(account_address) {
363
326
  }
364
327
  }
365
328
 
329
+ function passArray8ToWasm0(arg, malloc) {
330
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
331
+ getUint8ArrayMemory0().set(arg, ptr / 1);
332
+ WASM_VECTOR_LEN = arg.length;
333
+ return ptr;
334
+ }
335
+ /**
336
+ * @param {string} host
337
+ * @param {string} inbox_id
338
+ * @param {Identifier} account_identifier
339
+ * @param {string | null} [db_path]
340
+ * @param {Uint8Array | null} [encryption_key]
341
+ * @param {string | null} [history_sync_url]
342
+ * @param {LogOptions | null} [log_options]
343
+ * @returns {Promise<Client>}
344
+ */
345
+ export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, history_sync_url, log_options) {
346
+ const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
347
+ const len0 = WASM_VECTOR_LEN;
348
+ const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
349
+ const len1 = WASM_VECTOR_LEN;
350
+ _assertClass(account_identifier, Identifier);
351
+ var ptr2 = account_identifier.__destroy_into_raw();
352
+ var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
353
+ var len3 = WASM_VECTOR_LEN;
354
+ var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
355
+ var len4 = WASM_VECTOR_LEN;
356
+ let ptr5 = 0;
357
+ if (!isLikeNone(log_options)) {
358
+ _assertClass(log_options, LogOptions);
359
+ ptr5 = log_options.__destroy_into_raw();
360
+ }
361
+ const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
362
+ return ret;
363
+ }
364
+
366
365
  /**
367
366
  * @param {string} signature_text
368
367
  * @param {Uint8Array} signature_bytes
@@ -382,25 +381,24 @@ function __wbg_adapter_46(arg0, arg1) {
382
381
  }
383
382
 
384
383
  function __wbg_adapter_49(arg0, arg1, arg2) {
385
- wasm.closure3662_externref_shim(arg0, arg1, arg2);
384
+ wasm.closure3746_externref_shim(arg0, arg1, arg2);
386
385
  }
387
386
 
388
- function __wbg_adapter_579(arg0, arg1, arg2, arg3, arg4) {
389
- const ret = wasm.closure4669_externref_shim(arg0, arg1, arg2, arg3, arg4);
387
+ function __wbg_adapter_592(arg0, arg1, arg2, arg3, arg4) {
388
+ const ret = wasm.closure4755_externref_shim(arg0, arg1, arg2, arg3, arg4);
390
389
  return ret !== 0;
391
390
  }
392
391
 
393
- function __wbg_adapter_680(arg0, arg1, arg2, arg3) {
394
- wasm.closure4668_externref_shim(arg0, arg1, arg2, arg3);
392
+ function __wbg_adapter_693(arg0, arg1, arg2, arg3) {
393
+ wasm.closure4754_externref_shim(arg0, arg1, arg2, arg3);
395
394
  }
396
395
 
397
396
  /**
398
- * @enum {0 | 1 | 2}
397
+ * @enum {0 | 1}
399
398
  */
400
399
  export const ConsentEntityType = Object.freeze({
401
400
  GroupId: 0, "0": "GroupId",
402
401
  InboxId: 1, "1": "InboxId",
403
- Address: 2, "2": "Address",
404
402
  });
405
403
  /**
406
404
  * @enum {0 | 1 | 2}
@@ -464,6 +462,13 @@ export const GroupPermissionsOptions = Object.freeze({
464
462
  AdminOnly: 1, "1": "AdminOnly",
465
463
  CustomPolicy: 2, "2": "CustomPolicy",
466
464
  });
465
+ /**
466
+ * @enum {0 | 1}
467
+ */
468
+ export const IdentifierKind = Object.freeze({
469
+ Ethereum: 0, "0": "Ethereum",
470
+ Passkey: 1, "1": "Passkey",
471
+ });
467
472
  /**
468
473
  * @enum {0 | 1 | 2 | 3 | 4}
469
474
  */
@@ -570,6 +575,27 @@ export class Client {
570
575
  const ptr = this.__destroy_into_raw();
571
576
  wasm.__wbg_client_free(ptr, 0);
572
577
  }
578
+ /**
579
+ * @param {Consent[]} records
580
+ * @returns {Promise<void>}
581
+ */
582
+ setConsentStates(records) {
583
+ const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
584
+ const len0 = WASM_VECTOR_LEN;
585
+ const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
586
+ return ret;
587
+ }
588
+ /**
589
+ * @param {ConsentEntityType} entity_type
590
+ * @param {string} entity
591
+ * @returns {Promise<ConsentState>}
592
+ */
593
+ getConsentState(entity_type, entity) {
594
+ const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
595
+ const len0 = WASM_VECTOR_LEN;
596
+ const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
597
+ return ret;
598
+ }
573
599
  /**
574
600
  *
575
601
  * * Get the client's inbox state.
@@ -595,19 +621,11 @@ export class Client {
595
621
  return ret;
596
622
  }
597
623
  /**
598
- * @returns {string}
624
+ * @returns {Identifier}
599
625
  */
600
- get accountAddress() {
601
- let deferred1_0;
602
- let deferred1_1;
603
- try {
604
- const ret = wasm.client_accountAddress(this.__wbg_ptr);
605
- deferred1_0 = ret[0];
606
- deferred1_1 = ret[1];
607
- return getStringFromWasm0(ret[0], ret[1]);
608
- } finally {
609
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
610
- }
626
+ get accountIdentifier() {
627
+ const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
628
+ return Identifier.__wrap(ret);
611
629
  }
612
630
  /**
613
631
  * @returns {string}
@@ -654,11 +672,12 @@ export class Client {
654
672
  return ret;
655
673
  }
656
674
  /**
657
- * @param {string[]} account_addresses
675
+ * Output booleans should be zipped with the index of input identifiers
676
+ * @param {Identifier[]} account_identifiers
658
677
  * @returns {Promise<any>}
659
678
  */
660
- canMessage(account_addresses) {
661
- const ptr0 = passArrayJsValueToWasm0(account_addresses, wasm.__wbindgen_malloc);
679
+ canMessage(account_identifiers) {
680
+ const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
662
681
  const len0 = WASM_VECTOR_LEN;
663
682
  const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
664
683
  return ret;
@@ -685,13 +704,13 @@ export class Client {
685
704
  return ret;
686
705
  }
687
706
  /**
688
- * @param {string} address
707
+ * @param {Identifier} identifier
689
708
  * @returns {Promise<string | undefined>}
690
709
  */
691
- findInboxIdByAddress(address) {
692
- const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
693
- const len0 = WASM_VECTOR_LEN;
694
- const ret = wasm.client_findInboxIdByAddress(this.__wbg_ptr, ptr0, len0);
710
+ findInboxIdByIdentifier(identifier) {
711
+ _assertClass(identifier, Identifier);
712
+ var ptr0 = identifier.__destroy_into_raw();
713
+ const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, ptr0);
695
714
  return ret;
696
715
  }
697
716
  /**
@@ -701,27 +720,6 @@ export class Client {
701
720
  const ret = wasm.client_conversations(this.__wbg_ptr);
702
721
  return Conversations.__wrap(ret);
703
722
  }
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
- }
725
723
  /**
726
724
  * @returns {string | undefined}
727
725
  */
@@ -738,23 +736,23 @@ export class Client {
738
736
  return v1;
739
737
  }
740
738
  /**
741
- * @param {string} new_wallet_address
739
+ * @param {Identifier} new_identifier
742
740
  * @returns {Promise<string>}
743
741
  */
744
- addWalletSignatureText(new_wallet_address) {
745
- const ptr0 = passStringToWasm0(new_wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
746
- const len0 = WASM_VECTOR_LEN;
747
- const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0, len0);
742
+ addWalletSignatureText(new_identifier) {
743
+ _assertClass(new_identifier, Identifier);
744
+ var ptr0 = new_identifier.__destroy_into_raw();
745
+ const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0);
748
746
  return ret;
749
747
  }
750
748
  /**
751
- * @param {string} wallet_address
749
+ * @param {Identifier} identifier
752
750
  * @returns {Promise<string>}
753
751
  */
754
- revokeWalletSignatureText(wallet_address) {
755
- const ptr0 = passStringToWasm0(wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
756
- const len0 = WASM_VECTOR_LEN;
757
- const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, ptr0, len0);
752
+ revokeWalletSignatureText(identifier) {
753
+ _assertClass(identifier, Identifier);
754
+ var ptr0 = identifier.__destroy_into_raw();
755
+ const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, ptr0);
758
756
  return ret;
759
757
  }
760
758
  /**
@@ -779,8 +777,19 @@ export class Client {
779
777
  * @param {Uint8Array} signature_bytes
780
778
  * @returns {Promise<void>}
781
779
  */
782
- addSignature(signature_type, signature_bytes) {
783
- const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
780
+ addEcdsaSignature(signature_type, signature_bytes) {
781
+ const ret = wasm.client_addEcdsaSignature(this.__wbg_ptr, signature_type, signature_bytes);
782
+ return ret;
783
+ }
784
+ /**
785
+ * @param {SignatureRequestType} signature_type
786
+ * @param {PasskeySignature} signature
787
+ * @returns {Promise<void>}
788
+ */
789
+ addPasskeySignature(signature_type, signature) {
790
+ _assertClass(signature, PasskeySignature);
791
+ var ptr0 = signature.__destroy_into_raw();
792
+ const ret = wasm.client_addPasskeySignature(this.__wbg_ptr, signature_type, ptr0);
784
793
  return ret;
785
794
  }
786
795
  /**
@@ -1056,25 +1065,6 @@ export class Conversation {
1056
1065
  const ptr = this.__destroy_into_raw();
1057
1066
  wasm.__wbg_conversation_free(ptr, 0);
1058
1067
  }
1059
- /**
1060
- * @returns {ConsentState}
1061
- */
1062
- consentState() {
1063
- const ret = wasm.conversation_consentState(this.__wbg_ptr);
1064
- if (ret[2]) {
1065
- throw takeFromExternrefTable0(ret[1]);
1066
- }
1067
- return ret[0];
1068
- }
1069
- /**
1070
- * @param {ConsentState} state
1071
- */
1072
- updateConsentState(state) {
1073
- const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
1074
- if (ret[1]) {
1075
- throw takeFromExternrefTable0(ret[0]);
1076
- }
1077
- }
1078
1068
  /**
1079
1069
  * @returns {string}
1080
1070
  */
@@ -1224,11 +1214,11 @@ export class Conversation {
1224
1214
  return ret[0] !== 0;
1225
1215
  }
1226
1216
  /**
1227
- * @param {string[]} account_addresses
1217
+ * @param {Identifier[]} account_identifiers
1228
1218
  * @returns {Promise<void>}
1229
1219
  */
1230
- addMembers(account_addresses) {
1231
- const ptr0 = passArrayJsValueToWasm0(account_addresses, wasm.__wbindgen_malloc);
1220
+ addMembers(account_identifiers) {
1221
+ const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
1232
1222
  const len0 = WASM_VECTOR_LEN;
1233
1223
  const ret = wasm.conversation_addMembers(this.__wbg_ptr, ptr0, len0);
1234
1224
  return ret;
@@ -1294,11 +1284,11 @@ export class Conversation {
1294
1284
  return ret;
1295
1285
  }
1296
1286
  /**
1297
- * @param {string[]} account_addresses
1287
+ * @param {Identifier[]} account_identifiers
1298
1288
  * @returns {Promise<void>}
1299
1289
  */
1300
- removeMembers(account_addresses) {
1301
- const ptr0 = passArrayJsValueToWasm0(account_addresses, wasm.__wbindgen_malloc);
1290
+ removeMembers(account_identifiers) {
1291
+ const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
1302
1292
  const len0 = WASM_VECTOR_LEN;
1303
1293
  const ret = wasm.conversation_removeMembers(this.__wbg_ptr, ptr0, len0);
1304
1294
  return ret;
@@ -1434,6 +1424,21 @@ export class Conversation {
1434
1424
  }
1435
1425
  return ret[0] !== 0;
1436
1426
  }
1427
+ /**
1428
+ * @returns {string | undefined}
1429
+ */
1430
+ pausedForVersion() {
1431
+ const ret = wasm.conversation_pausedForVersion(this.__wbg_ptr);
1432
+ if (ret[3]) {
1433
+ throw takeFromExternrefTable0(ret[2]);
1434
+ }
1435
+ let v1;
1436
+ if (ret[0] !== 0) {
1437
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1438
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1439
+ }
1440
+ return v1;
1441
+ }
1437
1442
  /**
1438
1443
  * @returns {string}
1439
1444
  */
@@ -1540,6 +1545,25 @@ export class Conversation {
1540
1545
  }
1541
1546
  return takeFromExternrefTable0(ret[0]);
1542
1547
  }
1548
+ /**
1549
+ * @returns {ConsentState}
1550
+ */
1551
+ consentState() {
1552
+ const ret = wasm.conversation_consentState(this.__wbg_ptr);
1553
+ if (ret[2]) {
1554
+ throw takeFromExternrefTable0(ret[1]);
1555
+ }
1556
+ return ret[0];
1557
+ }
1558
+ /**
1559
+ * @param {ConsentState} state
1560
+ */
1561
+ updateConsentState(state) {
1562
+ const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
1563
+ if (ret[1]) {
1564
+ throw takeFromExternrefTable0(ret[0]);
1565
+ }
1566
+ }
1543
1567
  }
1544
1568
 
1545
1569
  const ConversationListItemFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1645,12 +1669,12 @@ export class Conversations {
1645
1669
  wasm.__wbg_conversations_free(ptr, 0);
1646
1670
  }
1647
1671
  /**
1648
- * @param {string[]} account_addresses
1672
+ * @param {Identifier[]} account_identifiers
1649
1673
  * @param {CreateGroupOptions | null} [options]
1650
1674
  * @returns {Promise<Conversation>}
1651
1675
  */
1652
- createGroup(account_addresses, options) {
1653
- const ptr0 = passArrayJsValueToWasm0(account_addresses, wasm.__wbindgen_malloc);
1676
+ createGroup(account_identifiers, options) {
1677
+ const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
1654
1678
  const len0 = WASM_VECTOR_LEN;
1655
1679
  let ptr1 = 0;
1656
1680
  if (!isLikeNone(options)) {
@@ -1677,19 +1701,19 @@ export class Conversations {
1677
1701
  return ret;
1678
1702
  }
1679
1703
  /**
1680
- * @param {string} account_address
1704
+ * @param {Identifier} account_identifier
1681
1705
  * @param {CreateDMOptions | null} [options]
1682
1706
  * @returns {Promise<Conversation>}
1683
1707
  */
1684
- createDm(account_address, options) {
1685
- const ptr0 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1686
- const len0 = WASM_VECTOR_LEN;
1708
+ createDm(account_identifier, options) {
1709
+ _assertClass(account_identifier, Identifier);
1710
+ var ptr0 = account_identifier.__destroy_into_raw();
1687
1711
  let ptr1 = 0;
1688
1712
  if (!isLikeNone(options)) {
1689
1713
  _assertClass(options, CreateDMOptions);
1690
1714
  ptr1 = options.__destroy_into_raw();
1691
1715
  }
1692
- const ret = wasm.conversations_createDm(this.__wbg_ptr, ptr0, len0, ptr1);
1716
+ const ret = wasm.conversations_createDm(this.__wbg_ptr, ptr0, ptr1);
1693
1717
  return ret;
1694
1718
  }
1695
1719
  /**
@@ -2266,21 +2290,21 @@ export class GroupMember {
2266
2290
  wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
2267
2291
  }
2268
2292
  /**
2269
- * @returns {string[]}
2293
+ * @returns {Identifier[]}
2270
2294
  */
2271
- get accountAddresses() {
2272
- const ret = wasm.__wbg_get_groupmember_accountAddresses(this.__wbg_ptr);
2295
+ get accountIdentifiers() {
2296
+ const ret = wasm.__wbg_get_groupmember_accountIdentifiers(this.__wbg_ptr);
2273
2297
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
2274
2298
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2275
2299
  return v1;
2276
2300
  }
2277
2301
  /**
2278
- * @param {string[]} arg0
2302
+ * @param {Identifier[]} arg0
2279
2303
  */
2280
- set accountAddresses(arg0) {
2304
+ set accountIdentifiers(arg0) {
2281
2305
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
2282
2306
  const len0 = WASM_VECTOR_LEN;
2283
- wasm.__wbg_set_groupmember_accountAddresses(this.__wbg_ptr, ptr0, len0);
2307
+ wasm.__wbg_set_groupmember_accountIdentifiers(this.__wbg_ptr, ptr0, len0);
2284
2308
  }
2285
2309
  /**
2286
2310
  * @returns {string[]}
@@ -2326,20 +2350,20 @@ export class GroupMember {
2326
2350
  wasm.__wbg_set_groupmember_consentState(this.__wbg_ptr, arg0);
2327
2351
  }
2328
2352
  /**
2329
- * @param {string} inbox_id
2330
- * @param {string[]} account_addresses
2331
- * @param {string[]} installation_ids
2332
- * @param {PermissionLevel} permission_level
2333
- * @param {ConsentState} consent_state
2353
+ * @param {string} inboxId
2354
+ * @param {Identifier[]} accountIdentifiers
2355
+ * @param {string[]} installationIds
2356
+ * @param {PermissionLevel} permissionLevel
2357
+ * @param {ConsentState} consentState
2334
2358
  */
2335
- constructor(inbox_id, account_addresses, installation_ids, permission_level, consent_state) {
2336
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2359
+ constructor(inboxId, accountIdentifiers, installationIds, permissionLevel, consentState) {
2360
+ const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2337
2361
  const len0 = WASM_VECTOR_LEN;
2338
- const ptr1 = passArrayJsValueToWasm0(account_addresses, wasm.__wbindgen_malloc);
2362
+ const ptr1 = passArrayJsValueToWasm0(accountIdentifiers, wasm.__wbindgen_malloc);
2339
2363
  const len1 = WASM_VECTOR_LEN;
2340
- const ptr2 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
2364
+ const ptr2 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
2341
2365
  const len2 = WASM_VECTOR_LEN;
2342
- const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permission_level, consent_state);
2366
+ const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permissionLevel, consentState);
2343
2367
  this.__wbg_ptr = ret >>> 0;
2344
2368
  GroupMemberFinalization.register(this, this.__wbg_ptr, this);
2345
2369
  return this;
@@ -2499,39 +2523,46 @@ export class HmacKey {
2499
2523
  }
2500
2524
  }
2501
2525
 
2502
- const InboxStateFinalization = (typeof FinalizationRegistry === 'undefined')
2526
+ const IdentifierFinalization = (typeof FinalizationRegistry === 'undefined')
2503
2527
  ? { register: () => {}, unregister: () => {} }
2504
- : new FinalizationRegistry(ptr => wasm.__wbg_inboxstate_free(ptr >>> 0, 1));
2528
+ : new FinalizationRegistry(ptr => wasm.__wbg_identifier_free(ptr >>> 0, 1));
2505
2529
 
2506
- export class InboxState {
2530
+ export class Identifier {
2507
2531
 
2508
2532
  static __wrap(ptr) {
2509
2533
  ptr = ptr >>> 0;
2510
- const obj = Object.create(InboxState.prototype);
2534
+ const obj = Object.create(Identifier.prototype);
2511
2535
  obj.__wbg_ptr = ptr;
2512
- InboxStateFinalization.register(obj, obj.__wbg_ptr, obj);
2536
+ IdentifierFinalization.register(obj, obj.__wbg_ptr, obj);
2513
2537
  return obj;
2514
2538
  }
2515
2539
 
2540
+ static __unwrap(jsValue) {
2541
+ if (!(jsValue instanceof Identifier)) {
2542
+ return 0;
2543
+ }
2544
+ return jsValue.__destroy_into_raw();
2545
+ }
2546
+
2516
2547
  __destroy_into_raw() {
2517
2548
  const ptr = this.__wbg_ptr;
2518
2549
  this.__wbg_ptr = 0;
2519
- InboxStateFinalization.unregister(this);
2550
+ IdentifierFinalization.unregister(this);
2520
2551
  return ptr;
2521
2552
  }
2522
2553
 
2523
2554
  free() {
2524
2555
  const ptr = this.__destroy_into_raw();
2525
- wasm.__wbg_inboxstate_free(ptr, 0);
2556
+ wasm.__wbg_identifier_free(ptr, 0);
2526
2557
  }
2527
2558
  /**
2528
2559
  * @returns {string}
2529
2560
  */
2530
- get inboxId() {
2561
+ get identifier() {
2531
2562
  let deferred1_0;
2532
2563
  let deferred1_1;
2533
2564
  try {
2534
- const ret = wasm.__wbg_get_inboxstate_inboxId(this.__wbg_ptr);
2565
+ const ret = wasm.__wbg_get_identifier_identifier(this.__wbg_ptr);
2535
2566
  deferred1_0 = ret[0];
2536
2567
  deferred1_1 = ret[1];
2537
2568
  return getStringFromWasm0(ret[0], ret[1]);
@@ -2542,19 +2573,94 @@ export class InboxState {
2542
2573
  /**
2543
2574
  * @param {string} arg0
2544
2575
  */
2545
- set inboxId(arg0) {
2576
+ set identifier(arg0) {
2546
2577
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2547
2578
  const len0 = WASM_VECTOR_LEN;
2548
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
2579
+ wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
2580
+ }
2581
+ /**
2582
+ * @returns {IdentifierKind}
2583
+ */
2584
+ get identifierKind() {
2585
+ const ret = wasm.__wbg_get_identifier_identifierKind(this.__wbg_ptr);
2586
+ return ret;
2587
+ }
2588
+ /**
2589
+ * @param {IdentifierKind} arg0
2590
+ */
2591
+ set identifierKind(arg0) {
2592
+ wasm.__wbg_set_identifier_identifierKind(this.__wbg_ptr, arg0);
2593
+ }
2594
+ /**
2595
+ * @returns {string | undefined}
2596
+ */
2597
+ get relyingParty() {
2598
+ const ret = wasm.__wbg_get_identifier_relyingParty(this.__wbg_ptr);
2599
+ let v1;
2600
+ if (ret[0] !== 0) {
2601
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
2602
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2603
+ }
2604
+ return v1;
2605
+ }
2606
+ /**
2607
+ * @param {string | null} [arg0]
2608
+ */
2609
+ set relyingParty(arg0) {
2610
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2611
+ var len0 = WASM_VECTOR_LEN;
2612
+ wasm.__wbg_set_identifier_relyingParty(this.__wbg_ptr, ptr0, len0);
2613
+ }
2614
+ /**
2615
+ * @param {string} identifier
2616
+ * @param {IdentifierKind} identifierKind
2617
+ * @param {string | null} [relyingParty]
2618
+ */
2619
+ constructor(identifier, identifierKind, relyingParty) {
2620
+ const ptr0 = passStringToWasm0(identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2621
+ const len0 = WASM_VECTOR_LEN;
2622
+ var ptr1 = isLikeNone(relyingParty) ? 0 : passStringToWasm0(relyingParty, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2623
+ var len1 = WASM_VECTOR_LEN;
2624
+ const ret = wasm.identifier_new(ptr0, len0, identifierKind, ptr1, len1);
2625
+ this.__wbg_ptr = ret >>> 0;
2626
+ IdentifierFinalization.register(this, this.__wbg_ptr, this);
2627
+ return this;
2628
+ }
2629
+ }
2630
+
2631
+ const InboxStateFinalization = (typeof FinalizationRegistry === 'undefined')
2632
+ ? { register: () => {}, unregister: () => {} }
2633
+ : new FinalizationRegistry(ptr => wasm.__wbg_inboxstate_free(ptr >>> 0, 1));
2634
+
2635
+ export class InboxState {
2636
+
2637
+ static __wrap(ptr) {
2638
+ ptr = ptr >>> 0;
2639
+ const obj = Object.create(InboxState.prototype);
2640
+ obj.__wbg_ptr = ptr;
2641
+ InboxStateFinalization.register(obj, obj.__wbg_ptr, obj);
2642
+ return obj;
2643
+ }
2644
+
2645
+ __destroy_into_raw() {
2646
+ const ptr = this.__wbg_ptr;
2647
+ this.__wbg_ptr = 0;
2648
+ InboxStateFinalization.unregister(this);
2649
+ return ptr;
2650
+ }
2651
+
2652
+ free() {
2653
+ const ptr = this.__destroy_into_raw();
2654
+ wasm.__wbg_inboxstate_free(ptr, 0);
2549
2655
  }
2550
2656
  /**
2551
2657
  * @returns {string}
2552
2658
  */
2553
- get recoveryAddress() {
2659
+ get inboxId() {
2554
2660
  let deferred1_0;
2555
2661
  let deferred1_1;
2556
2662
  try {
2557
- const ret = wasm.__wbg_get_inboxstate_recoveryAddress(this.__wbg_ptr);
2663
+ const ret = wasm.__wbg_get_inboxstate_inboxId(this.__wbg_ptr);
2558
2664
  deferred1_0 = ret[0];
2559
2665
  deferred1_1 = ret[1];
2560
2666
  return getStringFromWasm0(ret[0], ret[1]);
@@ -2565,10 +2671,25 @@ export class InboxState {
2565
2671
  /**
2566
2672
  * @param {string} arg0
2567
2673
  */
2568
- set recoveryAddress(arg0) {
2674
+ set inboxId(arg0) {
2569
2675
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2570
2676
  const len0 = WASM_VECTOR_LEN;
2571
- wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
2677
+ wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
2678
+ }
2679
+ /**
2680
+ * @returns {Identifier}
2681
+ */
2682
+ get recoveryIdentifier() {
2683
+ const ret = wasm.__wbg_get_inboxstate_recoveryIdentifier(this.__wbg_ptr);
2684
+ return Identifier.__wrap(ret);
2685
+ }
2686
+ /**
2687
+ * @param {Identifier} arg0
2688
+ */
2689
+ set recoveryIdentifier(arg0) {
2690
+ _assertClass(arg0, Identifier);
2691
+ var ptr0 = arg0.__destroy_into_raw();
2692
+ wasm.__wbg_set_inboxstate_recoveryIdentifier(this.__wbg_ptr, ptr0);
2572
2693
  }
2573
2694
  /**
2574
2695
  * @returns {Installation[]}
@@ -2588,38 +2709,38 @@ export class InboxState {
2588
2709
  wasm.__wbg_set_inboxstate_installations(this.__wbg_ptr, ptr0, len0);
2589
2710
  }
2590
2711
  /**
2591
- * @returns {string[]}
2712
+ * @returns {Identifier[]}
2592
2713
  */
2593
- get accountAddresses() {
2594
- const ret = wasm.__wbg_get_inboxstate_accountAddresses(this.__wbg_ptr);
2714
+ get accountIdentifiers() {
2715
+ const ret = wasm.__wbg_get_inboxstate_accountIdentifiers(this.__wbg_ptr);
2595
2716
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
2596
2717
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2597
2718
  return v1;
2598
2719
  }
2599
2720
  /**
2600
- * @param {string[]} arg0
2721
+ * @param {Identifier[]} arg0
2601
2722
  */
2602
- set accountAddresses(arg0) {
2723
+ set accountIdentifiers(arg0) {
2603
2724
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
2604
2725
  const len0 = WASM_VECTOR_LEN;
2605
- wasm.__wbg_set_inboxstate_accountAddresses(this.__wbg_ptr, ptr0, len0);
2726
+ wasm.__wbg_set_inboxstate_accountIdentifiers(this.__wbg_ptr, ptr0, len0);
2606
2727
  }
2607
2728
  /**
2608
2729
  * @param {string} inbox_id
2609
- * @param {string} recovery_address
2730
+ * @param {Identifier} recovery_identifier
2610
2731
  * @param {Installation[]} installations
2611
- * @param {string[]} account_addresses
2732
+ * @param {Identifier[]} account_identifiers
2612
2733
  */
2613
- constructor(inbox_id, recovery_address, installations, account_addresses) {
2734
+ constructor(inbox_id, recovery_identifier, installations, account_identifiers) {
2614
2735
  const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2615
2736
  const len0 = WASM_VECTOR_LEN;
2616
- const ptr1 = passStringToWasm0(recovery_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2617
- const len1 = WASM_VECTOR_LEN;
2737
+ _assertClass(recovery_identifier, Identifier);
2738
+ var ptr1 = recovery_identifier.__destroy_into_raw();
2618
2739
  const ptr2 = passArrayJsValueToWasm0(installations, wasm.__wbindgen_malloc);
2619
2740
  const len2 = WASM_VECTOR_LEN;
2620
- const ptr3 = passArrayJsValueToWasm0(account_addresses, wasm.__wbindgen_malloc);
2741
+ const ptr3 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
2621
2742
  const len3 = WASM_VECTOR_LEN;
2622
- const ret = wasm.inboxstate_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
2743
+ const ret = wasm.inboxstate_new(ptr0, len0, ptr1, ptr2, len2, ptr3, len3);
2623
2744
  this.__wbg_ptr = ret >>> 0;
2624
2745
  InboxStateFinalization.register(this, this.__wbg_ptr, this);
2625
2746
  return this;
@@ -3508,6 +3629,25 @@ export class MultiRemoteAttachment {
3508
3629
  }
3509
3630
  }
3510
3631
 
3632
+ const PasskeySignatureFinalization = (typeof FinalizationRegistry === 'undefined')
3633
+ ? { register: () => {}, unregister: () => {} }
3634
+ : new FinalizationRegistry(ptr => wasm.__wbg_passkeysignature_free(ptr >>> 0, 1));
3635
+
3636
+ export class PasskeySignature {
3637
+
3638
+ __destroy_into_raw() {
3639
+ const ptr = this.__wbg_ptr;
3640
+ this.__wbg_ptr = 0;
3641
+ PasskeySignatureFinalization.unregister(this);
3642
+ return ptr;
3643
+ }
3644
+
3645
+ free() {
3646
+ const ptr = this.__destroy_into_raw();
3647
+ wasm.__wbg_passkeysignature_free(ptr, 0);
3648
+ }
3649
+ }
3650
+
3511
3651
  const PermissionPolicySetFinalization = (typeof FinalizationRegistry === 'undefined')
3512
3652
  ? { register: () => {}, unregister: () => {} }
3513
3653
  : new FinalizationRegistry(ptr => wasm.__wbg_permissionpolicyset_free(ptr >>> 0, 1));
@@ -4253,7 +4393,7 @@ function __wbg_get_imports() {
4253
4393
  const a = state0.a;
4254
4394
  state0.a = 0;
4255
4395
  try {
4256
- return __wbg_adapter_579(a, state0.b, arg0, arg1, arg2);
4396
+ return __wbg_adapter_592(a, state0.b, arg0, arg1, arg2);
4257
4397
  } finally {
4258
4398
  state0.a = a;
4259
4399
  }
@@ -4283,7 +4423,7 @@ function __wbg_get_imports() {
4283
4423
  const a = state0.a;
4284
4424
  state0.a = 0;
4285
4425
  try {
4286
- return __wbg_adapter_579(a, state0.b, arg0, arg1, arg2);
4426
+ return __wbg_adapter_592(a, state0.b, arg0, arg1, arg2);
4287
4427
  } finally {
4288
4428
  state0.a = a;
4289
4429
  }
@@ -4408,6 +4548,14 @@ function __wbg_get_imports() {
4408
4548
  const ret = arg0.headers;
4409
4549
  return ret;
4410
4550
  };
4551
+ imports.wbg.__wbg_identifier_new = function(arg0) {
4552
+ const ret = Identifier.__wrap(arg0);
4553
+ return ret;
4554
+ };
4555
+ imports.wbg.__wbg_identifier_unwrap = function(arg0) {
4556
+ const ret = Identifier.__unwrap(arg0);
4557
+ return ret;
4558
+ };
4411
4559
  imports.wbg.__wbg_inboxstate_new = function(arg0) {
4412
4560
  const ret = InboxState.__wrap(arg0);
4413
4561
  return ret;
@@ -4567,7 +4715,7 @@ function __wbg_get_imports() {
4567
4715
  const a = state0.a;
4568
4716
  state0.a = 0;
4569
4717
  try {
4570
- return __wbg_adapter_680(a, state0.b, arg0, arg1);
4718
+ return __wbg_adapter_693(a, state0.b, arg0, arg1);
4571
4719
  } finally {
4572
4720
  state0.a = a;
4573
4721
  }
@@ -4674,19 +4822,19 @@ function __wbg_get_imports() {
4674
4822
  const ret = arg0.now();
4675
4823
  return ret;
4676
4824
  };
4677
- imports.wbg.__wbg_onconsentupdate_72468d8f30c5062c = function(arg0, arg1) {
4825
+ imports.wbg.__wbg_onconsentupdate_844b7f7e44492d30 = function(arg0, arg1) {
4678
4826
  arg0.on_consent_update(arg1);
4679
4827
  };
4680
- imports.wbg.__wbg_onconversation_43aee3fe67697518 = function(arg0, arg1) {
4828
+ imports.wbg.__wbg_onconversation_35931efedaf204ea = function(arg0, arg1) {
4681
4829
  arg0.on_conversation(Conversation.__wrap(arg1));
4682
4830
  };
4683
- imports.wbg.__wbg_onerror_58742435b241fdbd = function(arg0, arg1) {
4831
+ imports.wbg.__wbg_onerror_c64021ce19f936d9 = function(arg0, arg1) {
4684
4832
  arg0.on_error(arg1);
4685
4833
  };
4686
- imports.wbg.__wbg_onmessage_12923aab4231469e = function(arg0, arg1) {
4834
+ imports.wbg.__wbg_onmessage_0d3ed9807e0227a5 = function(arg0, arg1) {
4687
4835
  arg0.on_message(Message.__wrap(arg1));
4688
4836
  };
4689
- imports.wbg.__wbg_onuserpreferenceupdate_55a901090685a47e = function(arg0, arg1, arg2) {
4837
+ imports.wbg.__wbg_onuserpreferenceupdate_95e5a0b779408514 = function(arg0, arg1, arg2) {
4690
4838
  var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
4691
4839
  wasm.__wbindgen_free(arg1, arg2 * 4, 4);
4692
4840
  arg0.on_user_preference_update(v0);
@@ -4966,12 +5114,12 @@ function __wbg_get_imports() {
4966
5114
  const ret = false;
4967
5115
  return ret;
4968
5116
  };
4969
- imports.wbg.__wbindgen_closure_wrapper15737 = function(arg0, arg1, arg2) {
4970
- const ret = makeMutClosure(arg0, arg1, 3591, __wbg_adapter_46);
5117
+ imports.wbg.__wbindgen_closure_wrapper16179 = function(arg0, arg1, arg2) {
5118
+ const ret = makeMutClosure(arg0, arg1, 3674, __wbg_adapter_46);
4971
5119
  return ret;
4972
5120
  };
4973
- imports.wbg.__wbindgen_closure_wrapper16046 = function(arg0, arg1, arg2) {
4974
- const ret = makeMutClosure(arg0, arg1, 3663, __wbg_adapter_49);
5121
+ imports.wbg.__wbindgen_closure_wrapper16475 = function(arg0, arg1, arg2) {
5122
+ const ret = makeMutClosure(arg0, arg1, 3747, __wbg_adapter_49);
4975
5123
  return ret;
4976
5124
  };
4977
5125
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {