@cartridge/controller-wasm 0.3.9 → 0.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartridge/controller-wasm",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -328,6 +328,18 @@ export class ControllerFactory {
328
328
  */
329
329
  static apiLogin(app_id: string, username: string, class_hash: JsFelt, rpc_url: string, address: JsFelt, owner: Owner, cartridge_api_url: string): Promise<CartridgeAccountWithMeta>;
330
330
  }
331
+ /**
332
+ * JavaScript-friendly chain configuration
333
+ */
334
+ export class JsChainConfig {
335
+ free(): void;
336
+ [Symbol.dispose](): void;
337
+ constructor(class_hash: JsFelt, rpc_url: string, owner: Owner, address?: JsFelt | null);
338
+ readonly class_hash: JsFelt;
339
+ readonly rpc_url: string;
340
+ readonly owner: Owner;
341
+ readonly address: JsFelt | undefined;
342
+ }
331
343
  export class JsControllerError {
332
344
  private constructor();
333
345
  free(): void;
@@ -343,3 +355,42 @@ export class LoginResult {
343
355
  [Symbol.dispose](): void;
344
356
  intoValues(): Array<any>;
345
357
  }
358
+ /**
359
+ * WASM bindings for MultiChainController
360
+ */
361
+ export class MultiChainAccount {
362
+ private constructor();
363
+ free(): void;
364
+ [Symbol.dispose](): void;
365
+ /**
366
+ * Creates a new MultiChainAccount with multiple chain configurations
367
+ */
368
+ static create(app_id: string, username: string, chain_configs: JsChainConfig[], cartridge_api_url: string): Promise<MultiChainAccount>;
369
+ /**
370
+ * Loads a MultiChainAccount from storage
371
+ */
372
+ static fromStorage(app_id: string, cartridge_api_url: string): Promise<MultiChainAccount | undefined>;
373
+ /**
374
+ * Adds a new chain configuration
375
+ */
376
+ addChain(config: JsChainConfig): Promise<void>;
377
+ /**
378
+ * Removes a chain configuration
379
+ */
380
+ removeChain(chain_id: JsFelt): Promise<void>;
381
+ /**
382
+ * Gets an account instance for a specific chain
383
+ */
384
+ controller(chain_id: JsFelt): Promise<CartridgeAccount>;
385
+ }
386
+ /**
387
+ * Metadata for displaying multi-chain information
388
+ */
389
+ export class MultiChainAccountMeta {
390
+ private constructor();
391
+ free(): void;
392
+ [Symbol.dispose](): void;
393
+ readonly app_id: string;
394
+ readonly username: string;
395
+ readonly chains: JsFelt[];
396
+ }
@@ -218,7 +218,7 @@ state => {
218
218
  }
219
219
  );
220
220
 
