@wireapp/core-crypto 9.0.1 → 9.1.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.
package/src/corecrypto.js CHANGED
@@ -25,7 +25,8 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
25
25
  // src/CoreCryptoError.ts
26
26
  class CoreCryptoError extends Error {
27
27
  errorStack;
28
- proteusErrorCode;
28
+ context;
29
+ type;
29
30
  constructor(richError, ...params) {
30
31
  super(richError.message, ...params);
31
32
  Object.setPrototypeOf(this, new.target.prototype);
@@ -37,10 +38,9 @@ class CoreCryptoError extends Error {
37
38
  } else {
38
39
  this.errorStack = [];
39
40
  }
40
- if (richError.proteus_error_code) {
41
- this.proteusErrorCode = richError.proteus_error_code;
42
- } else {
43
- this.proteusErrorCode = null;
41
+ if (richError.context && richError.type && Object.values(ErrorType).includes(richError.type)) {
42
+ this.context = richError.context;
43
+ this.type = richError.type;
44
44
  }
45
45
  }
46
46
  static fallback(message, ...params) {
@@ -55,7 +55,7 @@ class CoreCryptoError extends Error {
55
55
  }
56
56
  }
57
57
  static fromStdError(e) {
58
- if (e instanceof CoreCryptoError) {
58
+ if (isCcErrorGeneric(e)) {
59
59
  return e;
60
60
  }
61
61
  const opts = {
@@ -66,7 +66,7 @@ class CoreCryptoError extends Error {
66
66
  }
67
67
  static async asyncMapErr(p) {
68
68
  const mappedErrorPromise = p.catch((e) => {
69
- if (e instanceof CoreCryptoError) {
69
+ if (isCcErrorGeneric(e)) {
70
70
  throw e;
71
71
  } else {
72
72
  throw this.fromStdError(e);
@@ -75,6 +75,106 @@ class CoreCryptoError extends Error {
75
75
  return await mappedErrorPromise;
76
76
  }
77
77
  }
78
+ var ErrorType;
79
+ ((ErrorType2) => {
80
+ ErrorType2["Mls"] = "Mls";
81
+ ErrorType2["Proteus"] = "Proteus";
82
+ ErrorType2["E2ei"] = "E2ei";
83
+ ErrorType2["TransactionFailed"] = "TransactionFailed";
84
+ ErrorType2["Other"] = "Other";
85
+ })(ErrorType ||= {});
86
+ function isCcErrorGeneric(error) {
87
+ return typeof error === "object" && error !== null && "errorStack" in error && "context" in error && "type" in error;
88
+ }
89
+ function isCcError(error, errorType) {
90
+ return isCcErrorGeneric(error) && error.type === errorType;
91
+ }
92
+ function isE2eiError(error) {
93
+ return isCcError(error, "E2ei" /* E2ei */);
94
+ }
95
+ function isTransactionFailedError(error) {
96
+ return isCcError(error, "TransactionFailed" /* TransactionFailed */);
97
+ }
98
+ function isOtherError(error) {
99
+ return isCcError(error, "Other" /* Other */);
100
+ }
101
+ var MlsErrorType;
102
+ ((MlsErrorType2) => {
103
+ MlsErrorType2["ConversationAlreadyExists"] = "ConversationAlreadyExists";
104
+ MlsErrorType2["DuplicateMessage"] = "DuplicateMessage";
105
+ MlsErrorType2["BufferedFutureMessage"] = "BufferedFutureMessage";
106
+ MlsErrorType2["WrongEpoch"] = "WrongEpoch";
107
+ MlsErrorType2["BufferedCommit"] = "BufferedCommit";
108
+ MlsErrorType2["MessageEpochTooOld"] = "MessageEpochTooOld";
109
+ MlsErrorType2["SelfCommitIgnored"] = "SelfCommitIgnored";
110
+ MlsErrorType2["UnmergedPendingGroup"] = "UnmergedPendingGroup";
111
+ MlsErrorType2["StaleProposal"] = "StaleProposal";
112
+ MlsErrorType2["StaleCommit"] = "StaleCommit";
113
+ MlsErrorType2["OrphanWelcome"] = "OrphanWelcome";
114
+ MlsErrorType2["MessageRejected"] = "MessageRejected";
115
+ MlsErrorType2["Other"] = "Other";
116
+ })(MlsErrorType ||= {});
117
+ function isMlsError(error, errorType) {
118
+ return isCcError(error, "Mls" /* Mls */) && error.context !== undefined && error.context.type === errorType;
119
+ }
120
+ function isMlsConversationAlreadyExistsError(error) {
121
+ return isMlsError(error, "ConversationAlreadyExists" /* ConversationAlreadyExists */);
122
+ }
123
+ function isMlsDuplicateMessageError(error) {
124
+ return isMlsError(error, "DuplicateMessage" /* DuplicateMessage */);
125
+ }
126
+ function isMlsBufferedFutureMessageError(error) {
127
+ return isMlsError(error, "BufferedFutureMessage" /* BufferedFutureMessage */);
128
+ }
129
+ function isMlsWrongEpochError(error) {
130
+ return isMlsError(error, "WrongEpoch" /* WrongEpoch */);
131
+ }
132
+ function isMlsBufferedCommitError(error) {
133
+ return isMlsError(error, "BufferedCommit" /* BufferedCommit */);
134
+ }
135
+ function isMlsSelfCommitIgnoredError(error) {
136
+ return isMlsError(error, "SelfCommitIgnored" /* SelfCommitIgnored */);
137
+ }
138
+ function isMlsUnmergedPendingGroupError(error) {
139
+ return isMlsError(error, "UnmergedPendingGroup" /* UnmergedPendingGroup */);
140
+ }
141
+ function isMlsStaleProposalError(error) {
142
+ return isMlsError(error, "StaleProposal" /* StaleProposal */);
143
+ }
144
+ function isMlsStaleCommitError(error) {
145
+ return isMlsError(error, "StaleCommit" /* StaleCommit */);
146
+ }
147
+ function isMlsOrphanWelcomeError(error) {
148
+ return isMlsError(error, "OrphanWelcome" /* OrphanWelcome */);
149
+ }
150
+ function isMlsMessageRejectedError(error) {
151
+ return isMlsError(error, "MessageRejected" /* MessageRejected */);
152
+ }
153
+ function isMlsOtherError(error) {
154
+ return isMlsError(error, "Other" /* Other */);
155
+ }
156
+ var ProteusErrorType;
157
+ ((ProteusErrorType2) => {
158
+ ProteusErrorType2["SessionNotFound"] = "SessionNotFound";
159
+ ProteusErrorType2["DuplicateMessage"] = "DuplicateMessage";
160
+ ProteusErrorType2["RemoteIdentityChanged"] = "RemoteIdentityChanged";
161
+ ProteusErrorType2["Other"] = "Other";
162
+ })(ProteusErrorType ||= {});
163
+ function isProteusError(error, errorType) {
164
+ return isCcError(error, "Proteus" /* Proteus */) && error.context !== undefined && error.context.type === errorType;
165
+ }
166
+ function isProteusSessionNotFoundError(error) {
167
+ return isProteusError(error, "SessionNotFound" /* SessionNotFound */);
168
+ }
169
+ function isProteusDuplicateMessageError(error) {
170
+ return isProteusError(error, "DuplicateMessage" /* DuplicateMessage */);
171
+ }
172
+ function isProteusRemoteIdentityChangedError(error) {
173
+ return isProteusError(error, "RemoteIdentityChanged" /* RemoteIdentityChanged */);
174
+ }
175
+ function isProteusOtherError(error) {
176
+ return isProteusError(error, "Other" /* Other */);
177
+ }
78
178
  // src/autogenerated/core-crypto-ffi.js
79
179
  var wasm;
80
180
  var cachedUint8ArrayMemory0 = null;
@@ -84,20 +184,14 @@ function getUint8ArrayMemory0() {
84
184
  }
85
185
  return cachedUint8ArrayMemory0;
86
186
  }
87
- var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
88
- throw Error("TextDecoder not available");
89
- } };
90
- if (typeof TextDecoder !== "undefined") {
91
- cachedTextDecoder.decode();
92
- }
187
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
188
+ cachedTextDecoder.decode();
93
189
  var MAX_SAFARI_DECODE_BYTES = 2146435072;
94
190
  var numBytesDecoded = 0;
95
191
  function decodeText(ptr, len) {
96
192
  numBytesDecoded += len;
97
193
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
98
- cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
99
- throw Error("TextDecoder not available");
100
- } };
194
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
101
195
  cachedTextDecoder.decode();
102
196
  numBytesDecoded = len;
103
197
  }
@@ -108,19 +202,17 @@ function getStringFromWasm0(ptr, len) {
108
202
  return decodeText(ptr, len);
109
203
  }
110
204
  var WASM_VECTOR_LEN = 0;
111
- var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
112
- throw Error("TextEncoder not available");
113
- } };
114
- var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
115
- return cachedTextEncoder.encodeInto(arg, view);
116
- } : function(arg, view) {
117
- const buf = cachedTextEncoder.encode(arg);
118
- view.set(buf);
119
- return {
120
- read: arg.length,
121
- written: buf.length
205
+ var cachedTextEncoder = new TextEncoder;
206
+ if (!("encodeInto" in cachedTextEncoder)) {
207
+ cachedTextEncoder.encodeInto = function(arg, view) {
208
+ const buf = cachedTextEncoder.encode(arg);
209
+ view.set(buf);
210
+ return {
211
+ read: arg.length,
212
+ written: buf.length
213
+ };
122
214
  };
123
- };
215
+ }
124
216
  function passStringToWasm0(arg, malloc, realloc) {
125
217
  if (realloc === undefined) {
126
218
  const buf = cachedTextEncoder.encode(arg);
@@ -145,7 +237,7 @@ function passStringToWasm0(arg, malloc, realloc) {
145
237
  }
146
238
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
147
239
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
148
- const ret = encodeString(arg, view);
240
+ const ret = cachedTextEncoder.encodeInto(arg, view);
149
241
  offset += ret.written;
150
242
  ptr = realloc(ptr, len, offset, 1) >>> 0;
151
243
  }
@@ -235,18 +327,8 @@ ${val.stack}`;
235
327
  }
236
328
  return className;
237
329
  }
238
- function getArrayJsValueFromWasm0(ptr, len) {
239
- ptr = ptr >>> 0;
240
- const mem = getDataViewMemory0();
241
- const result = [];
242
- for (let i = ptr;i < ptr + 4 * len; i += 4) {
243
- result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
244
- }
245
- wasm.__externref_drop_slice(ptr, len);
246
- return result;
247
- }
248
330
  var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((state) => {
249
- wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b);
331
+ wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
250
332
  });
251
333
  function makeMutClosure(arg0, arg1, dtor, f) {
252
334
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -258,7 +340,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
258
340
  return f(a, state.b, ...args);
259
341
  } finally {
260
342
  if (--state.cnt === 0) {
261
- wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
343
+ wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
262
344
  CLOSURE_DTORS.unregister(state);
263
345
  } else {
264
346
  state.a = a;
@@ -269,6 +351,16 @@ function makeMutClosure(arg0, arg1, dtor, f) {
269
351
  CLOSURE_DTORS.register(real, state, state);
270
352
  return real;
271
353
  }
354
+ function getArrayJsValueFromWasm0(ptr, len) {
355
+ ptr = ptr >>> 0;
356
+ const mem = getDataViewMemory0();
357
+ const result = [];
358
+ for (let i = ptr;i < ptr + 4 * len; i += 4) {
359
+ result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
360
+ }
361
+ wasm.__externref_drop_slice(ptr, len);
362
+ return result;
363
+ }
272
364
  function _assertClass(instance, klass) {
273
365
  if (!(instance instanceof klass)) {
274
366
  throw new Error(`expected instance of ${klass.name}`);
@@ -322,6 +414,14 @@ function updateDatabaseKey(name, old_key, new_key) {
322
414
  const ret = wasm.updateDatabaseKey(ptr0, len0, old_key.__wbg_ptr, new_key.__wbg_ptr);
323
415
  return ret;
324
416
  }
417
+ function openDatabase(name, key) {
418
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
419
+ const len0 = WASM_VECTOR_LEN;
420
+ _assertClass(key, DatabaseKey);
421
+ var ptr1 = key.__destroy_into_raw();
422
+ const ret = wasm.openDatabase(ptr0, len0, ptr1);
423
+ return ret;
424
+ }
325
425
  function version() {
326
426
  let deferred1_0;
327
427
  let deferred1_1;
@@ -338,17 +438,17 @@ function build_metadata() {
338
438
  const ret = wasm.build_metadata();
339
439
  return BuildMetadata.__wrap(ret);
340
440
  }
341
- function __wbg_adapter_16(arg0, arg1, arg2) {
342
- wasm.closure2896_externref_shim(arg0, arg1, arg2);
441
+ function __wbg_adapter_6(arg0, arg1, arg2) {
442
+ wasm.closure2587_externref_shim(arg0, arg1, arg2);
343
443
  }
344
- function __wbg_adapter_23(arg0, arg1, arg2) {
345
- wasm.closure2586_externref_shim(arg0, arg1, arg2);
444
+ function __wbg_adapter_11(arg0, arg1, arg2) {
445
+ wasm.closure2899_externref_shim(arg0, arg1, arg2);
346
446
  }
347
- function __wbg_adapter_30(arg0, arg1, arg2) {
348
- wasm.closure1019_externref_shim(arg0, arg1, arg2);
447
+ function __wbg_adapter_18(arg0, arg1, arg2) {
448
+ wasm.closure1021_externref_shim(arg0, arg1, arg2);
349
449
  }
350
- function __wbg_adapter_503(arg0, arg1, arg2, arg3) {
351
- wasm.closure2998_externref_shim(arg0, arg1, arg2, arg3);
450
+ function __wbg_adapter_510(arg0, arg1, arg2, arg3) {
451
+ wasm.closure3000_externref_shim(arg0, arg1, arg2, arg3);
352
452
  }
353
453
  var Ciphersuite = Object.freeze({
354
454
  MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
@@ -482,6 +582,8 @@ class AcmeChallenge {
482
582
  }
483
583
  }
484
584
  }
585
+ if (Symbol.dispose)
586
+ AcmeChallenge.prototype[Symbol.dispose] = AcmeChallenge.prototype.free;
485
587
  var AcmeDirectoryFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_acmedirectory_free(ptr >>> 0, 1));
486
588
 
487
589
  class AcmeDirectory {
@@ -551,6 +653,8 @@ class AcmeDirectory {
551
653
  }
552
654
  }
553
655
  }
656
+ if (Symbol.dispose)
657
+ AcmeDirectory.prototype[Symbol.dispose] = AcmeDirectory.prototype.free;
554
658
  var BufferedDecryptedMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_buffereddecryptedmessage_free(ptr >>> 0, 1));
555
659
 
556
660
  class BufferedDecryptedMessage {
@@ -610,6 +714,8 @@ class BufferedDecryptedMessage {
610
714
  return v1;
611
715
  }
612
716
  }
717
+ if (Symbol.dispose)
718
+ BufferedDecryptedMessage.prototype[Symbol.dispose] = BufferedDecryptedMessage.prototype.free;
613
719
  var BuildMetadataFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_buildmetadata_free(ptr >>> 0, 1));
614
720
 
615
721
  class BuildMetadata {
@@ -683,6 +789,8 @@ class BuildMetadata {
683
789
  return getStringFromWasm0(ret[0], ret[1]);
684
790
  }
685
791
  }
792
+ if (Symbol.dispose)
793
+ BuildMetadata.prototype[Symbol.dispose] = BuildMetadata.prototype.free;
686
794
  var ClientIdFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_clientid_free(ptr >>> 0, 1));
687
795
 
688
796
  class ClientId {
@@ -724,6 +832,8 @@ class ClientId {
724
832
  return v1;
725
833
  }
726
834
  }
835
+ if (Symbol.dispose)
836
+ ClientId.prototype[Symbol.dispose] = ClientId.prototype.free;
727
837
  var CommitBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_commitbundle_free(ptr >>> 0, 1));
728
838
 
729
839
  class CommitBundle {
@@ -786,6 +896,8 @@ class CommitBundle {
786
896
  return v1;
787
897
  }
788
898
  }
899
+ if (Symbol.dispose)
900
+ CommitBundle.prototype[Symbol.dispose] = CommitBundle.prototype.free;
789
901
  var ConversationConfigurationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_conversationconfiguration_free(ptr >>> 0, 1));
790
902
 
791
903
  class ConversationConfiguration {
@@ -825,6 +937,8 @@ class ConversationConfiguration {
825
937
  return this;
826
938
  }
827
939
  }
940
+ if (Symbol.dispose)
941
+ ConversationConfiguration.prototype[Symbol.dispose] = ConversationConfiguration.prototype.free;
828
942
  var ConversationIdFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_conversationid_free(ptr >>> 0, 1));
829
943
 
830
944
  class ConversationId {
@@ -860,6 +974,8 @@ class ConversationId {
860
974
  return v1;
861
975
  }
862
976
  }
977
+ if (Symbol.dispose)
978
+ ConversationId.prototype[Symbol.dispose] = ConversationId.prototype.free;
863
979
  var CoreCryptoFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_corecrypto_free(ptr >>> 0, 1));
864
980
 
865
981
  class CoreCrypto {
@@ -1070,6 +1186,8 @@ class CoreCrypto {
1070
1186
  return ret;
1071
1187
  }
1072
1188
  }
1189
+ if (Symbol.dispose)
1190
+ CoreCrypto.prototype[Symbol.dispose] = CoreCrypto.prototype.free;
1073
1191
  var CoreCryptoContextFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_corecryptocontext_free(ptr >>> 0, 1));
1074
1192
 
1075
1193
  class CoreCryptoContext {
@@ -1483,6 +1601,8 @@ class CoreCryptoContext {
1483
1601
  return ret;
1484
1602
  }
1485
1603
  }
1604
+ if (Symbol.dispose)
1605
+ CoreCryptoContext.prototype[Symbol.dispose] = CoreCryptoContext.prototype.free;
1486
1606
  var CoreCryptoLoggerFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_corecryptologger_free(ptr >>> 0, 1));
1487
1607
 
1488
1608
  class CoreCryptoLogger {
@@ -1506,6 +1626,8 @@ class CoreCryptoLogger {
1506
1626
  return this;
1507
1627
  }
1508
1628
  }
1629
+ if (Symbol.dispose)
1630
+ CoreCryptoLogger.prototype[Symbol.dispose] = CoreCryptoLogger.prototype.free;
1509
1631
  var CrlRegistrationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_crlregistration_free(ptr >>> 0, 1));
1510
1632
 
1511
1633
  class CrlRegistration {
@@ -1547,6 +1669,8 @@ class CrlRegistration {
1547
1669
  return this;
1548
1670
  }
1549
1671
  }
1672
+ if (Symbol.dispose)
1673
+ CrlRegistration.prototype[Symbol.dispose] = CrlRegistration.prototype.free;
1550
1674
  var CustomConfigurationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_customconfiguration_free(ptr >>> 0, 1));
1551
1675
 
1552
1676
  class CustomConfiguration {
@@ -1588,6 +1712,31 @@ class CustomConfiguration {
1588
1712
  return this;
1589
1713
  }
1590
1714
  }
1715
+ if (Symbol.dispose)
1716
+ CustomConfiguration.prototype[Symbol.dispose] = CustomConfiguration.prototype.free;
1717
+ var DatabaseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_database_free(ptr >>> 0, 1));
1718
+
1719
+ class Database {
1720
+ static __wrap(ptr) {
1721
+ ptr = ptr >>> 0;
1722
+ const obj = Object.create(Database.prototype);
1723
+ obj.__wbg_ptr = ptr;
1724
+ DatabaseFinalization.register(obj, obj.__wbg_ptr, obj);
1725
+ return obj;
1726
+ }
1727
+ __destroy_into_raw() {
1728
+ const ptr = this.__wbg_ptr;
1729
+ this.__wbg_ptr = 0;
1730
+ DatabaseFinalization.unregister(this);
1731
+ return ptr;
1732
+ }
1733
+ free() {
1734
+ const ptr = this.__destroy_into_raw();
1735
+ wasm.__wbg_database_free(ptr, 0);
1736
+ }
1737
+ }
1738
+ if (Symbol.dispose)
1739
+ Database.prototype[Symbol.dispose] = Database.prototype.free;
1591
1740
  var DatabaseKeyFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_databasekey_free(ptr >>> 0, 1));
1592
1741
 
1593
1742
  class DatabaseKey {
@@ -1613,6 +1762,8 @@ class DatabaseKey {
1613
1762
  return this;
1614
1763
  }
1615
1764
  }
1765
+ if (Symbol.dispose)
1766
+ DatabaseKey.prototype[Symbol.dispose] = DatabaseKey.prototype.free;
1616
1767
  var DecryptedMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_decryptedmessage_free(ptr >>> 0, 1));
1617
1768
 
1618
1769
  class DecryptedMessage {
@@ -1681,6 +1832,8 @@ class DecryptedMessage {
1681
1832
  return v1;
1682
1833
  }
1683
1834
  }
1835
+ if (Symbol.dispose)
1836
+ DecryptedMessage.prototype[Symbol.dispose] = DecryptedMessage.prototype.free;
1684
1837
  var EpochObserverFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_epochobserver_free(ptr >>> 0, 1));
1685
1838
 
1686
1839
  class EpochObserver {
@@ -1704,6 +1857,8 @@ class EpochObserver {
1704
1857
  return this;
1705
1858
  }
1706
1859
  }
1860
+ if (Symbol.dispose)
1861
+ EpochObserver.prototype[Symbol.dispose] = EpochObserver.prototype.free;
1707
1862
  var ExternalSenderKeyFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_externalsenderkey_free(ptr >>> 0, 1));
1708
1863
 
1709
1864
  class ExternalSenderKey {
@@ -1745,6 +1900,8 @@ class ExternalSenderKey {
1745
1900
  return v1;
1746
1901
  }
1747
1902
  }
1903
+ if (Symbol.dispose)
1904
+ ExternalSenderKey.prototype[Symbol.dispose] = ExternalSenderKey.prototype.free;
1748
1905
  var FfiWireE2EIdentityFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_ffiwiree2eidentity_free(ptr >>> 0, 1));
1749
1906
 
1750
1907
  class FfiWireE2EIdentity {
@@ -1876,6 +2033,8 @@ class FfiWireE2EIdentity {
1876
2033
  return ret;
1877
2034
  }
1878
2035
  }
2036
+ if (Symbol.dispose)
2037
+ FfiWireE2EIdentity.prototype[Symbol.dispose] = FfiWireE2EIdentity.prototype.free;
1879
2038
  var GroupInfoFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_groupinfo_free(ptr >>> 0, 1));
1880
2039
 
1881
2040
  class GroupInfo {
@@ -1911,6 +2070,8 @@ class GroupInfo {
1911
2070
  return v1;
1912
2071
  }
1913
2072
  }
2073
+ if (Symbol.dispose)
2074
+ GroupInfo.prototype[Symbol.dispose] = GroupInfo.prototype.free;
1914
2075
  var GroupInfoBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_groupinfobundle_free(ptr >>> 0, 1));
1915
2076
 
1916
2077
  class GroupInfoBundle {
@@ -1955,6 +2116,8 @@ class GroupInfoBundle {
1955
2116
  wasm.__wbg_set_groupinfobundle_payload(this.__wbg_ptr, ptr0);
1956
2117
  }
1957
2118
  }
2119
+ if (Symbol.dispose)
2120
+ GroupInfoBundle.prototype[Symbol.dispose] = GroupInfoBundle.prototype.free;
1958
2121
  var HistoryObserverFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_historyobserver_free(ptr >>> 0, 1));
1959
2122
 
1960
2123
  class HistoryObserver {
@@ -1978,6 +2141,8 @@ class HistoryObserver {
1978
2141
  return this;
1979
2142
  }
1980
2143
  }
2144
+ if (Symbol.dispose)
2145
+ HistoryObserver.prototype[Symbol.dispose] = HistoryObserver.prototype.free;
1981
2146
  var HistorySecretFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_historysecret_free(ptr >>> 0, 1));
1982
2147
 
1983
2148
  class HistorySecret {
@@ -2022,6 +2187,8 @@ class HistorySecret {
2022
2187
  return this;
2023
2188
  }
2024
2189
  }
2190
+ if (Symbol.dispose)
2191
+ HistorySecret.prototype[Symbol.dispose] = HistorySecret.prototype.free;
2025
2192
  var KeyPackageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_keypackage_free(ptr >>> 0, 1));
2026
2193
 
2027
2194
  class KeyPackage {
@@ -2063,6 +2230,8 @@ class KeyPackage {
2063
2230
  return v1;
2064
2231
  }
2065
2232
  }
2233
+ if (Symbol.dispose)
2234
+ KeyPackage.prototype[Symbol.dispose] = KeyPackage.prototype.free;
2066
2235
  var MlsTransportFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_mlstransport_free(ptr >>> 0, 1));
2067
2236
 
2068
2237
  class MlsTransport {
@@ -2086,6 +2255,8 @@ class MlsTransport {
2086
2255
  return this;
2087
2256
  }
2088
2257
  }
2258
+ if (Symbol.dispose)
2259
+ MlsTransport.prototype[Symbol.dispose] = MlsTransport.prototype.free;
2089
2260
  var MlsTransportDataFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_mlstransportdata_free(ptr >>> 0, 1));
2090
2261
 
2091
2262
  class MlsTransportData {
@@ -2114,6 +2285,8 @@ class MlsTransportData {
2114
2285
  return this;
2115
2286
  }
2116
2287
  }
2288
+ if (Symbol.dispose)
2289
+ MlsTransportData.prototype[Symbol.dispose] = MlsTransportData.prototype.free;
2117
2290
  var MlsTransportResponseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_mlstransportresponse_free(ptr >>> 0, 1));
2118
2291
 
2119
2292
  class MlsTransportResponse {
@@ -2166,6 +2339,8 @@ class MlsTransportResponse {
2166
2339
  return this;
2167
2340
  }
2168
2341
  }
2342
+ if (Symbol.dispose)
2343
+ MlsTransportResponse.prototype[Symbol.dispose] = MlsTransportResponse.prototype.free;
2169
2344
  var NewAcmeAuthzFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_newacmeauthz_free(ptr >>> 0, 1));
2170
2345
 
2171
2346
  class NewAcmeAuthz {
@@ -2212,6 +2387,8 @@ class NewAcmeAuthz {
2212
2387
  return AcmeChallenge.__wrap(ret);
2213
2388
  }
2214
2389
  }
2390
+ if (Symbol.dispose)
2391
+ NewAcmeAuthz.prototype[Symbol.dispose] = NewAcmeAuthz.prototype.free;
2215
2392
  var NewAcmeOrderFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_newacmeorder_free(ptr >>> 0, 1));
2216
2393
 
2217
2394
  class NewAcmeOrder {
@@ -2245,6 +2422,8 @@ class NewAcmeOrder {
2245
2422
  return v1;
2246
2423
  }
2247
2424
  }
2425
+ if (Symbol.dispose)
2426
+ NewAcmeOrder.prototype[Symbol.dispose] = NewAcmeOrder.prototype.free;
2248
2427
  var ProteusAutoPrekeyBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_proteusautoprekeybundle_free(ptr >>> 0, 1));
2249
2428
 
2250
2429
  class ProteusAutoPrekeyBundle {
@@ -2276,6 +2455,8 @@ class ProteusAutoPrekeyBundle {
2276
2455
  return v1;
2277
2456
  }
2278
2457
  }
2458
+ if (Symbol.dispose)
2459
+ ProteusAutoPrekeyBundle.prototype[Symbol.dispose] = ProteusAutoPrekeyBundle.prototype.free;
2279
2460
  var SecretKeyFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_secretkey_free(ptr >>> 0, 1));
2280
2461
 
2281
2462
  class SecretKey {
@@ -2311,6 +2492,8 @@ class SecretKey {
2311
2492
  return v1;
2312
2493
  }
2313
2494
  }
2495
+ if (Symbol.dispose)
2496
+ SecretKey.prototype[Symbol.dispose] = SecretKey.prototype.free;
2314
2497
  var WelcomeFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_welcome_free(ptr >>> 0, 1));
2315
2498
 
2316
2499
  class Welcome {
@@ -2346,6 +2529,8 @@ class Welcome {
2346
2529
  return v1;
2347
2530
  }
2348
2531
  }
2532
+ if (Symbol.dispose)
2533
+ Welcome.prototype[Symbol.dispose] = Welcome.prototype.free;
2349
2534
  var WelcomeBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_welcomebundle_free(ptr >>> 0, 1));
2350
2535
 
2351
2536
  class WelcomeBundle {
@@ -2380,6 +2565,8 @@ class WelcomeBundle {
2380
2565
  return v1;
2381
2566
  }
2382
2567
  }
2568
+ if (Symbol.dispose)
2569
+ WelcomeBundle.prototype[Symbol.dispose] = WelcomeBundle.prototype.free;
2383
2570
  var WireIdentityFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_wireidentity_free(ptr >>> 0, 1));
2384
2571
 
2385
2572
  class WireIdentity {
@@ -2440,6 +2627,8 @@ class WireIdentity {
2440
2627
  return ret === 0 ? undefined : X509Identity.__wrap(ret);
2441
2628
  }
2442
2629
  }
2630
+ if (Symbol.dispose)
2631
+ WireIdentity.prototype[Symbol.dispose] = WireIdentity.prototype.free;
2443
2632
  var X509IdentityFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_x509identity_free(ptr >>> 0, 1));
2444
2633
 
2445
2634
  class X509Identity {
@@ -2529,6 +2718,8 @@ class X509Identity {
2529
2718
  return BigInt.asUintN(64, ret);
2530
2719
  }
2531
2720
  }
2721
+ if (Symbol.dispose)
2722
+ X509Identity.prototype[Symbol.dispose] = X509Identity.prototype.free;
2532
2723
  var EXPECTED_RESPONSE_TYPES = new Set(["basic", "cors", "default"]);
2533
2724
  async function __wbg_load(module, imports) {
2534
2725
  if (typeof Response === "function" && module instanceof Response) {
@@ -2558,11 +2749,11 @@ async function __wbg_load(module, imports) {
2558
2749
  function __wbg_get_imports() {
2559
2750
  const imports = {};
2560
2751
  imports.wbg = {};
2561
- imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
2752
+ imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
2562
2753
  const ret = Error(getStringFromWasm0(arg0, arg1));
2563
2754
  return ret;
2564
2755
  };
2565
- imports.wbg.__wbg_Number_577a493fc95ea223 = function(arg0) {
2756
+ imports.wbg.__wbg_Number_998bea33bd87c3e0 = function(arg0) {
2566
2757
  const ret = Number(arg0);
2567
2758
  return ret;
2568
2759
  };
@@ -2581,30 +2772,30 @@ function __wbg_get_imports() {
2581
2772
  const ret = BufferedDecryptedMessage.__wrap(arg0);
2582
2773
  return ret;
2583
2774
  };
2584
- imports.wbg.__wbg_call_103c29efd2d6641f = function() {
2585
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2586
- const ret = arg0.call(arg1, arg2, arg3, arg4);
2587
- return ret;
2588
- }, arguments);
2589
- };
2590
- imports.wbg.__wbg_call_2f8d426a20a307fe = function() {
2775
+ imports.wbg.__wbg_call_13410aac570ffff7 = function() {
2591
2776
  return handleError(function(arg0, arg1) {
2592
2777
  const ret = arg0.call(arg1);
2593
2778
  return ret;
2594
2779
  }, arguments);
2595
2780
  };
2596
- imports.wbg.__wbg_call_d7c6e5dcdab87b72 = function() {
2781
+ imports.wbg.__wbg_call_641db1bb5db5a579 = function() {
2597
2782
  return handleError(function(arg0, arg1, arg2, arg3) {
2598
2783
  const ret = arg0.call(arg1, arg2, arg3);
2599
2784
  return ret;
2600
2785
  }, arguments);
2601
2786
  };
2602
- imports.wbg.__wbg_call_f53f0647ceb9c567 = function() {
2787
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function() {
2603
2788
  return handleError(function(arg0, arg1, arg2) {
2604
2789
  const ret = arg0.call(arg1, arg2);
2605
2790
  return ret;
2606
2791
  }, arguments);
2607
2792
  };
2793
+ imports.wbg.__wbg_call_f1fd202ba222e0ec = function() {
2794
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2795
+ const ret = arg0.call(arg1, arg2, arg3, arg4);
2796
+ return ret;
2797
+ }, arguments);
2798
+ };
2608
2799
  imports.wbg.__wbg_clientid_new = function(arg0) {
2609
2800
  const ret = ClientId.__wrap(arg0);
2610
2801
  return ret;
@@ -2613,7 +2804,7 @@ function __wbg_get_imports() {
2613
2804
  const ret = ClientId.__unwrap(arg0);
2614
2805
  return ret;
2615
2806
  };
2616
- imports.wbg.__wbg_close_5c0c68ce107ac21e = function(arg0) {
2807
+ imports.wbg.__wbg_close_bec476a5be366c27 = function(arg0) {
2617
2808
  arg0.close();
2618
2809
  };
2619
2810
  imports.wbg.__wbg_commitbundle_new = function(arg0) {
@@ -2628,31 +2819,31 @@ function __wbg_get_imports() {
2628
2819
  const ret = CoreCrypto.__wrap(arg0);
2629
2820
  return ret;
2630
2821
  };
2631
- imports.wbg.__wbg_count_9a21aa97cae2b4d6 = function() {
2822
+ imports.wbg.__wbg_count_1cff3c6a8d01b472 = function() {
2632
2823
  return handleError(function(arg0) {
2633
2824
  const ret = arg0.count();
2634
2825
  return ret;
2635
2826
  }, arguments);
2636
2827
  };
2637
- imports.wbg.__wbg_count_9d30285250b9065f = function() {
2828
+ imports.wbg.__wbg_count_4fa636eb52ae7a3d = function() {
2638
2829
  return handleError(function(arg0, arg1) {
2639
2830
  const ret = arg0.count(arg1);
2640
2831
  return ret;
2641
2832
  }, arguments);
2642
2833
  };
2643
- imports.wbg.__wbg_createIndex_35a1f70c8314a7de = function() {
2834
+ imports.wbg.__wbg_createIndex_1c6d4ccd9a4ba42a = function() {
2644
2835
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2645
2836
  const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3, arg4);
2646
2837
  return ret;
2647
2838
  }, arguments);
2648
2839
  };
2649
- imports.wbg.__wbg_createIndex_6ef667be4f40898c = function() {
2840
+ imports.wbg.__wbg_createIndex_bdb2cf253d016348 = function() {
2650
2841
  return handleError(function(arg0, arg1, arg2, arg3) {
2651
2842
  const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3);
2652
2843
  return ret;
2653
2844
  }, arguments);
2654
2845
  };
2655
- imports.wbg.__wbg_createObjectStore_7e79e7f6de6b5f4a = function() {
2846
+ imports.wbg.__wbg_createObjectStore_2112aa8eea18ea9d = function() {
2656
2847
  return handleError(function(arg0, arg1, arg2, arg3) {
2657
2848
  const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3);
2658
2849
  return ret;
@@ -2666,36 +2857,47 @@ function __wbg_get_imports() {
2666
2857
  const ret = arg0.crypto;
2667
2858
  return ret;
2668
2859
  };
2860
+ imports.wbg.__wbg_database_new = function(arg0) {
2861
+ const ret = Database.__wrap(arg0);
2862
+ return ret;
2863
+ };
2669
2864
  imports.wbg.__wbg_decryptedmessage_new = function(arg0) {
2670
2865
  const ret = DecryptedMessage.__wrap(arg0);
2671
2866
  return ret;
2672
2867
  };
2673
- imports.wbg.__wbg_deleteIndex_315fda5b473605cf = function() {
2868
+ imports.wbg.__wbg_deleteIndex_3f4cceeb511f4f95 = function() {
2674
2869
  return handleError(function(arg0, arg1, arg2) {
2675
2870
  arg0.deleteIndex(getStringFromWasm0(arg1, arg2));
2676
2871
  }, arguments);
2677
2872
  };
2678
- imports.wbg.__wbg_deleteObjectStore_8a252d9a253df02b = function() {
2873
+ imports.wbg.__wbg_deleteObjectStore_10ef920e4da8ac48 = function() {
2679
2874
  return handleError(function(arg0, arg1, arg2) {
2680
2875
  arg0.deleteObjectStore(getStringFromWasm0(arg1, arg2));
2681
2876
  }, arguments);
2682
2877
  };
2683
- imports.wbg.__wbg_delete_570e5d01c731e067 = function() {
2878
+ imports.wbg.__wbg_delete_33e805b6d49fa644 = function() {
2684
2879
  return handleError(function(arg0, arg1) {
2685
2880
  const ret = arg0.delete(arg1);
2686
2881
  return ret;
2687
2882
  }, arguments);
2688
2883
  };
2689
- imports.wbg.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
2884
+ imports.wbg.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
2690
2885
  const ret = arg0.done;
2691
2886
  return ret;
2692
2887
  };
2693
- imports.wbg.__wbg_error_443a583c581ba303 = function() {
2888
+ imports.wbg.__wbg_error_031686f9958973bd = function(arg0) {
2889
+ const ret = arg0.error;
2890
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2891
+ };
2892
+ imports.wbg.__wbg_error_118f1b830b6ccf22 = function() {
2694
2893
  return handleError(function(arg0) {
2695
2894
  const ret = arg0.error;
2696
2895
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2697
2896
  }, arguments);
2698
2897
  };
2898
+ imports.wbg.__wbg_error_4700bbeb78363714 = function(arg0, arg1) {
2899
+ console.error(arg0, arg1);
2900
+ };
2699
2901
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
2700
2902
  let deferred0_0;
2701
2903
  let deferred0_1;
@@ -2707,14 +2909,7 @@ function __wbg_get_imports() {
2707
2909
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2708
2910
  }
2709
2911
  };
2710
- imports.wbg.__wbg_error_93e9c80f4a42a374 = function(arg0, arg1) {
2711
- console.error(arg0, arg1);
2712
- };
2713
- imports.wbg.__wbg_error_cbb036e477c7f898 = function(arg0) {
2714
- const ret = arg0.error;
2715
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2716
- };
2717
- imports.wbg.__wbg_execute_35701d215506c919 = function() {
2912
+ imports.wbg.__wbg_execute_afd4bd321a189c50 = function() {
2718
2913
  return handleError(function(arg0, arg1) {
2719
2914
  const ret = arg0.execute(CoreCryptoContext.__wrap(arg1));
2720
2915
  return ret;
@@ -2732,19 +2927,19 @@ function __wbg_get_imports() {
2732
2927
  const ret = FfiWireE2EIdentity.__wrap(arg0);
2733
2928
  return ret;
2734
2929
  };
2735
- imports.wbg.__wbg_getAll_2a18c462536d7d5b = function() {
2930
+ imports.wbg.__wbg_getAll_2783028eb1814671 = function() {
2736
2931
  return handleError(function(arg0) {
2737
2932
  const ret = arg0.getAll();
2738
2933
  return ret;
2739
2934
  }, arguments);
2740
2935
  };
2741
- imports.wbg.__wbg_getAll_2e19a7bbbe1ec181 = function() {
2936
+ imports.wbg.__wbg_getAll_32ab1618e54bf9e5 = function() {
2742
2937
  return handleError(function(arg0, arg1, arg2) {
2743
2938
  const ret = arg0.getAll(arg1, arg2 >>> 0);
2744
2939
  return ret;
2745
2940
  }, arguments);
2746
2941
  };
2747
- imports.wbg.__wbg_getAll_7a5b8dd1d868e440 = function() {
2942
+ imports.wbg.__wbg_getAll_ff5bd24743b1031a = function() {
2748
2943
  return handleError(function(arg0, arg1) {
2749
2944
  const ret = arg0.getAll(arg1);
2750
2945
  return ret;
@@ -2760,38 +2955,38 @@ function __wbg_get_imports() {
2760
2955
  arg0.getRandomValues(arg1);
2761
2956
  }, arguments);
2762
2957
  };
2763
- imports.wbg.__wbg_getTime_5b1dd03bb6d4b784 = function(arg0) {
2958
+ imports.wbg.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
2764
2959
  const ret = arg0.getTime();
2765
2960
  return ret;
2766
2961
  };
2767
- imports.wbg.__wbg_get_27b4bcbec57323ca = function() {
2768
- return handleError(function(arg0, arg1) {
2769
- const ret = Reflect.get(arg0, arg1);
2770
- return ret;
2771
- }, arguments);
2772
- };
2773
- imports.wbg.__wbg_get_59c6316d15f9f1d0 = function(arg0, arg1) {
2962
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
2774
2963
  const ret = arg0[arg1 >>> 0];
2775
2964
  return ret;
2776
2965
  };
2777
- imports.wbg.__wbg_get_5cb5417d5a49cef1 = function() {
2966
+ imports.wbg.__wbg_get_1167dc45047c17fe = function(arg0, arg1, arg2) {
2967
+ const ret = arg1[arg2 >>> 0];
2968
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2969
+ var len1 = WASM_VECTOR_LEN;
2970
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2971
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2972
+ };
2973
+ imports.wbg.__wbg_get_1b2c33a63c4be73f = function() {
2778
2974
  return handleError(function(arg0, arg1) {
2779
2975
  const ret = arg0.get(arg1);
2780
2976
  return ret;
2781
2977
  }, arguments);
2782
2978
  };
2783
- imports.wbg.__wbg_get_a0f588b1e212306e = function() {
2979
+ imports.wbg.__wbg_get_3c4b098dc7bc7177 = function() {
2784
2980
  return handleError(function(arg0, arg1) {
2785
2981
  const ret = arg0.get(arg1);
2786
2982
  return ret;
2787
2983
  }, arguments);
2788
2984
  };
2789
- imports.wbg.__wbg_get_ff3a515076fdddd7 = function(arg0, arg1, arg2) {
2790
- const ret = arg1[arg2 >>> 0];
2791
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2792
- var len1 = WASM_VECTOR_LEN;
2793
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2794
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2985
+ imports.wbg.__wbg_get_458e874b43b18b25 = function() {
2986
+ return handleError(function(arg0, arg1) {
2987
+ const ret = Reflect.get(arg0, arg1);
2988
+ return ret;
2989
+ }, arguments);
2795
2990
  };
2796
2991
  imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
2797
2992
  const ret = arg0[arg1];
@@ -2801,17 +2996,17 @@ function __wbg_get_imports() {
2801
2996
  const ret = HistorySecret.__wrap(arg0);
2802
2997
  return ret;
2803
2998
  };
2804
- imports.wbg.__wbg_indexNames_b7e419e1b5950062 = function(arg0) {
2999
+ imports.wbg.__wbg_indexNames_c4e1ac3fa4f35161 = function(arg0) {
2805
3000
  const ret = arg0.indexNames;
2806
3001
  return ret;
2807
3002
  };
2808
- imports.wbg.__wbg_index_7f799b7efa7c11c6 = function() {
3003
+ imports.wbg.__wbg_index_cc440bc9f1ad368b = function() {
2809
3004
  return handleError(function(arg0, arg1, arg2) {
2810
3005
  const ret = arg0.index(getStringFromWasm0(arg1, arg2));
2811
3006
  return ret;
2812
3007
  }, arguments);
2813
3008
  };
2814
- imports.wbg.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
3009
+ imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
2815
3010
  let result;
2816
3011
  try {
2817
3012
  result = arg0 instanceof ArrayBuffer;
@@ -2821,7 +3016,7 @@ function __wbg_get_imports() {
2821
3016
  const ret = result;
2822
3017
  return ret;
2823
3018
  };
2824
- imports.wbg.__wbg_instanceof_IdbDatabase_48c551909b7652c5 = function(arg0) {
3019
+ imports.wbg.__wbg_instanceof_IdbDatabase_6e6efef94c4a355d = function(arg0) {
2825
3020
  let result;
2826
3021
  try {
2827
3022
  result = arg0 instanceof IDBDatabase;
@@ -2831,7 +3026,7 @@ function __wbg_get_imports() {
2831
3026
  const ret = result;
2832
3027
  return ret;
2833
3028
  };
2834
- imports.wbg.__wbg_instanceof_IdbFactory_e429f3e72d6a6d94 = function(arg0) {
3029
+ imports.wbg.__wbg_instanceof_IdbFactory_653c0aade11afa7c = function(arg0) {
2835
3030
  let result;
2836
3031
  try {
2837
3032
  result = arg0 instanceof IDBFactory;
@@ -2841,7 +3036,7 @@ function __wbg_get_imports() {
2841
3036
  const ret = result;
2842
3037
  return ret;
2843
3038
  };
2844
- imports.wbg.__wbg_instanceof_IdbOpenDbRequest_822b13f85bf6d91f = function(arg0) {
3039
+ imports.wbg.__wbg_instanceof_IdbOpenDbRequest_2be27facb05c6739 = function(arg0) {
2845
3040
  let result;
2846
3041
  try {
2847
3042
  result = arg0 instanceof IDBOpenDBRequest;
@@ -2851,7 +3046,7 @@ function __wbg_get_imports() {
2851
3046
  const ret = result;
2852
3047
  return ret;
2853
3048
  };
2854
- imports.wbg.__wbg_instanceof_IdbRequest_591f189bf6c335cc = function(arg0) {
3049
+ imports.wbg.__wbg_instanceof_IdbRequest_a4a68ff63181a915 = function(arg0) {
2855
3050
  let result;
2856
3051
  try {
2857
3052
  result = arg0 instanceof IDBRequest;
@@ -2861,7 +3056,7 @@ function __wbg_get_imports() {
2861
3056
  const ret = result;
2862
3057
  return ret;
2863
3058
  };
2864
- imports.wbg.__wbg_instanceof_IdbTransaction_7a1d07a52299c4f9 = function(arg0) {
3059
+ imports.wbg.__wbg_instanceof_IdbTransaction_b45e4045df14b84a = function(arg0) {
2865
3060
  let result;
2866
3061
  try {
2867
3062
  result = arg0 instanceof IDBTransaction;
@@ -2871,7 +3066,7 @@ function __wbg_get_imports() {
2871
3066
  const ret = result;
2872
3067
  return ret;
2873
3068
  };
2874
- imports.wbg.__wbg_instanceof_Promise_1147df2e75727145 = function(arg0) {
3069
+ imports.wbg.__wbg_instanceof_Promise_3ec9e849bf41bdb6 = function(arg0) {
2875
3070
  let result;
2876
3071
  try {
2877
3072
  result = arg0 instanceof Promise;
@@ -2881,7 +3076,7 @@ function __wbg_get_imports() {
2881
3076
  const ret = result;
2882
3077
  return ret;
2883
3078
  };
2884
- imports.wbg.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
3079
+ imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
2885
3080
  let result;
2886
3081
  try {
2887
3082
  result = arg0 instanceof Uint8Array;
@@ -2891,19 +3086,19 @@ function __wbg_get_imports() {
2891
3086
  const ret = result;
2892
3087
  return ret;
2893
3088
  };
2894
- imports.wbg.__wbg_isArray_bc2498eba6fcb71f = function(arg0) {
3089
+ imports.wbg.__wbg_isArray_030cce220591fb41 = function(arg0) {
2895
3090
  const ret = Array.isArray(arg0);
2896
3091
  return ret;
2897
3092
  };
2898
- imports.wbg.__wbg_isSafeInteger_6091d6e3ee1b65fd = function(arg0) {
3093
+ imports.wbg.__wbg_isSafeInteger_1c0d1af5542e102a = function(arg0) {
2899
3094
  const ret = Number.isSafeInteger(arg0);
2900
3095
  return ret;
2901
3096
  };
2902
- imports.wbg.__wbg_iterator_96378c3c9a17347c = function() {
3097
+ imports.wbg.__wbg_iterator_f370b34483c71a1c = function() {
2903
3098
  const ret = Symbol.iterator;
2904
3099
  return ret;
2905
3100
  };
2906
- imports.wbg.__wbg_keyPath_2635ad1da5c21128 = function() {
3101
+ imports.wbg.__wbg_keyPath_d301f5a3d841ece2 = function() {
2907
3102
  return handleError(function(arg0) {
2908
3103
  const ret = arg0.keyPath;
2909
3104
  return ret;
@@ -2917,19 +3112,19 @@ function __wbg_get_imports() {
2917
3112
  const ret = KeyPackage.__unwrap(arg0);
2918
3113
  return ret;
2919
3114
  };
2920
- imports.wbg.__wbg_length_1161036d400ff5c6 = function(arg0) {
3115
+ imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
2921
3116
  const ret = arg0.length;
2922
3117
  return ret;
2923
3118
  };
2924
- imports.wbg.__wbg_length_246fa1f85a0dea5b = function(arg0) {
3119
+ imports.wbg.__wbg_length_31ac538ef83e5e52 = function(arg0) {
2925
3120
  const ret = arg0.length;
2926
3121
  return ret;
2927
3122
  };
2928
- imports.wbg.__wbg_length_509e85b65e81fb66 = function(arg0) {
3123
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
2929
3124
  const ret = arg0.length;
2930
3125
  return ret;
2931
3126
  };
2932
- imports.wbg.__wbg_length_904c0910ed998bf3 = function(arg0) {
3127
+ imports.wbg.__wbg_length_afebfa9c2d66f7e4 = function(arg0) {
2933
3128
  const ret = arg0.length;
2934
3129
  return ret;
2935
3130
  };
@@ -2937,49 +3132,37 @@ function __wbg_get_imports() {
2937
3132
  const ret = arg0.msCrypto;
2938
3133
  return ret;
2939
3134
  };
2940
- imports.wbg.__wbg_multiEntry_a88b8b7336fb09ab = function(arg0) {
3135
+ imports.wbg.__wbg_multiEntry_4c5aa2196418a921 = function(arg0) {
2941
3136
  const ret = arg0.multiEntry;
2942
3137
  return ret;
2943
3138
  };
2944
- imports.wbg.__wbg_name_7ae31e7083231d42 = function(arg0, arg1) {
3139
+ imports.wbg.__wbg_name_fce5a6feaba74055 = function(arg0, arg1) {
2945
3140
  const ret = arg1.name;
2946
3141
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2947
3142
  const len1 = WASM_VECTOR_LEN;
2948
3143
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2949
3144
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2950
3145
  };
2951
- imports.wbg.__wbg_new0_85cc856927102294 = function() {
3146
+ imports.wbg.__wbg_new0_b0a0a38c201e6df5 = function() {
2952
3147
  const ret = new Date;
2953
3148
  return ret;
2954
3149
  };
2955
- imports.wbg.__wbg_new_1930cbb8d9ffc31b = function() {
3150
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
2956
3151
  const ret = new Object;
2957
3152
  return ret;
2958
3153
  };
2959
- imports.wbg.__wbg_new_56407f99198feff7 = function() {
2960
- const ret = new Map;
2961
- return ret;
2962
- };
2963
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
2964
- const ret = new Error;
2965
- return ret;
2966
- };
2967
- imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
2968
- const ret = new Uint8Array(arg0);
2969
- return ret;
2970
- };
2971
- imports.wbg.__wbg_new_97ddeb994a38bb69 = function(arg0, arg1) {
2972
- const ret = new Error(getStringFromWasm0(arg0, arg1));
3154
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
3155
+ const ret = new Array;
2973
3156
  return ret;
2974
3157
  };
2975
- imports.wbg.__wbg_new_d5e3800b120e37e1 = function(arg0, arg1) {
3158
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
2976
3159
  try {
2977
3160
  var state0 = { a: arg0, b: arg1 };
2978
3161
  var cb0 = (arg02, arg12) => {
2979
3162
  const a = state0.a;
2980
3163
  state0.a = 0;
2981
3164
  try {
2982
- return __wbg_adapter_503(a, state0.b, arg02, arg12);
3165
+ return __wbg_adapter_510(a, state0.b, arg02, arg12);
2983
3166
  } finally {
2984
3167
  state0.a = a;
2985
3168
  }
@@ -2990,8 +3173,20 @@ function __wbg_get_imports() {
2990
3173
  state0.a = state0.b = 0;
2991
3174
  }
2992
3175
  };
2993
- imports.wbg.__wbg_new_e969dc3f68d25093 = function() {
2994
- const ret = new Array;
3176
+ imports.wbg.__wbg_new_2ff1f68f3676ea53 = function() {
3177
+ const ret = new Map;
3178
+ return ret;
3179
+ };
3180
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
3181
+ const ret = new Uint8Array(arg0);
3182
+ return ret;
3183
+ };
3184
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
3185
+ const ret = new Error;
3186
+ return ret;
3187
+ };
3188
+ imports.wbg.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
3189
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2995
3190
  return ret;
2996
3191
  };
2997
3192
  imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
@@ -3002,59 +3197,59 @@ function __wbg_get_imports() {
3002
3197
  const ret = NewAcmeOrder.__wrap(arg0);
3003
3198
  return ret;
3004
3199
  };
3005
- imports.wbg.__wbg_newfromslice_d0d56929c6d9c842 = function(arg0, arg1) {
3200
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
3006
3201
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
3007
3202
  return ret;
3008
3203
  };
3009
- imports.wbg.__wbg_newnoargs_a81330f6e05d8aca = function(arg0, arg1) {
3204
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
3010
3205
  const ret = new Function(getStringFromWasm0(arg0, arg1));
3011
3206
  return ret;
3012
3207
  };
3013
- imports.wbg.__wbg_newwithlength_ed0ee6c1edca86fc = function(arg0) {
3208
+ imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
3014
3209
  const ret = new Uint8Array(arg0 >>> 0);
3015
3210
  return ret;
3016
3211
  };
3017
- imports.wbg.__wbg_next_2e6b37020ac5fe58 = function() {
3212
+ imports.wbg.__wbg_next_5b3530e612fde77d = function(arg0) {
3213
+ const ret = arg0.next;
3214
+ return ret;
3215
+ };
3216
+ imports.wbg.__wbg_next_692e82279131b03c = function() {
3018
3217
  return handleError(function(arg0) {
3019
3218
  const ret = arg0.next();
3020
3219
  return ret;
3021
3220
  }, arguments);
3022
3221
  };
3023
- imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
3024
- const ret = arg0.next;
3025
- return ret;
3026
- };
3027
3222
  imports.wbg.__wbg_node_02999533c4ea02e3 = function(arg0) {
3028
3223
  const ret = arg0.node;
3029
3224
  return ret;
3030
3225
  };
3031
- imports.wbg.__wbg_now_4feb08c548aa0974 = function() {
3226
+ imports.wbg.__wbg_now_1e80617bcee43265 = function() {
3032
3227
  const ret = Date.now();
3033
3228
  return ret;
3034
3229
  };
3035
- imports.wbg.__wbg_now_e3057dd824ca0191 = function() {
3230
+ imports.wbg.__wbg_now_4feb08c548aa0974 = function() {
3036
3231
  const ret = Date.now();
3037
3232
  return ret;
3038
3233
  };
3039
- imports.wbg.__wbg_objectStoreNames_9f871922c78ae388 = function(arg0) {
3234
+ imports.wbg.__wbg_objectStoreNames_31ac72154caf5a01 = function(arg0) {
3040
3235
  const ret = arg0.objectStoreNames;
3041
3236
  return ret;
3042
3237
  };
3043
- imports.wbg.__wbg_objectStore_4f9dafdbff77fd83 = function() {
3238
+ imports.wbg.__wbg_objectStore_b2a5b80b2e5c5f8b = function() {
3044
3239
  return handleError(function(arg0, arg1, arg2) {
3045
3240
  const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
3046
3241
  return ret;
3047
3242
  }, arguments);
3048
3243
  };
3049
- imports.wbg.__wbg_open_4ccfb9986e8733c9 = function() {
3050
- return handleError(function(arg0, arg1, arg2) {
3051
- const ret = arg0.open(getStringFromWasm0(arg1, arg2));
3244
+ imports.wbg.__wbg_open_7281831ed8ff7bd2 = function() {
3245
+ return handleError(function(arg0, arg1, arg2, arg3) {
3246
+ const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
3052
3247
  return ret;
3053
3248
  }, arguments);
3054
3249
  };
3055
- imports.wbg.__wbg_open_bf329a7c677f6eb3 = function() {
3056
- return handleError(function(arg0, arg1, arg2, arg3) {
3057
- const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
3250
+ imports.wbg.__wbg_open_f25e984ff3e90fbe = function() {
3251
+ return handleError(function(arg0, arg1, arg2) {
3252
+ const ret = arg0.open(getStringFromWasm0(arg1, arg2));
3058
3253
  return ret;
3059
3254
  }, arguments);
3060
3255
  };
@@ -3066,32 +3261,32 @@ function __wbg_get_imports() {
3066
3261
  const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
3067
3262
  return ret;
3068
3263
  };
3069
- imports.wbg.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
3264
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
3070
3265
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
3071
3266
  };
3072
- imports.wbg.__wbg_push_cd3ac7d5b094565d = function(arg0, arg1) {
3267
+ imports.wbg.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
3073
3268
  const ret = arg0.push(arg1);
3074
3269
  return ret;
3075
3270
  };
3076
- imports.wbg.__wbg_put_26029bce45af287b = function() {
3271
+ imports.wbg.__wbg_put_cdfadd5d7f714201 = function() {
3077
3272
  return handleError(function(arg0, arg1, arg2) {
3078
3273
  const ret = arg0.put(arg1, arg2);
3079
3274
  return ret;
3080
3275
  }, arguments);
3081
3276
  };
3082
- imports.wbg.__wbg_put_adbbd8f247db7544 = function() {
3277
+ imports.wbg.__wbg_put_f777be76774b073e = function() {
3083
3278
  return handleError(function(arg0, arg1) {
3084
3279
  const ret = arg0.put(arg1);
3085
3280
  return ret;
3086
3281
  }, arguments);
3087
3282
  };
3088
- imports.wbg.__wbg_queueMicrotask_bcc6e26d899696db = function(arg0) {
3283
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
3284
+ queueMicrotask(arg0);
3285
+ };
3286
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
3089
3287
  const ret = arg0.queueMicrotask;
3090
3288
  return ret;
3091
3289
  };
3092
- imports.wbg.__wbg_queueMicrotask_f24a794d09c42640 = function(arg0) {
3093
- queueMicrotask(arg0);
3094
- };
3095
3290
  imports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() {
3096
3291
  return handleError(function(arg0, arg1) {
3097
3292
  arg0.randomFillSync(arg1);
@@ -3103,11 +3298,11 @@ function __wbg_get_imports() {
3103
3298
  return ret;
3104
3299
  }, arguments);
3105
3300
  };
3106
- imports.wbg.__wbg_resolve_5775c0ef9222f556 = function(arg0) {
3301
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
3107
3302
  const ret = Promise.resolve(arg0);
3108
3303
  return ret;
3109
3304
  };
3110
- imports.wbg.__wbg_result_b30a0a7bc6b6345f = function() {
3305
+ imports.wbg.__wbg_result_825a6aeeb31189d2 = function() {
3111
3306
  return handleError(function(arg0) {
3112
3307
  const ret = arg0.result;
3113
3308
  return ret;
@@ -3117,53 +3312,59 @@ function __wbg_get_imports() {
3117
3312
  const ret = SecretKey.__wrap(arg0);
3118
3313
  return ret;
3119
3314
  };
3120
- imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
3121
- const ret = arg0.set(arg1, arg2);
3122
- return ret;
3123
- };
3124
3315
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
3125
3316
  arg0[arg1] = arg2;
3126
3317
  };
3127
- imports.wbg.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
3318
+ imports.wbg.__wbg_set_453345bcda80b89a = function() {
3319
+ return handleError(function(arg0, arg1, arg2) {
3320
+ const ret = Reflect.set(arg0, arg1, arg2);
3321
+ return ret;
3322
+ }, arguments);
3323
+ };
3324
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
3128
3325
  arg0[arg1 >>> 0] = arg2;
3129
3326
  };
3130
- imports.wbg.__wbg_setautoincrement_5ae17c87fe2d4f9b = function(arg0, arg1) {
3327
+ imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
3328
+ const ret = arg0.set(arg1, arg2);
3329
+ return ret;
3330
+ };
3331
+ imports.wbg.__wbg_setautoincrement_50a19db9199c2ec6 = function(arg0, arg1) {
3131
3332
  arg0.autoIncrement = arg1 !== 0;
3132
3333
  };
3133
- imports.wbg.__wbg_setcause_b0108db2f5bad08c = function(arg0, arg1) {
3334
+ imports.wbg.__wbg_setcause_b436bba24efd40ba = function(arg0, arg1) {
3134
3335
  arg0.cause = arg1;
3135
3336
  };
3136
- imports.wbg.__wbg_setkeypath_8d8c800a95646c4d = function(arg0, arg1) {
3337
+ imports.wbg.__wbg_setkeypath_3a5536ae3a5f612c = function(arg0, arg1) {
3137
3338
  arg0.keyPath = arg1;
3138
3339
  };
3139
- imports.wbg.__wbg_setmultientry_2d965bfbe831d349 = function(arg0, arg1) {
3340
+ imports.wbg.__wbg_setmultientry_7e7416b8acaeb4d0 = function(arg0, arg1) {
3140
3341
  arg0.multiEntry = arg1 !== 0;
3141
3342
  };
3142
- imports.wbg.__wbg_setname_b226a825d1533eb4 = function(arg0, arg1, arg2) {
3343
+ imports.wbg.__wbg_setname_832b43d4602cb930 = function(arg0, arg1, arg2) {
3143
3344
  arg0.name = getStringFromWasm0(arg1, arg2);
3144
3345
  };
3145
- imports.wbg.__wbg_setonabort_2b64fe553e1f30a5 = function(arg0, arg1) {
3346
+ imports.wbg.__wbg_setonabort_4edac498cf4576fe = function(arg0, arg1) {
3146
3347
  arg0.onabort = arg1;
3147
3348
  };
3148
- imports.wbg.__wbg_setoncomplete_2dee9e6e91eb390c = function(arg0, arg1) {
3349
+ imports.wbg.__wbg_setoncomplete_8a32ad2d1ca4f49b = function(arg0, arg1) {
3149
3350
  arg0.oncomplete = arg1;
3150
3351
  };
3151
- imports.wbg.__wbg_setonerror_1c09126416a8732a = function(arg0, arg1) {
3352
+ imports.wbg.__wbg_setonerror_4b0c685c365f600d = function(arg0, arg1) {
3152
3353
  arg0.onerror = arg1;
3153
3354
  };
3154
- imports.wbg.__wbg_setonerror_d12d470adff34fe2 = function(arg0, arg1) {
3355
+ imports.wbg.__wbg_setonerror_bcdbd7f3921ffb1f = function(arg0, arg1) {
3155
3356
  arg0.onerror = arg1;
3156
3357
  };
3157
- imports.wbg.__wbg_setonsuccess_81a109828a9b7d7c = function(arg0, arg1) {
3358
+ imports.wbg.__wbg_setonsuccess_ffb2ddb27ce681d8 = function(arg0, arg1) {
3158
3359
  arg0.onsuccess = arg1;
3159
3360
  };
3160
- imports.wbg.__wbg_setonupgradeneeded_41c59fde839b5142 = function(arg0, arg1) {
3361
+ imports.wbg.__wbg_setonupgradeneeded_4e32d1c6a08c4257 = function(arg0, arg1) {
3161
3362
  arg0.onupgradeneeded = arg1;
3162
3363
  };
3163
- imports.wbg.__wbg_setonversionchange_6d4cf4b5eafafccc = function(arg0, arg1) {
3364
+ imports.wbg.__wbg_setonversionchange_3d3385e00121e4b2 = function(arg0, arg1) {
3164
3365
  arg0.onversionchange = arg1;
3165
3366
  };
3166
- imports.wbg.__wbg_setunique_bccba0d1ccd21f16 = function(arg0, arg1) {
3367
+ imports.wbg.__wbg_setunique_a562a12b425d2be8 = function(arg0, arg1) {
3167
3368
  arg0.unique = arg1 !== 0;
3168
3369
  };
3169
3370
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
@@ -3173,61 +3374,67 @@ function __wbg_get_imports() {
3173
3374
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3174
3375
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3175
3376
  };
3176
- imports.wbg.__wbg_static_accessor_GLOBAL_1f13249cc3acc96d = function() {
3377
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
3177
3378
  const ret = typeof global === "undefined" ? null : global;
3178
3379
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3179
3380
  };
3180
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_df7ae94b1e0ed6a3 = function() {
3381
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
3181
3382
  const ret = typeof globalThis === "undefined" ? null : globalThis;
3182
3383
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3183
3384
  };
3184
- imports.wbg.__wbg_static_accessor_SELF_6265471db3b3c228 = function() {
3385
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
3185
3386
  const ret = typeof self === "undefined" ? null : self;
3186
3387
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3187
3388
  };
3188
- imports.wbg.__wbg_static_accessor_WINDOW_16fb482f8ec52863 = function() {
3389
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
3189
3390
  const ret = typeof window === "undefined" ? null : window;
3190
3391
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3191
3392
  };
3192
- imports.wbg.__wbg_subarray_a219824899e59712 = function(arg0, arg1, arg2) {
3393
+ imports.wbg.__wbg_stringify_b98c93d0a190446a = function() {
3394
+ return handleError(function(arg0) {
3395
+ const ret = JSON.stringify(arg0);
3396
+ return ret;
3397
+ }, arguments);
3398
+ };
3399
+ imports.wbg.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
3193
3400
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
3194
3401
  return ret;
3195
3402
  };
3196
- imports.wbg.__wbg_target_bfb4281bfa013115 = function(arg0) {
3403
+ imports.wbg.__wbg_target_f2c963b447be6283 = function(arg0) {
3197
3404
  const ret = arg0.target;
3198
3405
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3199
3406
  };
3200
- imports.wbg.__wbg_then_8d2fcccde5380a03 = function(arg0, arg1, arg2) {
3407
+ imports.wbg.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
3201
3408
  const ret = arg0.then(arg1, arg2);
3202
3409
  return ret;
3203
3410
  };
3204
- imports.wbg.__wbg_then_9cc266be2bf537b6 = function(arg0, arg1) {
3411
+ imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
3205
3412
  const ret = arg0.then(arg1);
3206
3413
  return ret;
3207
3414
  };
3208
- imports.wbg.__wbg_toString_1144ec2f872e8cf3 = function(arg0) {
3415
+ imports.wbg.__wbg_toString_78df35411a4fd40c = function(arg0) {
3209
3416
  const ret = arg0.toString();
3210
3417
  return ret;
3211
3418
  };
3212
- imports.wbg.__wbg_transaction_8267254fd462a1bb = function(arg0) {
3419
+ imports.wbg.__wbg_transaction_42140e08ae7013b5 = function(arg0) {
3213
3420
  const ret = arg0.transaction;
3214
3421
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3215
3422
  };
3216
- imports.wbg.__wbg_transaction_fca796495943f7a5 = function() {
3423
+ imports.wbg.__wbg_transaction_e94a54f60797ce82 = function() {
3217
3424
  return handleError(function(arg0, arg1, arg2) {
3218
3425
  const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]);
3219
3426
  return ret;
3220
3427
  }, arguments);
3221
3428
  };
3222
- imports.wbg.__wbg_unique_2ffe24c606d8bfd2 = function(arg0) {
3429
+ imports.wbg.__wbg_unique_aaacd391eee88edb = function(arg0) {
3223
3430
  const ret = arg0.unique;
3224
3431
  return ret;
3225
3432
  };
3226
- imports.wbg.__wbg_value_09d0b4eaab48b91d = function(arg0) {
3433
+ imports.wbg.__wbg_value_dd9372230531eade = function(arg0) {
3227
3434
  const ret = arg0.value;
3228
3435
  return ret;
3229
3436
  };
3230
- imports.wbg.__wbg_version_f122dce1918b76ee = function(arg0) {
3437
+ imports.wbg.__wbg_version_36bb3ddd830c5504 = function(arg0) {
3231
3438
  const ret = arg0.version;
3232
3439
  return ret;
3233
3440
  };
@@ -3235,18 +3442,18 @@ function __wbg_get_imports() {
3235
3442
  const ret = arg0.versions;
3236
3443
  return ret;
3237
3444
  };
3238
- imports.wbg.__wbg_wbindgenbigintgetasi64_7637cb1a7fb9a81e = function(arg0, arg1) {
3445
+ imports.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1 = function(arg0, arg1) {
3239
3446
  const v = arg1;
3240
3447
  const ret = typeof v === "bigint" ? v : undefined;
3241
3448
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
3242
3449
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
3243
3450
  };
3244
- imports.wbg.__wbg_wbindgenbooleanget_59f830b1a70d2530 = function(arg0) {
3451
+ imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
3245
3452
  const v = arg0;
3246
3453
  const ret = typeof v === "boolean" ? v : undefined;
3247
3454
  return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
3248
3455
  };
3249
- imports.wbg.__wbg_wbindgencbdrop_a85ed476c6a370b9 = function(arg0) {
3456
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
3250
3457
  const obj = arg0.original;
3251
3458
  if (obj.cnt-- == 1) {
3252
3459
  obj.a = 0;
@@ -3255,57 +3462,57 @@ function __wbg_get_imports() {
3255
3462
  const ret = false;
3256
3463
  return ret;
3257
3464
  };
3258
- imports.wbg.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
3465
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
3259
3466
  const ret = debugString(arg1);
3260
3467
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3261
3468
  const len1 = WASM_VECTOR_LEN;
3262
3469
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3263
3470
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3264
3471
  };
3265
- imports.wbg.__wbg_wbindgenin_192b210aa1c401e9 = function(arg0, arg1) {
3472
+ imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
3266
3473
  const ret = arg0 in arg1;
3267
3474
  return ret;
3268
3475
  };
3269
- imports.wbg.__wbg_wbindgenisbigint_7d76a1ca6454e439 = function(arg0) {
3476
+ imports.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154 = function(arg0) {
3270
3477
  const ret = typeof arg0 === "bigint";
3271
3478
  return ret;
3272
3479
  };
3273
- imports.wbg.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
3480
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
3274
3481
  const ret = typeof arg0 === "function";
3275
3482
  return ret;
3276
3483
  };
3277
- imports.wbg.__wbg_wbindgenisnull_e1388bbe88158c3f = function(arg0) {
3484
+ imports.wbg.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
3278
3485
  const ret = arg0 === null;
3279
3486
  return ret;
3280
3487
  };
3281
- imports.wbg.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
3488
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
3282
3489
  const val = arg0;
3283
3490
  const ret = typeof val === "object" && val !== null;
3284
3491
  return ret;
3285
3492
  };
3286
- imports.wbg.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
3493
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
3287
3494
  const ret = typeof arg0 === "string";
3288
3495
  return ret;
3289
3496
  };
3290
- imports.wbg.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
3497
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
3291
3498
  const ret = arg0 === undefined;
3292
3499
  return ret;
3293
3500
  };
3294
- imports.wbg.__wbg_wbindgenjsvaleq_f27272c0a890df7f = function(arg0, arg1) {
3501
+ imports.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58 = function(arg0, arg1) {
3295
3502
  const ret = arg0 === arg1;
3296
3503
  return ret;
3297
3504
  };
3298
- imports.wbg.__wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c = function(arg0, arg1) {
3505
+ imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
3299
3506
  const ret = arg0 == arg1;
3300
3507
  return ret;
3301
3508
  };
3302
- imports.wbg.__wbg_wbindgennumberget_d855f947247a3fbc = function(arg0, arg1) {
3509
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
3303
3510
  const obj = arg1;
3304
3511
  const ret = typeof obj === "number" ? obj : undefined;
3305
3512
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
3306
3513
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
3307
3514
  };
3308
- imports.wbg.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
3515
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
3309
3516
  const obj = arg1;
3310
3517
  const ret = typeof obj === "string" ? obj : undefined;
3311
3518
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -3313,10 +3520,10 @@ function __wbg_get_imports() {
3313
3520
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3314
3521
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3315
3522
  };
3316
- imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
3523
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
3317
3524
  throw new Error(getStringFromWasm0(arg0, arg1));
3318
3525
  };
3319
- imports.wbg.__wbg_wbindgentryintonumber_c9e75d941453b6d7 = function(arg0) {
3526
+ imports.wbg.__wbg_wbindgentryintonumber_aef53fe1d23c5fd4 = function(arg0) {
3320
3527
  let result;
3321
3528
  try {
3322
3529
  result = +arg0;
@@ -3334,6 +3541,10 @@ function __wbg_get_imports() {
3334
3541
  const ret = WireIdentity.__wrap(arg0);
3335
3542
  return ret;
3336
3543
  };
3544
+ imports.wbg.__wbindgen_cast_1ead7d7e37c24a99 = function(arg0, arg1) {
3545
+ const ret = makeMutClosure(arg0, arg1, 2898, __wbg_adapter_11);
3546
+ return ret;
3547
+ };
3337
3548
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
3338
3549
  const ret = getStringFromWasm0(arg0, arg1);
3339
3550
  return ret;
@@ -3360,8 +3571,8 @@ function __wbg_get_imports() {
3360
3571
  const ret = v0;
3361
3572
  return ret;
3362
3573
  };
3363
- imports.wbg.__wbindgen_cast_48fe37b70e8c9887 = function(arg0, arg1) {
3364
- const ret = makeMutClosure(arg0, arg1, 2895, __wbg_adapter_16);
3574
+ imports.wbg.__wbindgen_cast_63e1f1d269ff3fa8 = function(arg0, arg1) {
3575
+ const ret = makeMutClosure(arg0, arg1, 2586, __wbg_adapter_6);
3365
3576
  return ret;
3366
3577
  };
3367
3578
  imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
@@ -3370,12 +3581,8 @@ function __wbg_get_imports() {
3370
3581
  const ret = v0;
3371
3582
  return ret;
3372
3583
  };
3373
- imports.wbg.__wbindgen_cast_94027e6796063b55 = function(arg0, arg1) {
3374
- const ret = makeMutClosure(arg0, arg1, 2585, __wbg_adapter_23);
3375
- return ret;
3376
- };
3377
- imports.wbg.__wbindgen_cast_9fc7a20c1c18f267 = function(arg0, arg1) {
3378
- const ret = makeMutClosure(arg0, arg1, 1018, __wbg_adapter_30);
3584
+ imports.wbg.__wbindgen_cast_9b175b9f4d06c9c3 = function(arg0, arg1) {
3585
+ const ret = makeMutClosure(arg0, arg1, 1020, __wbg_adapter_18);
3379
3586
  return ret;
3380
3587
  };
3381
3588
  imports.wbg.__wbindgen_cast_b77aa29fa8fe8560 = function(arg0, arg1) {
@@ -4071,7 +4278,30 @@ export {
4071
4278
  updateDatabaseKey,
4072
4279
  setMaxLogLevel,
4073
4280
  setLogger,
4281
+ openDatabase,
4074
4282
  migrateDatabaseKeyTypeToBytes,
4283
+ isTransactionFailedError,
4284
+ isProteusSessionNotFoundError,
4285
+ isProteusRemoteIdentityChangedError,
4286
+ isProteusOtherError,
4287
+ isProteusError,
4288
+ isProteusDuplicateMessageError,
4289
+ isOtherError,
4290
+ isMlsWrongEpochError,
4291
+ isMlsUnmergedPendingGroupError,
4292
+ isMlsStaleProposalError,
4293
+ isMlsStaleCommitError,
4294
+ isMlsSelfCommitIgnoredError,
4295
+ isMlsOtherError,
4296
+ isMlsOrphanWelcomeError,
4297
+ isMlsMessageRejectedError,
4298
+ isMlsError,
4299
+ isMlsDuplicateMessageError,
4300
+ isMlsConversationAlreadyExistsError,
4301
+ isMlsBufferedFutureMessageError,
4302
+ isMlsBufferedCommitError,
4303
+ isE2eiError,
4304
+ isCcError,
4075
4305
  initWasmModule,
4076
4306
  ciphersuiteFromU16,
4077
4307
  ciphersuiteDefault,
@@ -4083,16 +4313,20 @@ export {
4083
4313
  Welcome,
4084
4314
  SecretKey,
4085
4315
  MlsRatchetTreeType as RatchetTreeType,
4316
+ ProteusErrorType,
4086
4317
  NewAcmeOrder,
4087
4318
  NewAcmeAuthz,
4088
4319
  MlsTransportData,
4320
+ MlsErrorType,
4089
4321
  MlsGroupInfoEncryptionType as GroupInfoEncryptionType,
4090
4322
  GroupInfo,
4091
4323
  ExternalSenderKey,
4324
+ ErrorType,
4092
4325
  E2eiEnrollment,
4093
4326
  E2eiConversationState2 as E2eiConversationState,
4094
4327
  DeviceStatus,
4095
4328
  DatabaseKey,
4329
+ Database,
4096
4330
  CustomConfiguration,
4097
4331
  CredentialType,
4098
4332
  CoreCryptoLogLevel2 as CoreCryptoLogLevel,