@keyhive/keyhive 0.0.0-alpha.2 → 0.0.0-alpha.20

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/README.md CHANGED
@@ -3,12 +3,7 @@
3
3
  ## Build package
4
4
 
5
5
  ```
6
- wasm-pack build --target web --out-dir pkg -- --features web-sys
7
- ```
8
-
9
- To build with the `ingest_static` feature:
10
- ```
11
- wasm-pack build --target web --out-dir pkg -- --features web-sys,ingest_static
6
+ pnpm install && pnpm build
12
7
  ```
13
8
 
14
9
  ## Run tests
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyhive/keyhive",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.0-alpha.20",
4
4
  "description": "",
5
5
  "main": "pkg/keyhive_wasm.js",
6
6
  "keywords": [],
@@ -32,13 +32,14 @@
32
32
  "./keyhive_wasm.wasm": "./pkg-slim/keyhive_wasm_bg.wasm",
33
33
  "./keyhive_wasm.base64.js": {
34
34
  "import": "./pkg-slim/keyhive_wasm_bg.wasm.base64.js",
35
- "type": "./pkg-slim/keyhive_wasm_bg.wasm.base64.d.ts"
35
+ "types": "./pkg-slim/keyhive_wasm_bg.wasm.base64.d.ts"
36
36
  }
37
37
  },
38
38
  "devDependencies": {
39
39
  "@playwright/test": "^1.55.0",
40
40
  "@types/node": "^22.17.2",
41
41
  "html-webpack-plugin": "^5.6.4",
42
+ "http-server": "^14.1.1",
42
43
  "ts-loader": "^9.5.2",
43
44
  "typescript": "^5.9.2",
44
45
  "vite": "^5.4.19",
@@ -52,6 +53,7 @@
52
53
  "build": "pnpm run build-node && pnpm run build-bundler && pnpm run build-slim",
53
54
  "build-node": "wasm-pack build --out-dir pkg-node --target nodejs --release -- --features ingest_static",
54
55
  "build-bundler": "wasm-pack build --out-dir pkg --target bundler --release -- --features ingest_static",
56
+ "build-web": "wasm-pack build --out-dir pkg-web --target web --release -- --features ingest_static",
55
57
  "build-slim": "node build_slim.js"
56
58
  }
57
59
  }
package/pkg/README.md CHANGED
@@ -3,12 +3,7 @@
3
3
  ## Build package
4
4
 
5
5
  ```
6
- wasm-pack build --target web --out-dir pkg -- --features web-sys
7
- ```
8
-
9
- To build with the `ingest_static` feature:
10
- ```
11
- wasm-pack build --target web --out-dir pkg -- --features web-sys,ingest_static
6
+ pnpm install && pnpm build
12
7
  ```
13
8
 
14
9
  ## Run tests
@@ -112,6 +112,7 @@ export class Document {
112
112
  [Symbol.dispose](): void;
113
113
  toPeer(): Peer;
114
114
  toAgent(): Agent;
115
+ toMembered(): Membered;
115
116
  readonly id: Identifier;
116
117
  readonly doc_id: DocumentId;
117
118
  }
@@ -119,7 +120,7 @@ export class DocumentId {
119
120
  free(): void;
120
121
  [Symbol.dispose](): void;
121
122
  constructor(bytes: Uint8Array);
122
- fromString(): string;
123
+ toString(): string;
123
124
  toJsValue(): any;
124
125
  toBytes(): Uint8Array;
125
126
  }