221
- function makeClosure(arg0, arg1, dtor, f) {
221
+ function makeMutClosure(arg0, arg1, dtor, f) {
222
222
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
223
223
  const real = (...args) => {
224
224
 
@@ -226,12 +226,16 @@ function makeClosure(arg0, arg1, dtor, f) {
226
226
  // count. This ensures that the Rust closure environment won't
227
227
  // be deallocated while we're invoking it.
228
228
  state.cnt++;
229
+ const a = state.a;
230
+ state.a = 0;
229
231
  try {
230
- return f(state.a, state.b, ...args);
232
+ return f(a, state.b, ...args);
231
233
  } finally {
232
234
  if (--state.cnt === 0) {
233
- wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b); state.a = 0;
235
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
234
236
  CLOSURE_DTORS.unregister(state);
237
+ } else {
238
+ state.a = a;
235
239
  }
236
240
  }
237
241
  };
@@ -240,7 +244,7 @@ function makeClosure(arg0, arg1, dtor, f) {
240
244
  return real;
241
245
  }
242
246
 
243
- function makeMutClosure(arg0, arg1, dtor, f) {
247
+ function makeClosure(arg0, arg1, dtor, f) {
244
248
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
245
249
  const real = (...args) => {
246
250
 
@@ -248,16 +252,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
248
252
  // count. This ensures that the Rust closure environment won't
249
253
  // be deallocated while we're invoking it.
250
254
  state.cnt++;
251
- const a = state.a;
252
- state.a = 0;
253
255
  try {
254
- return f(a, state.b, ...args);
256
+ return f(state.a, state.b, ...args);
255
257
  } finally {
256
258
  if (--state.cnt === 0) {
257
- wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
259
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b); state.a = 0;
258
260
  CLOSURE_DTORS.unregister(state);
259
- } else {
260
- state.a = a;
261
261
  }
262
262
  }
263
263
  };
@@ -308,6 +308,21 @@ export function computeAccountAddress(class_hash, owner, salt) {
308
308
  }
309
309
  }
310
310
 
311
+ function _assertClass(instance, klass) {
312
+ if (!(instance instanceof klass)) {
313
+ throw new Error(`expected instance of ${klass.name}`);
314
+ }
315
+ }
316
+
317
+ function getArrayJsValueFromWasm0(ptr, len) {
318
+ ptr = ptr >>> 0;
319
+ const mem = getDataViewMemory0();
320
+ const result = [];
321
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
322
+ result.push(takeObject(mem.getUint32(i, true)));
323
+ }
324
+ return result;
325
+ }
311
326
  /**
312
327
  * Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
313
328
  * The goal of this function is to know from any place when the register session flow has been completed, and to
@@ -332,19 +347,19 @@ export function signerToGuid(signer) {
332
347
  return takeObject(ret);
333
348
  }
334
349
 
335
- function __wbg_adapter_4(arg0, arg1) {
336
- wasm.__wbindgen_export_5(arg0, arg1);
350
+ function __wbg_adapter_4(arg0, arg1, arg2) {
351
+ wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
337
352
  }
338
353
 
339
- function __wbg_adapter_11(arg0, arg1, arg2) {
340
- wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
354
+ function __wbg_adapter_9(arg0, arg1) {
355
+ wasm.__wbindgen_export_6(arg0, arg1);
341
356
  }
342
357
 
343
- function __wbg_adapter_14(arg0, arg1, arg2) {
358
+ function __wbg_adapter_18(arg0, arg1, arg2) {
344
359
  wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
345
360
  }
346
361
 
347
- function __wbg_adapter_257(arg0, arg1, arg2, arg3) {
362
+ function __wbg_adapter_276(arg0, arg1, arg2, arg3) {
348
363
  wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
349
364
  }
350
365
 
@@ -1087,6 +1102,89 @@ export class ControllerFactory {
1087
1102
  }
1088
1103
  if (Symbol.dispose) ControllerFactory.prototype[Symbol.dispose] = ControllerFactory.prototype.free;
1089
1104
 
1105
+ const JsChainConfigFinalization = (typeof FinalizationRegistry === 'undefined')
1106
+ ? { register: () => {}, unregister: () => {} }
1107
+ : new FinalizationRegistry(ptr => wasm.__wbg_jschainconfig_free(ptr >>> 0, 1));
1108
+ /**
1109
+ * JavaScript-friendly chain configuration
1110
+ */
1111
+ export class JsChainConfig {
1112
+
1113
+ static __unwrap(jsValue) {
1114
+ if (!(jsValue instanceof JsChainConfig)) {
1115
+ return 0;
1116
+ }
1117
+ return jsValue.__destroy_into_raw();
1118
+ }
1119
+
1120
+ __destroy_into_raw() {
1121
+ const ptr = this.__wbg_ptr;
1122
+ this.__wbg_ptr = 0;
1123
+ JsChainConfigFinalization.unregister(this);
1124
+ return ptr;
1125
+ }
1126
+
1127
+ free() {
1128
+ const ptr = this.__destroy_into_raw();
1129
+ wasm.__wbg_jschainconfig_free(ptr, 0);
1130
+ }
1131
+ /**
1132
+ * @param {JsFelt} class_hash
1133
+ * @param {string} rpc_url
1134
+ * @param {Owner} owner
1135
+ * @param {JsFelt | null} [address]
1136
+ */
1137
+ constructor(class_hash, rpc_url, owner, address) {
1138
+ const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1139
+ const len0 = WASM_VECTOR_LEN;
1140
+ const ret = wasm.jschainconfig_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(owner), isLikeNone(address) ? 0 : addHeapObject(address));
1141
+ this.__wbg_ptr = ret >>> 0;
1142
+ JsChainConfigFinalization.register(this, this.__wbg_ptr, this);
1143
+ return this;
1144
+ }
1145
+ /**
1146
+ * @returns {JsFelt}
1147
+ */
1148
+ get class_hash() {
1149
+ const ret = wasm.jschainconfig_class_hash(this.__wbg_ptr);
1150
+ return takeObject(ret);
1151
+ }
1152
+ /**
1153
+ * @returns {string}
1154
+ */
1155
+ get rpc_url() {
1156
+ let deferred1_0;
1157
+ let deferred1_1;
1158
+ try {
1159
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1160
+ wasm.jschainconfig_rpc_url(retptr, this.__wbg_ptr);
1161
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1162
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1163
+ deferred1_0 = r0;
1164
+ deferred1_1 = r1;
1165
+ return getStringFromWasm0(r0, r1);
1166
+ } finally {
1167
+ wasm.__wbindgen_add_to_stack_pointer(16);
1168
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
1169
+ }
1170
+ }
1171
+ /**
1172
+ * @returns {Owner}
1173
+ */
1174
+ get owner() {
1175
+ const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
1176
+ return takeObject(ret);
1177
+ }
1178
+ /**
1179
+ * @returns {JsFelt | undefined}
1180
+ */
1181
+ get address() {
1182
+ const ret = wasm.jschainconfig_address(this.__wbg_ptr);
1183
+ return takeObject(ret);
1184
+ }
1185
+ }
1186
+ if (Symbol.dispose) JsChainConfig.prototype[Symbol.dispose] = JsChainConfig.prototype.free;
1187
+
1090
1188
  const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