@@ -261,7 +262,8 @@ export class Keyhive {
261
262
  contactCard(): Promise<ContactCard>;
262
263
  receiveContactCard(contact_card: ContactCard): Individual;
263
264
  getAgent(id: Identifier): Agent | undefined;
264
- getGroup(id: Identifier): Group | undefined;
265
+ getGroup(id: GroupId): Group | undefined;
266
+ getDocument(id: DocumentId): Document | undefined;
265
267
  docMemberCapabilities(doc_id: DocumentId): SimpleCapability[];
266
268
  accessForDoc(id: Identifier, doc_id: DocumentId): Access | undefined;
267
269
  intoArchive(): Archive;
@@ -269,6 +271,7 @@ export class Keyhive {
269
271
  ingestArchive(archive: Archive): Promise<void>;
270
272
  readonly id: IndividualId;
271
273
  readonly whoami: IndividualId;
274
+ readonly individual: Individual;
272
275
  readonly idString: string;
273
276
  }
274
277
  export class Membered {
@@ -186,11 +186,22 @@ function debugString(val) {
186
186
  return className;
187
187
  }
188
188
 
189
+ function getArrayJsValueFromWasm0(ptr, len) {
190
+ ptr = ptr >>> 0;
191
+ const mem = getDataViewMemory0();
192
+ const result = [];
193
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
194
+ result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
195
+ }
196
+ wasm.__externref_drop_slice(ptr, len);
197
+ return result;
198
+ }
199
+
189
200
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
190
201
  ? { register: () => {}, unregister: () => {} }
191
202
  : new FinalizationRegistry(
192
203
  state => {
193
- wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
204
+ wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b);
194
205
  }
195
206
  );
196
207
 
@@ -208,7 +219,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
208
219
  return f(a, state.b, ...args);