1091
1189
  ? { register: () => {}, unregister: () => {} }
1092
1190
  : new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
@@ -1218,6 +1316,175 @@ export class LoginResult {
1218
1316
  }
1219
1317
  if (Symbol.dispose) LoginResult.prototype[Symbol.dispose] = LoginResult.prototype.free;
1220
1318
 
1319
+ const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
1320
+ ? { register: () => {}, unregister: () => {} }
1321
+ : new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
1322
+ /**
1323
+ * WASM bindings for MultiChainController
1324
+ */
1325
+ export class MultiChainAccount {
1326
+
1327
+ static __wrap(ptr) {
1328
+ ptr = ptr >>> 0;
1329
+ const obj = Object.create(MultiChainAccount.prototype);
1330
+ obj.__wbg_ptr = ptr;
1331
+ MultiChainAccountFinalization.register(obj, obj.__wbg_ptr, obj);
1332
+ return obj;
1333
+ }
1334
+
1335
+ __destroy_into_raw() {
1336
+ const ptr = this.__wbg_ptr;
1337
+ this.__wbg_ptr = 0;
1338
+ MultiChainAccountFinalization.unregister(this);
1339
+ return ptr;
1340
+ }
1341
+
1342
+ free() {
1343
+ const ptr = this.__destroy_into_raw();
1344
+ wasm.__wbg_multichainaccount_free(ptr, 0);
1345
+ }
1346
+ /**
1347
+ * Creates a new MultiChainAccount with multiple chain configurations
1348
+ * @param {string} app_id
1349
+ * @param {string} username
1350
+ * @param {JsChainConfig[]} chain_configs
1351
+ * @param {string} cartridge_api_url
1352
+ * @returns {Promise<MultiChainAccount>}
1353
+ */
1354
+ static create(app_id, username, chain_configs, cartridge_api_url) {
1355
+ const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1356
+ const len0 = WASM_VECTOR_LEN;
1357
+ const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1358
+ const len1 = WASM_VECTOR_LEN;
1359
+ const ptr2 = passArrayJsValueToWasm0(chain_configs, wasm.__wbindgen_export_0);
1360
+ const len2 = WASM_VECTOR_LEN;
1361
+ const ptr3 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1362
+ const len3 = WASM_VECTOR_LEN;
1363
+ const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1364
+ return takeObject(ret);
1365
+ }
1366
+ /**
1367
+ * Loads a MultiChainAccount from storage
1368
+ * @param {string} app_id
1369
+ * @param {string} cartridge_api_url
1370
+ * @returns {Promise<MultiChainAccount | undefined>}
1371
+ */
1372
+ static fromStorage(app_id, cartridge_api_url) {
1373
+ const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1374
+ const len0 = WASM_VECTOR_LEN;
1375
+ const ptr1 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1376
+ const len1 = WASM_VECTOR_LEN;
1377
+ const ret = wasm.multichainaccount_fromStorage(ptr0, len0, ptr1, len1);
1378
+ return takeObject(ret);
1379
+ }
1380
+ /**
1381
+ * Adds a new chain configuration
1382
+ * @param {JsChainConfig} config
1383
+ * @returns {Promise<void>}
1384
+ */
1385
+ addChain(config) {
1386
+ _assertClass(config, JsChainConfig);
1387
+ var ptr0 = config.__destroy_into_raw();
1388
+ const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
1389
+ return takeObject(ret);
1390
+ }
1391
+ /**
1392
+ * Removes a chain configuration
1393
+ * @param {JsFelt} chain_id
1394
+ * @returns {Promise<void>}
1395
+ */
1396
+ removeChain(chain_id) {
1397
+ const ret = wasm.multichainaccount_removeChain(this.__wbg_ptr, addHeapObject(chain_id));
1398
+ return takeObject(ret);
1399
+ }
1400
+ /**
1401
+ * Gets an account instance for a specific chain
1402
+ * @param {JsFelt} chain_id
1403
+ * @returns {Promise<CartridgeAccount>}
1404
+ */
1405
+ controller(chain_id) {
1406
+ const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
1407
+ return takeObject(ret);
1408
+ }
1409
+ }
1410
+ if (Symbol.dispose) MultiChainAccount.prototype[Symbol.dispose] = MultiChainAccount.prototype.free;
1411
+
1412
+ const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
1413
+ ? { register: () => {}, unregister: () => {} }
1414
+ : new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
1415
+ /**
1416
+ * Metadata for displaying multi-chain information
1417
+ */
1418
+ export class MultiChainAccountMeta {
1419
+
1420
+ __destroy_into_raw() {
1421
+ const ptr = this.__wbg_ptr;
1422
+ this.__wbg_ptr = 0;
1423
+ MultiChainAccountMetaFinalization.unregister(this);
1424
+ return ptr;
1425
+ }
1426
+
1427
+ free() {
1428
+ const ptr = this.__destroy_into_raw();
1429
+ wasm.__wbg_multichainaccountmeta_free(ptr, 0);
1430
+ }
1431
+ /**
1432
+ * @returns {string}
1433
+ */
1434
+ get app_id() {
1435
+ let deferred1_0;
1436
+ let deferred1_1;
1437
+ try {
1438
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1439
+ wasm.multichainaccountmeta_app_id(retptr, this.__wbg_ptr);
1440
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1441
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1442
+ deferred1_0 = r0;
1443
+ deferred1_1 = r1;
1444
+ return getStringFromWasm0(r0, r1);
1445
+ } finally {
1446
+ wasm.__wbindgen_add_to_stack_pointer(16);
1447
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
1448
+ }
1449
+ }
1450
+ /**
1451
+ * @returns {string}
1452
+ */
1453
+ get username() {
1454
+ let deferred1_0;
1455
+ let deferred1_1;
1456
+ try {
1457
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1458
+ wasm.multichainaccountmeta_username(retptr, this.__wbg_ptr);
1459
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1460
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1461
+ deferred1_0 = r0;
1462
+ deferred1_1 = r1;
1463
+ return getStringFromWasm0(r0, r1);
1464
+ } finally {
1465
+ wasm.__wbindgen_add_to_stack_pointer(16);
1466
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
1467
+ }
1468
+ }
1469
+ /**
1470
+ * @returns {JsFelt[]}
1471
+ */
1472
+ get chains() {
1473
+ try {
1474
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1475
+ wasm.multichainaccountmeta_chains(retptr, this.__wbg_ptr);
1476
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1477
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1478
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1479
+ wasm.__wbindgen_export_3(r0, r1 * 4, 4);
1480
+ return v1;
1481
+ } finally {
1482
+ wasm.__wbindgen_add_to_stack_pointer(16);
1483
+ }
1484
+ }
1485
+ }
1486
+ if (Symbol.dispose) MultiChainAccountMeta.prototype[Symbol.dispose] = MultiChainAccountMeta.prototype.free;
1487
+
1221
1488
  export function __wbg_Error_e17e777aac105295(arg0, arg1) {
1222
1489
  const ret = Error(getStringFromWasm0(arg0, arg1));
1223
1490
  return addHeapObject(ret);
@@ -1262,6 +1529,11 @@ export function __wbg_call_a5400b25a865cfd8() { return handleError(function (arg
1262
1529
  return addHeapObject(ret);
1263
1530
  }, arguments) };
1264
1531
 
1532
+ export function __wbg_cartridgeaccount_new(arg0) {
1533
+ const ret = CartridgeAccount.__wrap(arg0);
1534
+ return addHeapObject(ret);
1535
+ };
1536
+
1265
1537
  export function __wbg_cartridgeaccountwithmeta_new(arg0) {
1266
1538
  const ret = CartridgeAccountWithMeta.__wrap(arg0);
1267
1539
  return addHeapObject(ret);
@@ -1438,6 +1710,11 @@ export function __wbg_iterator_f370b34483c71a1c() {
1438
1710
  return addHeapObject(ret);
1439
1711
  };
1440
1712
 
1713
+ export function __wbg_jschainconfig_unwrap(arg0) {
1714
+ const ret = JsChainConfig.__unwrap(takeObject(arg0));
1715
+ return ret;
1716
+ };
1717
+
1441
1718
  export function __wbg_jscontrollererror_new(arg0) {
1442
1719
  const ret = JsControllerError.__wrap(arg0);
1443
1720
  return addHeapObject(ret);
@@ -1472,6 +1749,11 @@ export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
1472
1749
  return addHeapObject(ret);
1473
1750
  };
1474
1751
 
1752
+ export function __wbg_multichainaccount_new(arg0) {
1753
+ const ret = MultiChainAccount.__wrap(arg0);
1754
+ return addHeapObject(ret);
1755
+ };
1756
+
1475
1757
  export function __wbg_navigator_65d5ad763926b868(arg0) {
1476
1758
  const ret = getObject(arg0).navigator;
1477
1759
  return addHeapObject(ret);
@@ -1504,7 +1786,7 @@ export function __wbg_new_2e3c58a15f39f5f9(arg0, arg1) {
1504
1786
  const a = state0.a;
1505
1787
  state0.a = 0;
1506
1788
  try {
1507
- return __wbg_adapter_257(a, state0.b, arg0, arg1);
1789
+ return __wbg_adapter_276(a, state0.b, arg0, arg1);
1508
1790
  } finally {
1509
1791
  state0.a = a;
1510
1792
  }
@@ -1911,15 +2193,15 @@ export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
1911
2193
  throw new Error(getStringFromWasm0(arg0, arg1));
1912
2194
  };
1913
2195
 
1914
- export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1915
- // Cast intrinsic for `Ref(String) -> Externref`.
1916
- const ret = getStringFromWasm0(arg0, arg1);
2196
+ export function __wbindgen_cast_1ab588f7c48ef669(arg0, arg1) {
2197
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1002, function: Function { arguments: [Externref], shim_idx: 1003, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2198
+ const ret = makeMutClosure(arg0, arg1, 1002, __wbg_adapter_18);
1917
2199
  return addHeapObject(ret);
1918
2200
  };
1919
2201
 
1920
- export function __wbindgen_cast_3ab31798e812bcf8(arg0, arg1) {
1921
- // Cast intrinsic for `Closure(Closure { dtor_idx: 13, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 14, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1922
- const ret = makeClosure(arg0, arg1, 13, __wbg_adapter_11);
2202
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
2203
+ // Cast intrinsic for `Ref(String) -> Externref`.
2204
+ const ret = getStringFromWasm0(arg0, arg1);
1923
2205
  return addHeapObject(ret);
1924
2206
  };
1925
2207
 
@@ -1929,9 +2211,9 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
1929
2211
  return addHeapObject(ret);
1930
2212
  };
1931
2213
 
1932
- export function __wbindgen_cast_a428de4fc2820fa4(arg0, arg1) {
1933
- // Cast intrinsic for `Closure(Closure { dtor_idx: 938, function: Function { arguments: [Externref], shim_idx: 939, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1934
- const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_14);
2214
+ export function __wbindgen_cast_be6c52086ee82095(arg0, arg1) {
2215
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 16, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2216
+ const ret = makeClosure(arg0, arg1, 15, __wbg_adapter_4);
1935
2217
  return addHeapObject(ret);
1936
2218
  };
1937
2219
 
@@ -1947,9 +2229,9 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1947
2229
  return addHeapObject(ret);
1948
2230
  };
1949
2231
 
1950
- export function __wbindgen_cast_ed712f6666cb3532(arg0, arg1) {
1951
- // Cast intrinsic for `Closure(Closure { dtor_idx: 904, function: Function { arguments: [], shim_idx: 905, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1952
- const ret = makeMutClosure(arg0, arg1, 904, __wbg_adapter_4);
2232
+ export function __wbindgen_cast_f8c41a10414abe07(arg0, arg1) {
2233
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 968, function: Function { arguments: [], shim_idx: 969, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2234
+ const ret = makeMutClosure(arg0, arg1, 968, __wbg_adapter_9);
1953
2235
  return addHeapObject(ret);
1954
2236
  };
1955
2237
 
Binary file
@@ -281,7 +281,7 @@ function __wbg_adapter_4(arg0, arg1) {
281
281
  wasm.__wbindgen_export_5(arg0, arg1);
282
282
  }
283
283
 
284
- function __wbg_adapter_7(arg0, arg1, arg2) {
284
+ function __wbg_adapter_9(arg0, arg1, arg2) {
285
285
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
286
286
  }
287
287
 
@@ -1164,9 +1164,9 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1164
1164
  return addHeapObject(ret);
1165
1165
  };
1166
1166
 
1167
- export function __wbindgen_cast_90f1d8883a9ae70e(arg0, arg1) {
1168
- // Cast intrinsic for `Closure(Closure { dtor_idx: 499, function: Function { arguments: [Externref], shim_idx: 500, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1169
- const ret = makeMutClosure(arg0, arg1, 499, __wbg_adapter_7);
1167
+ export function __wbindgen_cast_86daa9f8bfebbfee(arg0, arg1) {
1168
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 497, function: Function { arguments: [Externref], shim_idx: 498, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1169
+ const ret = makeMutClosure(arg0, arg1, 497, __wbg_adapter_9);
1170
1170
  return addHeapObject(ret);
1171
1171
  };
1172
1172
 
@@ -1176,15 +1176,15 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
1176
1176
  return addHeapObject(ret);
1177
1177
  };
1178
1178
 
1179
- export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1180
- // Cast intrinsic for `F64 -> Externref`.
1181
- const ret = arg0;
1179
+ export function __wbindgen_cast_d207c5207e18da12(arg0, arg1) {
1180
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 463, function: Function { arguments: [], shim_idx: 464, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1181
+ const ret = makeMutClosure(arg0, arg1, 463, __wbg_adapter_4);
1182
1182
  return addHeapObject(ret);
1183
1183
  };
1184
1184
 
1185
- export function __wbindgen_cast_e585a18257edad45(arg0, arg1) {
1186
- // Cast intrinsic for `Closure(Closure { dtor_idx: 465, function: Function { arguments: [], shim_idx: 466, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1187
- const ret = makeMutClosure(arg0, arg1, 465, __wbg_adapter_4);
1185
+ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1186
+ // Cast intrinsic for `F64 -> Externref`.
1187
+ const ret = arg0;
1188
1188
  return addHeapObject(ret);
1189
1189
  };
1190
1190
 
Binary file