209
220
  } finally {
210
221
  if (--state.cnt === 0) {
211
- wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
222
+ wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
212
223
  CLOSURE_DTORS.unregister(state);
213
224
  } else {
214
225
  state.a = a;
@@ -220,15 +231,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
220
231
  return real;
221
232
  }
222
233
 
223
- function getArrayJsValueFromWasm0(ptr, len) {
224
- ptr = ptr >>> 0;
225
- const mem = getDataViewMemory0();
226
- const result = [];
227
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
228
- result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
234
+ function _assertClass(instance, klass) {
235
+ if (!(instance instanceof klass)) {
236
+ throw new Error(`expected instance of ${klass.name}`);
229
237
  }
230
- wasm.__externref_drop_slice(ptr, len);
231
- return result;
238
+ }
239
+
240
+ function passArrayJsValueToWasm0(array, malloc) {
241
+ const ptr = malloc(array.length * 4, 4) >>> 0;
242
+ for (let i = 0; i < array.length; i++) {
243
+ const add = addToExternrefTable0(array[i]);
244
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
245
+ }
246
+ WASM_VECTOR_LEN = array.length;
247
+ return ptr;
232
248
  }
233
249
 
234
250
  function passArray8ToWasm0(arg, malloc) {
@@ -243,12 +259,6 @@ function takeFromExternrefTable0(idx) {
243
259
  wasm.__externref_table_dealloc(idx);
244
260
  return value;
245
261
  }
246
-
247
- function _assertClass(instance, klass) {
248
- if (!(instance instanceof klass)) {
249
- throw new Error(`expected instance of ${klass.name}`);
250
- }
251
- }
252
262
  /**
253
263
  * Panic hook lets us get better error messages if our Rust code ever panics.
254
264
  *
@@ -259,21 +269,12 @@ export function setPanicHook() {
259
269
  wasm.setPanicHook();
260
270
  }
261
271
 
262
- function passArrayJsValueToWasm0(array, malloc) {
263
- const ptr = malloc(array.length * 4, 4) >>> 0;
264
- for (let i = 0; i < array.length; i++) {
265
- const add = addToExternrefTable0(array[i]);
266
- getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
267
- }
268
- WASM_VECTOR_LEN = array.length;
269
- return ptr;
270
- }
271
- function __wbg_adapter_12(arg0, arg1, arg2) {
272
- wasm.closure423_externref_shim(arg0, arg1, arg2);
272
+ function __wbg_adapter_8(arg0, arg1, arg2) {
273
+ wasm.closure495_externref_shim(arg0, arg1, arg2);
273
274
  }
274
275
 
275
- function __wbg_adapter_272(arg0, arg1, arg2, arg3) {
276
- wasm.closure571_externref_shim(arg0, arg1, arg2, arg3);
276
+ function __wbg_adapter_269(arg0, arg1, arg2, arg3) {
277
+ wasm.closure652_externref_shim(arg0, arg1, arg2, arg3);
277
278
  }
278
279
 
279
280
  const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -335,14 +336,6 @@ const AddMemberErrorFinalization = (typeof FinalizationRegistry === 'undefined')
335
336
 
336
337
  export class AddMemberError {
337
338
 
338
- static __wrap(ptr) {
339
- ptr = ptr >>> 0;
340
- const obj = Object.create(AddMemberError.prototype);
341
- obj.__wbg_ptr = ptr;
342
- AddMemberErrorFinalization.register(obj, obj.__wbg_ptr, obj);
343
- return obj;
344
- }
345
-
346
339
  __destroy_into_raw() {
347
340
  const ptr = this.__wbg_ptr;
348
341
  this.__wbg_ptr = 0;
@@ -1049,6 +1042,13 @@ export class Document {
1049
1042
  const ret = wasm.document_toAgent(this.__wbg_ptr);
1050
1043
  return Agent.__wrap(ret);
1051
1044
  }
1045
+ /**
1046
+ * @returns {Membered}
1047
+ */
1048
+ toMembered() {
1049
+ const ret = wasm.document_toMembered(this.__wbg_ptr);
1050
+ return Membered.__wrap(ret);
1051
+ }
1052
1052
  }
1053
1053
  if (Symbol.dispose) Document.prototype[Symbol.dispose] = Document.prototype.free;
1054
1054
 
@@ -1094,11 +1094,11 @@ export class DocumentId {
1094
1094
  /**
1095
1095
  * @returns {string}
1096
1096
  */
1097
- fromString() {
1097
+ toString() {
1098
1098
  let deferred1_0;
1099
1099
  let deferred1_1;
1100
1100
  try {
1101
- const ret = wasm.documentid_fromString(this.__wbg_ptr);
1101
+ const ret = wasm.documentid_toString(this.__wbg_ptr);
1102
1102
  deferred1_0 = ret[0];
1103
1103
  deferred1_1 = ret[1];
1104
1104
  return getStringFromWasm0(ret[0], ret[1]);
@@ -1326,14 +1326,6 @@ const GenerateDocErrorFinalization = (typeof FinalizationRegistry === 'undefined
1326
1326
 
1327
1327
  export class GenerateDocError {
1328
1328
 
1329
- static __wrap(ptr) {
1330
- ptr = ptr >>> 0;
1331
- const obj = Object.create(GenerateDocError.prototype);
1332
- obj.__wbg_ptr = ptr;
1333
- GenerateDocErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1334
- return obj;
1335
- }
1336
-
1337
1329
  __destroy_into_raw() {
1338
1330
  const ptr = this.__wbg_ptr;
1339
1331
  this.__wbg_ptr = 0;
@@ -1791,14 +1783,6 @@ const JsDecryptErrorFinalization = (typeof FinalizationRegistry === 'undefined')
1791
1783
 
1792
1784
  export class JsDecryptError {
1793
1785
 
1794
- static __wrap(ptr) {
1795
- ptr = ptr >>> 0;
1796
- const obj = Object.create(JsDecryptError.prototype);
1797
- obj.__wbg_ptr = ptr;
1798
- JsDecryptErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1799
- return obj;
1800
- }
1801
-
1802
1786
  __destroy_into_raw() {
1803
1787
  const ptr = this.__wbg_ptr;
1804
1788
  this.__wbg_ptr = 0;
@@ -1819,14 +1803,6 @@ const JsEncryptErrorFinalization = (typeof FinalizationRegistry === 'undefined')
1819
1803
 
1820
1804
  export class JsEncryptError {
1821
1805
 
1822
- static __wrap(ptr) {
1823
- ptr = ptr >>> 0;
1824
- const obj = Object.create(JsEncryptError.prototype);
1825
- obj.__wbg_ptr = ptr;
1826
- JsEncryptErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1827
- return obj;
1828
- }
1829
-
1830
1806
  __destroy_into_raw() {
1831
1807
  const ptr = this.__wbg_ptr;
1832
1808
  this.__wbg_ptr = 0;
@@ -1847,14 +1823,6 @@ const JsReceivePreKeyOpErrorFinalization = (typeof FinalizationRegistry === 'und
1847
1823
 
1848
1824
  export class JsReceivePreKeyOpError {
1849
1825
 
1850
- static __wrap(ptr) {
1851
- ptr = ptr >>> 0;
1852
- const obj = Object.create(JsReceivePreKeyOpError.prototype);
1853
- obj.__wbg_ptr = ptr;
1854
- JsReceivePreKeyOpErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1855
- return obj;
1856
- }
1857
-
1858
1826
  __destroy_into_raw() {
1859
1827
  const ptr = this.__wbg_ptr;
1860
1828
  this.__wbg_ptr = 0;
@@ -1949,6 +1917,13 @@ export class Keyhive {
1949
1917
  const ret = wasm.keyhive_id(this.__wbg_ptr);
1950
1918
  return IndividualId.__wrap(ret);
1951
1919
  }
1920
+ /**
1921
+ * @returns {Individual}
1922
+ */
1923
+ get individual() {
1924
+ const ret = wasm.keyhive_individual(this.__wbg_ptr);
1925
+ return Individual.__wrap(ret);
1926
+ }
1952
1927
  /**
1953
1928
  * @returns {string}
1954
1929
  */
@@ -2009,14 +1984,13 @@ export class Keyhive {
2009
1984
  */
2010
1985
  tryEncrypt(doc, content_ref, pred_refs, content) {
2011
1986
  _assertClass(doc, Document);
2012
- var ptr0 = doc.__destroy_into_raw();
2013
1987
  _assertClass(content_ref, ChangeRef);
2014
- var ptr1 = content_ref.__destroy_into_raw();
2015
- const ptr2 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
1988
+ var ptr0 = content_ref.__destroy_into_raw();
1989
+ const ptr1 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
1990
+ const len1 = WASM_VECTOR_LEN;
1991
+ const ptr2 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
2016
1992
  const len2 = WASM_VECTOR_LEN;
2017
- const ptr3 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
2018
- const len3 = WASM_VECTOR_LEN;
2019
- const ret = wasm.keyhive_tryEncrypt(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3);
1993
+ const ret = wasm.keyhive_tryEncrypt(this.__wbg_ptr, doc.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2);
2020
1994
  return ret;
2021
1995
  }
2022
1996
  /**
@@ -2028,14 +2002,13 @@ export class Keyhive {
2028
2002
  */
2029
2003
  tryEncryptArchive(doc, content_ref, pred_refs, content) {
2030
2004
  _assertClass(doc, Document);
2031
- var ptr0 = doc.__destroy_into_raw();
2032
2005
  _assertClass(content_ref, ChangeRef);
2033
- var ptr1 = content_ref.__destroy_into_raw();
2034
- const ptr2 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
2006
+ var ptr0 = content_ref.__destroy_into_raw();
2007
+ const ptr1 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
2008
+ const len1 = WASM_VECTOR_LEN;
2009
+ const ptr2 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
2035
2010
  const len2 = WASM_VECTOR_LEN;
2036
- const ptr3 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
2037
- const len3 = WASM_VECTOR_LEN;
2038
- const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3);
2011
+ const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, doc.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2);
2039
2012
  return ret;
2040
2013
  }
2041
2014
  /**
@@ -2045,16 +2018,14 @@ export class Keyhive {
2045
2018
  */
2046
2019
  tryDecrypt(doc, encrypted) {
2047
2020
  _assertClass(doc, Document);
2048
- var ptr0 = doc.__destroy_into_raw();
2049
2021
  _assertClass(encrypted, Encrypted);
2050
- var ptr1 = encrypted.__destroy_into_raw();
2051
- const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, ptr0, ptr1);
2022
+ const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
2052
2023
  if (ret[3]) {
2053
2024
  throw takeFromExternrefTable0(ret[2]);
2054
2025
  }
2055
- var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2026
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2056
2027
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2057
- return v3;
2028
+ return v1;
2058
2029
  }
2059
2030
  /**
2060
2031
  * @param {Agent} to_add
@@ -2133,8 +2104,7 @@ export class Keyhive {
2133
2104
  */
2134
2105
  receiveContactCard(contact_card) {
2135
2106
  _assertClass(contact_card, ContactCard);
2136
- var ptr0 = contact_card.__destroy_into_raw();
2137
- const ret = wasm.keyhive_receiveContactCard(this.__wbg_ptr, ptr0);
2107
+ const ret = wasm.keyhive_receiveContactCard(this.__wbg_ptr, contact_card.__wbg_ptr);
2138
2108
  if (ret[2]) {
2139
2109
  throw takeFromExternrefTable0(ret[1]);
2140
2110
  }
@@ -2150,14 +2120,23 @@ export class Keyhive {
2150
2120
  return ret === 0 ? undefined : Agent.__wrap(ret);
2151
2121
  }
2152
2122
  /**
2153
- * @param {Identifier} id
2123
+ * @param {GroupId} id
2154
2124
  * @returns {Group | undefined}
2155
2125
  */
2156
2126
  getGroup(id) {
2157
- _assertClass(id, Identifier);
2127
+ _assertClass(id, GroupId);
2158
2128
  const ret = wasm.keyhive_getGroup(this.__wbg_ptr, id.__wbg_ptr);
2159
2129
  return ret === 0 ? undefined : Group.__wrap(ret);
2160
2130
  }
2131
+ /**
2132
+ * @param {DocumentId} id
2133
+ * @returns {Document | undefined}
2134
+ */
2135
+ getDocument(id) {
2136
+ _assertClass(id, DocumentId);
2137
+ const ret = wasm.keyhive_getDocument(this.__wbg_ptr, id.__wbg_ptr);
2138
+ return ret === 0 ? undefined : Document.__wrap(ret);
2139
+ }
2161
2140
  /**
2162
2141
  * @param {DocumentId} doc_id
2163
2142
  * @returns {SimpleCapability[]}
@@ -2388,14 +2367,6 @@ const RevokeMemberErrorFinalization = (typeof FinalizationRegistry === 'undefine
2388
2367
 
2389
2368
  export class RevokeMemberError {
2390
2369
 
2391
- static __wrap(ptr) {
2392
- ptr = ptr >>> 0;
2393
- const obj = Object.create(RevokeMemberError.prototype);
2394
- obj.__wbg_ptr = ptr;
2395
- RevokeMemberErrorFinalization.register(obj, obj.__wbg_ptr, obj);
2396
- return obj;
2397
- }
2398
-
2399
2370
  __destroy_into_raw() {
2400
2371
  const ptr = this.__wbg_ptr;
2401
2372
  this.__wbg_ptr = 0;
@@ -3049,11 +3020,6 @@ export function __wbg_Error_e17e777aac105295(arg0, arg1) {
3049
3020
  return ret;
3050
3021
  };
3051
3022
 
3052
- export function __wbg_addmembererror_new(arg0) {
3053
- const ret = AddMemberError.__wrap(arg0);
3054
- return ret;
3055
- };
3056
-
3057
3023
  export function __wbg_call_13410aac570ffff7() { return handleError(function (arg0, arg1) {
3058
3024
  const ret = arg0.call(arg1);
3059
3025
  return ret;
@@ -3099,11 +3065,6 @@ export function __wbg_crypto_574e78ad8b13b65f(arg0) {
3099
3065
  return ret;
3100
3066
  };
3101
3067
 
3102
- export function __wbg_crypto_92ce5ebc02988b17() { return handleError(function (arg0) {
3103
- const ret = arg0.crypto;
3104
- return ret;
3105
- }, arguments) };
3106
-
3107
3068
  export function __wbg_doccontentrefs_new(arg0) {
3108
3069
  const ret = DocContentRefs.__wrap(arg0);
3109
3070
  return ret;
@@ -3151,11 +3112,6 @@ export function __wbg_generateKey_b8902ccb0e50ff4e() { return handleError(functi
3151
3112
  return ret;
3152
3113
  }, arguments) };
3153
3114
 
3154
- export function __wbg_generatedocerror_new(arg0) {
3155
- const ret = GenerateDocError.__wrap(arg0);
3156
- return ret;
3157
- };
3158
-
3159
3115
  export function __wbg_generatewebcryptoerror_new(arg0) {
3160
3116
  const ret = GenerateWebCryptoError.__wrap(arg0);
3161
3117
  return ret;
@@ -3165,6 +3121,11 @@ export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(fu
3165
3121
  arg0.getRandomValues(arg1);
3166
3122
  }, arguments) };
3167
3123
 
3124
+ export function __wbg_get_458e874b43b18b25() { return handleError(function (arg0, arg1) {
3125
+ const ret = Reflect.get(arg0, arg1);
3126
+ return ret;
3127
+ }, arguments) };
3128
+
3168
3129
  export function __wbg_getprivatekey_2b060a8a8c19d828(arg0) {
3169
3130
  const ret = arg0.privateKey;
3170
3131
  return ret;
@@ -3180,10 +3141,10 @@ export function __wbg_group_new(arg0) {
3180
3141
  return ret;
3181
3142
  };
3182
3143
 
3183
- export function __wbg_instanceof_Window_12d20d558ef92592(arg0) {
3144
+ export function __wbg_instanceof_Crypto_33ac2d91cca59233(arg0) {
3184
3145
  let result;
3185
3146
  try {
3186
- result = arg0 instanceof Window;
3147
+ result = arg0 instanceof Crypto;
3187
3148
  } catch (_) {
3188
3149
  result = false;
3189
3150
  }
@@ -3191,21 +3152,6 @@ export function __wbg_instanceof_Window_12d20d558ef92592(arg0) {
3191
3152
  return ret;
3192
3153
  };
3193
3154
 
3194
- export function __wbg_jsdecrypterror_new(arg0) {
3195
- const ret = JsDecryptError.__wrap(arg0);
3196
- return ret;
3197
- };
3198
-
3199
- export function __wbg_jsencrypterror_new(arg0) {
3200
- const ret = JsEncryptError.__wrap(arg0);
3201
- return ret;
3202
- };
3203
-
3204
- export function __wbg_jsreceiveprekeyoperror_new(arg0) {
3205
- const ret = JsReceivePreKeyOpError.__wrap(arg0);
3206
- return ret;
3207
- };
3208
-
3209
3155
  export function __wbg_jsreceivestaticeventerror_new(arg0) {
3210
3156
  const ret = JsReceiveStaticEventError.__wrap(arg0);
3211
3157
  return ret;
@@ -3221,6 +3167,51 @@ export function __wbg_length_6bb7e81f9d7713e4(arg0) {
3221
3167
  return ret;
3222
3168
  };
3223
3169
 
3170
+ export function __wbg_log_0cc1b7768397bcfe(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
3171
+ let deferred0_0;
3172
+ let deferred0_1;
3173
+ try {
3174
+ deferred0_0 = arg0;
3175
+ deferred0_1 = arg1;
3176
+ console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
3177
+ } finally {
3178
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3179
+ }
3180
+ };
3181
+
3182
+ export function __wbg_log_cb9e190acc5753fb(arg0, arg1) {
3183
+ let deferred0_0;
3184
+ let deferred0_1;
3185
+ try {
3186
+ deferred0_0 = arg0;
3187
+ deferred0_1 = arg1;
3188
+ console.log(getStringFromWasm0(arg0, arg1));
3189
+ } finally {
3190
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3191
+ }
3192
+ };
3193
+
3194
+ export function __wbg_mark_7438147ce31e9d4b(arg0, arg1) {
3195
+ performance.mark(getStringFromWasm0(arg0, arg1));
3196
+ };
3197
+
3198
+ export function __wbg_measure_fb7825c11612c823() { return handleError(function (arg0, arg1, arg2, arg3) {
3199
+ let deferred0_0;
3200
+ let deferred0_1;
3201
+ let deferred1_0;
3202
+ let deferred1_1;
3203
+ try {
3204
+ deferred0_0 = arg0;
3205
+ deferred0_1 = arg1;
3206
+ deferred1_0 = arg2;
3207
+ deferred1_1 = arg3;
3208
+ performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
3209
+ } finally {
3210
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3211
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3212
+ }
3213
+ }, arguments) };
3214
+
3224
3215
  export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
3225
3216
  const ret = arg0.msCrypto;
3226
3217
  return ret;
@@ -3233,7 +3224,7 @@ export function __wbg_new_2e3c58a15f39f5f9(arg0, arg1) {
3233
3224
  const a = state0.a;
3234
3225
  state0.a = 0;
3235
3226
  try {
3236
- return __wbg_adapter_272(a, state0.b, arg0, arg1);
3227
+ return __wbg_adapter_269(a, state0.b, arg0, arg1);
3237
3228
  } finally {
3238
3229
  state0.a = a;
3239
3230
  }
@@ -3307,11 +3298,6 @@ export function __wbg_resolve_4055c623acdd6a1b(arg0) {
3307
3298
  return ret;
3308
3299
  };
3309
3300
 
3310
- export function __wbg_revokemembererror_new(arg0) {
3311
- const ret = RevokeMemberError.__wrap(arg0);
3312
- return ret;
3313
- };
3314
-
3315
3301
  export function __wbg_serializationerror_new(arg0) {
3316
3302
  const ret = SerializationError.__wrap(arg0);
3317
3303
  return ret;
@@ -3463,12 +3449,6 @@ export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
3463
3449
  throw new Error(getStringFromWasm0(arg0, arg1));
3464
3450
  };
3465
3451
 
3466
- export function __wbindgen_cast_133053e9d0cd85aa(arg0, arg1) {
3467
- // Cast intrinsic for `Closure(Closure { dtor_idx: 422, function: Function { arguments: [Externref], shim_idx: 423, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3468
- const ret = makeMutClosure(arg0, arg1, 422, __wbg_adapter_12);
3469
- return ret;
3470
- };
3471
-
3472
3452
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
3473
3453
  // Cast intrinsic for `Ref(String) -> Externref`.
3474
3454
  const ret = getStringFromWasm0(arg0, arg1);
@@ -3497,6 +3477,12 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
3497
3477
  return ret;
3498
3478
  };
3499
3479
 
3480
+ export function __wbindgen_cast_cc3b8fd244091a64(arg0, arg1) {
3481
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 494, function: Function { arguments: [Externref], shim_idx: 495, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3482
+ const ret = makeMutClosure(arg0, arg1, 494, __wbg_adapter_8);
3483
+ return ret;
3484
+ };
3485
+
3500
3486
  export function __wbindgen_init_externref_table() {
3501
3487
  const table = wasm.__wbindgen_export_2;
3502
3488
  const offset = table.grow(4);
Binary file