@balancy/wasm 1.0.25 → 1.0.28

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.
@@ -390,7 +390,7 @@ var Balancy = function() {
390
390
  "__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
391
391
  "_balancySetUnzipCallback",
392
392
  "__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_",
393
- "__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
393
+ "__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
394
394
  "_balancySetDataRequestedCallback",
395
395
  "_balancyViewAllowOptimization",
396
396
  "_balancyConfigLaunch",
@@ -419,6 +419,8 @@ var Balancy = function() {
419
419
  "__Z35jsbalancyDailyBonus_claimNextRewardPN7Balancy4Data8BaseDataE",
420
420
  "__Z38jsbalancyDailyBonus_canClaimNextRewardPN7Balancy4Data8BaseDataE",
421
421
  "__Z47jsbalancyDailyBonus_getSecondsTillTheNextRewardPN7Balancy4Data8BaseDataE",
422
+ "__Z31jsbalancyBattlePass_claimRewardPN7Balancy4Data8BaseDataEi",
423
+ "__Z35jsbalancyBattlePass_getRewardStatusPN7Balancy4Data8BaseDataEi",
422
424
  "__Z35jsbalancyOfferGroupInfo_CanPurchasePN7Balancy4Data8BaseDataEPNS_5Utils15JsonBasedObjectE",
423
425
  "__Z51jsbalancyOfferInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE",
424
426
  "__Z51jsbalancyEventInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE",
@@ -436,7 +438,10 @@ var Balancy = function() {
436
438
  "__Z18jsbalancyGetStatusv",
437
439
  "_balancyGetTimeOffset",
438
440
  "_balancySetTimeOffset",
439
- "__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEb",
441
+ "__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib",
442
+ "__Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi",
443
+ "__Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi",
444
+ "__Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE",
440
445
  "_emscripten_websocket_on_connection_status",
441
446
  "_emscripten_websocket_on_socketio_event",
442
447
  "_emscripten_websocket_on_socketio_error",
@@ -516,19 +521,30 @@ var Balancy = function() {
516
521
  "_balancyDailyBonus_claimNextReward",
517
522
  "_balancyDailyBonus_canClaimNextReward",
518
523
  "_balancyDailyBonus_getSecondsTillTheNextReward",
524
+ "_balancyBattlePass_claimReward",
525
+ "_balancyBattlePass_getRewardStatus",
519
526
  "_balancySoftPurchaseStoreItem",
520
527
  "_balancySoftPurchaseShopSlot",
521
528
  "_balancySoftPurchaseGameOffer",
522
529
  "_balancySoftPurchaseGameOfferGroup",
530
+ "__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE",
523
531
  "_balancyWebViewRequest",
524
532
  "_balancyGetProductsIdAndType",
525
533
  "_balancyGetParsedObject",
526
- "_js_websocket_connect",
527
- "_js_websocket_disconnect",
528
- "_js_websocket_is_connected",
529
- "_js_websocket_subscribe",
530
- "_js_websocket_send_message",
531
- "_js_websocket_send_ack",
534
+ "_balancyAuth_NameAndPassword",
535
+ "__Z22jsbalancyAuth_DeviceIdNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
536
+ "__Z29jsbalancyAuth_NameAndPasswordNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_N10emscripten3valE",
537
+ "__Z30jsbalancyAuth_EmailAndPasswordNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_N10emscripten3valE",
538
+ "_balancyInventory_AddItems",
539
+ "_balancyInventory_RemoveItems",
540
+ "_balancyInventory_GetTotalItemsCount",
541
+ "_js_call_typescript_bridge_connect",
542
+ "_js_call_typescript_bridge_disconnect",
543
+ "_js_call_typescript_bridge_is_connected",
544
+ "_js_call_typescript_bridge_subscribe",
545
+ "_js_call_typescript_bridge_send_message",
546
+ "_js_call_typescript_bridge_send_ack",
547
+ "_js_initialize_typescript_bridge",
532
548
  "_main",
533
549
  "onRuntimeInitialized"
534
550
  ].forEach(function(prop) {
@@ -1337,131 +1353,274 @@ var Balancy = function() {
1337
1353
  invokeErrorCallback(-1, error.message, callbackPtr);
1338
1354
  });
1339
1355
  }
1340
- function js_websocket_connect(connectionId, url, authData) {
1341
- var socketIOManager = null;
1342
- if (typeof Module !== "undefined" && Module.SocketIOManager) {
1343
- socketIOManager = Module.SocketIOManager;
1344
- } else if (typeof window !== "undefined" && window.Module && window.Module.SocketIOManager) {
1345
- socketIOManager = window.Module.SocketIOManager;
1346
- } else if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.SocketIOManager) {
1347
- socketIOManager = globalThis.Module.SocketIOManager;
1348
- }
1349
- if (!socketIOManager) {
1350
- console.error("SocketIOManager not found. Available contexts:", {
1351
- Module: typeof Module !== "undefined" ? Object.keys(Module) : "undefined",
1352
- windowModule: typeof window !== "undefined" && window.Module ? Object.keys(window.Module) : "undefined",
1353
- globalThisModule: typeof globalThis !== "undefined" && globalThis.Module ? Object.keys(globalThis.Module) : "undefined"
1354
- });
1355
- return false;
1356
+ function js_call_typescript_bridge_connect(connectionId, url, authData) {
1357
+ if (typeof Module !== "undefined" && Module.typescript_websocket_connect_request) {
1358
+ try {
1359
+ var urlStr = UTF8ToString(url);
1360
+ var authStr = UTF8ToString(authData);
1361
+ console.log("[C++ -> TS Bridge] Connect request", connectionId, urlStr);
1362
+ Module.typescript_websocket_connect_request(connectionId, urlStr, authStr);
1363
+ return true;
1364
+ } catch (error) {
1365
+ console.error("[ERROR] calling typescript_websocket_connect_request via Module:", error);
1366
+ }
1356
1367
  }
1357
- try {
1358
- var urlStr = UTF8ToString(url);
1359
- var authStr = UTF8ToString(authData);
1360
- var authObj = JSON.parse(authStr);
1361
- console.log("🔌 C++ -> JS: Connecting WebSocket", connectionId, urlStr);
1362
- socketIOManager.connect(connectionId, urlStr, authObj).then(function(result) {
1363
- console.log("🔌 WebSocket connection attempt completed:", result);
1364
- }).catch(function(error) {
1365
- console.error(" WebSocket connection attempt failed:", error);
1366
- });
1367
- return true;
1368
- } catch (error) {
1369
- console.error("❌ js_websocket_connect error:", error);
1370
- return false;
1368
+ if (typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_connect_request) {
1369
+ try {
1370
+ var urlStr1 = UTF8ToString(url);
1371
+ var authStr1 = UTF8ToString(authData);
1372
+ console.log("[C++ -> TS Bridge] Connect request via window.Module", connectionId, urlStr1);
1373
+ window.Module.typescript_websocket_connect_request(connectionId, urlStr1, authStr1);
1374
+ return true;
1375
+ } catch (error) {
1376
+ console.error("[ERROR] calling typescript_websocket_connect_request via window.Module:", error);
1377
+ }
1371
1378
  }
1379
+ if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_connect_request) {
1380
+ try {
1381
+ var urlStr2 = UTF8ToString(url);
1382
+ var authStr2 = UTF8ToString(authData);
1383
+ console.log("[C++ -> TS Bridge] Connect request via globalThis.Module", connectionId, urlStr2);
1384
+ globalThis.Module.typescript_websocket_connect_request(connectionId, urlStr2, authStr2);
1385
+ return true;
1386
+ } catch (error) {
1387
+ console.error("[ERROR] calling typescript_websocket_connect_request via globalThis.Module:", error);
1388
+ }
1389
+ }
1390
+ console.error("[ERROR] TypeScript WebSocket Bridge connect method not found. Available contexts:", {
1391
+ Module: typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1392
+ return k.includes("websocket") || k.includes("typescript");
1393
+ }) : "undefined",
1394
+ windowModule: typeof window !== "undefined" && window.Module ? Object.keys(window.Module).filter(function(k) {
1395
+ return k.includes("websocket") || k.includes("typescript");
1396
+ }) : "undefined",
1397
+ globalThisModule: typeof globalThis !== "undefined" && globalThis.Module ? Object.keys(globalThis.Module).filter(function(k) {
1398
+ return k.includes("websocket") || k.includes("typescript");
1399
+ }) : "undefined"
1400
+ });
1401
+ return false;
1372
1402
  }
1373
- function js_websocket_disconnect(connectionId) {
1374
- var socketIOManager = null;
1375
- if (typeof Module !== "undefined" && Module.SocketIOManager) {
1376
- socketIOManager = Module.SocketIOManager;
1377
- } else if (typeof window !== "undefined" && window.Module && window.Module.SocketIOManager) {
1378
- socketIOManager = window.Module.SocketIOManager;
1379
- } else if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.SocketIOManager) {
1380
- socketIOManager = globalThis.Module.SocketIOManager;
1403
+ function js_call_typescript_bridge_disconnect(connectionId) {
1404
+ var success = false;
1405
+ if (typeof Module !== "undefined" && Module.typescript_websocket_disconnect_request) {
1406
+ try {
1407
+ console.log("[C++ -> TS Bridge] Disconnect request", connectionId);
1408
+ Module.typescript_websocket_disconnect_request(connectionId);
1409
+ success = true;
1410
+ } catch (error) {
1411
+ console.error("[ERROR] calling typescript_websocket_disconnect_request via Module:", error);
1412
+ }
1381
1413
  }
1382
- if (!socketIOManager) {
1383
- console.error("SocketIOManager not initialized in TypeScript");
1384
- return;
1414
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_disconnect_request) {
1415
+ try {
1416
+ console.log("[C++ -> TS Bridge] Disconnect request via window.Module", connectionId);
1417
+ window.Module.typescript_websocket_disconnect_request(connectionId);
1418
+ success = true;
1419
+ } catch (error) {
1420
+ console.error("[ERROR] calling typescript_websocket_disconnect_request via window.Module:", error);
1421
+ }
1422
+ }
1423
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_disconnect_request) {
1424
+ try {
1425
+ console.log("[C++ -> TS Bridge] Disconnect request via globalThis.Module", connectionId);
1426
+ globalThis.Module.typescript_websocket_disconnect_request(connectionId);
1427
+ success = true;
1428
+ } catch (error) {
1429
+ console.error("[ERROR] calling typescript_websocket_disconnect_request via globalThis.Module:", error);
1430
+ }
1431
+ }
1432
+ if (!success) {
1433
+ console.error("[ERROR] TypeScript WebSocket Bridge disconnect method not found");
1385
1434
  }
1386
- console.log("🔌 C++ -> JS: Disconnecting WebSocket", connectionId);
1387
- socketIOManager.disconnect(connectionId);
1388
1435
  }
1389
- function js_websocket_is_connected(connectionId) {
1390
- var socketIOManager = null;
1391
- if (typeof Module !== "undefined" && Module.SocketIOManager) {
1392
- socketIOManager = Module.SocketIOManager;
1393
- } else if (typeof window !== "undefined" && window.Module && window.Module.SocketIOManager) {
1394
- socketIOManager = window.Module.SocketIOManager;
1395
- } else if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.SocketIOManager) {
1396
- socketIOManager = globalThis.Module.SocketIOManager;
1436
+ function js_call_typescript_bridge_subscribe(connectionId, eventName) {
1437
+ var success = false;
1438
+ if (typeof Module !== "undefined" && Module.typescript_websocket_subscribe_event) {
1439
+ try {
1440
+ var eventStr = UTF8ToString(eventName);
1441
+ console.log("[C++ -> TS Bridge] Subscribe event", connectionId, eventStr);
1442
+ Module.typescript_websocket_subscribe_event(connectionId, eventStr);
1443
+ success = true;
1444
+ } catch (error) {
1445
+ console.error("[ERROR] calling typescript_websocket_subscribe_event via Module:", error);
1446
+ }
1397
1447
  }
1398
- if (!socketIOManager) {
1399
- return false;
1448
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_subscribe_event) {
1449
+ try {
1450
+ var eventStr1 = UTF8ToString(eventName);
1451
+ console.log("[C++ -> TS Bridge] Subscribe event via window.Module", connectionId, eventStr1);
1452
+ window.Module.typescript_websocket_subscribe_event(connectionId, eventStr1);
1453
+ success = true;
1454
+ } catch (error) {
1455
+ console.error("[ERROR] calling typescript_websocket_subscribe_event via window.Module:", error);
1456
+ }
1457
+ }
1458
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_subscribe_event) {
1459
+ try {
1460
+ var eventStr2 = UTF8ToString(eventName);
1461
+ console.log("[C++ -> TS Bridge] Subscribe event via globalThis.Module", connectionId, eventStr2);
1462
+ globalThis.Module.typescript_websocket_subscribe_event(connectionId, eventStr2);
1463
+ success = true;
1464
+ } catch (error) {
1465
+ console.error("[ERROR] calling typescript_websocket_subscribe_event via globalThis.Module:", error);
1466
+ }
1467
+ }
1468
+ if (!success) {
1469
+ console.error("[ERROR] TypeScript WebSocket Bridge subscribe method not found");
1400
1470
  }
1401
- return socketIOManager.isConnected(connectionId);
1402
1471
  }
1403
- function js_websocket_subscribe(connectionId, eventName) {
1404
- var socketIOManager = null;
1405
- if (typeof Module !== "undefined" && Module.SocketIOManager) {
1406
- socketIOManager = Module.SocketIOManager;
1407
- } else if (typeof window !== "undefined" && window.Module && window.Module.SocketIOManager) {
1408
- socketIOManager = window.Module.SocketIOManager;
1409
- } else if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.SocketIOManager) {
1410
- socketIOManager = globalThis.Module.SocketIOManager;
1472
+ function js_call_typescript_bridge_send_message(connectionId, eventName, data) {
1473
+ var success = false;
1474
+ if (typeof Module !== "undefined" && Module.typescript_websocket_send_message) {
1475
+ try {
1476
+ var eventStr = UTF8ToString(eventName);
1477
+ var dataStr = UTF8ToString(data);
1478
+ console.log("[C++ -> TS Bridge] Send message", connectionId, eventStr);
1479
+ Module.typescript_websocket_send_message(connectionId, eventStr, dataStr);
1480
+ success = true;
1481
+ } catch (error) {
1482
+ console.error("[ERROR] calling typescript_websocket_send_message via Module:", error);
1483
+ }
1411
1484
  }
1412
- if (!socketIOManager) {
1413
- console.error("SocketIOManager not initialized in TypeScript");
1414
- return;
1485
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_message) {
1486
+ try {
1487
+ var eventStr1 = UTF8ToString(eventName);
1488
+ var dataStr1 = UTF8ToString(data);
1489
+ console.log("[C++ -> TS Bridge] Send message via window.Module", connectionId, eventStr1);
1490
+ window.Module.typescript_websocket_send_message(connectionId, eventStr1, dataStr1);
1491
+ success = true;
1492
+ } catch (error) {
1493
+ console.error("[ERROR] calling typescript_websocket_send_message via window.Module:", error);
1494
+ }
1415
1495
  }
1416
- try {
1417
- var eventStr = UTF8ToString(eventName);
1418
- console.log("🔌 C++ -> JS: Subscribing to event", connectionId, eventStr);
1419
- socketIOManager.subscribeToEvent(connectionId, eventStr);
1420
- } catch (error) {
1421
- console.error("❌ js_websocket_subscribe error:", error);
1496
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_message) {
1497
+ try {
1498
+ var eventStr2 = UTF8ToString(eventName);
1499
+ var dataStr2 = UTF8ToString(data);
1500
+ console.log("[C++ -> TS Bridge] Send message via globalThis.Module", connectionId, eventStr2);
1501
+ globalThis.Module.typescript_websocket_send_message(connectionId, eventStr2, dataStr2);
1502
+ success = true;
1503
+ } catch (error) {
1504
+ console.error("[ERROR] calling typescript_websocket_send_message via globalThis.Module:", error);
1505
+ }
1506
+ }
1507
+ if (!success) {
1508
+ console.error("[ERROR] TypeScript WebSocket Bridge send message method not found");
1422
1509
  }
1423
1510
  }
1424
- function js_websocket_send_message(connectionId, eventName, data) {
1425
- var socketIOManager = null;
1426
- if (typeof Module !== "undefined" && Module.SocketIOManager) {
1427
- socketIOManager = Module.SocketIOManager;
1428
- } else if (typeof window !== "undefined" && window.Module && window.Module.SocketIOManager) {
1429
- socketIOManager = window.Module.SocketIOManager;
1430
- } else if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.SocketIOManager) {
1431
- socketIOManager = globalThis.Module.SocketIOManager;
1511
+ function js_call_typescript_bridge_send_ack(connectionId, ackId, responseData) {
1512
+ var success = false;
1513
+ if (typeof Module !== "undefined" && Module.typescript_websocket_send_ack) {
1514
+ try {
1515
+ var responseStr = UTF8ToString(responseData);
1516
+ console.log("[C++ -> TS Bridge] Send ack", connectionId, ackId);
1517
+ Module.typescript_websocket_send_ack(connectionId, ackId, responseStr);
1518
+ success = true;
1519
+ } catch (error) {
1520
+ console.error("[ERROR] calling typescript_websocket_send_ack via Module:", error);
1521
+ }
1432
1522
  }
1433
- if (!socketIOManager) {
1434
- console.error("SocketIOManager not initialized in TypeScript");
1435
- return;
1523
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_ack) {
1524
+ try {
1525
+ var responseStr1 = UTF8ToString(responseData);
1526
+ console.log("[C++ -> TS Bridge] Send ack via window.Module", connectionId, ackId);
1527
+ window.Module.typescript_websocket_send_ack(connectionId, ackId, responseStr1);
1528
+ success = true;
1529
+ } catch (error) {
1530
+ console.error("[ERROR] calling typescript_websocket_send_ack via window.Module:", error);
1531
+ }
1436
1532
  }
1437
- try {
1438
- var eventStr = UTF8ToString(eventName);
1439
- var dataStr = UTF8ToString(data);
1440
- console.log("🔌 C++ -> JS: Sending message", connectionId, eventStr);
1441
- socketIOManager.sendMessage(connectionId, eventStr, dataStr);
1442
- } catch (error) {
1443
- console.error("❌ js_websocket_send_message error:", error);
1533
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_ack) {
1534
+ try {
1535
+ var responseStr2 = UTF8ToString(responseData);
1536
+ console.log("[C++ -> TS Bridge] Send ack via globalThis.Module", connectionId, ackId);
1537
+ globalThis.Module.typescript_websocket_send_ack(connectionId, ackId, responseStr2);
1538
+ success = true;
1539
+ } catch (error) {
1540
+ console.error("[ERROR] calling typescript_websocket_send_ack via globalThis.Module:", error);
1541
+ }
1542
+ }
1543
+ if (!success) {
1544
+ console.error("[ERROR] TypeScript WebSocket Bridge send ack method not found");
1444
1545
  }
1445
1546
  }
1446
- function js_websocket_send_ack(connectionId, ackId, responseData) {
1447
- var socketIOManager = null;
1448
- if (typeof Module !== "undefined" && Module.SocketIOManager) {
1449
- socketIOManager = Module.SocketIOManager;
1450
- } else if (typeof window !== "undefined" && window.Module && window.Module.SocketIOManager) {
1451
- socketIOManager = window.Module.SocketIOManager;
1452
- } else if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.SocketIOManager) {
1453
- socketIOManager = globalThis.Module.SocketIOManager;
1547
+ function js_initialize_typescript_bridge() {
1548
+ console.log("[INIT] Initializing TypeScript WebSocket Bridge integration...");
1549
+ if (typeof window !== "undefined" && window.initializeTypeScriptWebSocketBridge) {
1550
+ try {
1551
+ window.initializeTypeScriptWebSocketBridge();
1552
+ console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via window");
1553
+ } catch (error) {
1554
+ console.warn("[WARNING] Failed to initialize bridge via window:", error);
1555
+ }
1454
1556
  }
1455
- if (!socketIOManager) {
1456
- console.error("SocketIOManager not initialized in TypeScript");
1457
- return;
1557
+ if (typeof globalThis !== "undefined" && globalThis.initializeTypeScriptWebSocketBridge) {
1558
+ try {
1559
+ globalThis.initializeTypeScriptWebSocketBridge();
1560
+ console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via globalThis");
1561
+ } catch (error) {
1562
+ console.warn("[WARNING] Failed to initialize bridge via globalThis:", error);
1563
+ }
1458
1564
  }
1565
+ var bridgeMethods = [
1566
+ "typescript_websocket_connect_request",
1567
+ "typescript_websocket_disconnect_request",
1568
+ "typescript_websocket_subscribe_event",
1569
+ "typescript_websocket_send_message",
1570
+ "typescript_websocket_send_ack"
1571
+ ];
1572
+ var bridgeFound = false;
1573
+ var contexts = [];
1574
+ if (typeof Module !== "undefined") {
1575
+ contexts.push({
1576
+ name: "Module",
1577
+ obj: Module
1578
+ });
1579
+ }
1580
+ if (typeof window !== "undefined" && window.Module) {
1581
+ contexts.push({
1582
+ name: "window.Module",
1583
+ obj: window.Module
1584
+ });
1585
+ }
1586
+ if (typeof globalThis !== "undefined" && globalThis.Module) {
1587
+ contexts.push({
1588
+ name: "globalThis.Module",
1589
+ obj: globalThis.Module
1590
+ });
1591
+ }
1592
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1459
1593
  try {
1460
- var responseStr = UTF8ToString(responseData);
1461
- console.log("🔌 C++ -> JS: Sending ack", connectionId, ackId);
1462
- socketIOManager.sendAcknowledgment(connectionId, ackId, responseStr);
1463
- } catch (error) {
1464
- console.error("❌ js_websocket_send_ack error:", error);
1594
+ var _loop = function() {
1595
+ var context = _step.value;
1596
+ var availableMethods = bridgeMethods.filter(function(method) {
1597
+ return typeof context.obj[method] === "function";
1598
+ });
1599
+ if (availableMethods.length > 0) {
1600
+ console.log("[SUCCESS] Bridge methods found in " + context.name + ": " + availableMethods.join(", "));
1601
+ bridgeFound = true;
1602
+ }
1603
+ };
1604
+ for(var _iterator = contexts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
1605
+ } catch (err) {
1606
+ _didIteratorError = true;
1607
+ _iteratorError = err;
1608
+ } finally{
1609
+ try {
1610
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1611
+ _iterator.return();
1612
+ }
1613
+ } finally{
1614
+ if (_didIteratorError) {
1615
+ throw _iteratorError;
1616
+ }
1617
+ }
1618
+ }
1619
+ if (!bridgeFound) {
1620
+ console.warn("[WARNING] No TypeScript WebSocket Bridge methods found in any context");
1621
+ console.log("Available in Module:", typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1622
+ return k.includes("websocket") || k.includes("typescript");
1623
+ }) : "undefined");
1465
1624
  }
1466
1625
  }
1467
1626
  var ExitStatus = function ExitStatus(status) {
@@ -7381,13 +7540,13 @@ var Balancy = function() {
7381
7540
  invoke_viiiiiiiiii: invoke_viiiiiiiiii,
7382
7541
  invoke_viiiiiiiiiiiiiii: invoke_viiiiiiiiiiiiiii,
7383
7542
  invoke_viijii: invoke_viijii,
7543
+ js_call_typescript_bridge_connect: js_call_typescript_bridge_connect,
7544
+ js_call_typescript_bridge_disconnect: js_call_typescript_bridge_disconnect,
7545
+ js_call_typescript_bridge_send_ack: js_call_typescript_bridge_send_ack,
7546
+ js_call_typescript_bridge_send_message: js_call_typescript_bridge_send_message,
7547
+ js_call_typescript_bridge_subscribe: js_call_typescript_bridge_subscribe,
7384
7548
  js_fetch: js_fetch,
7385
- js_websocket_connect: js_websocket_connect,
7386
- js_websocket_disconnect: js_websocket_disconnect,
7387
- js_websocket_is_connected: js_websocket_is_connected,
7388
- js_websocket_send_ack: js_websocket_send_ack,
7389
- js_websocket_send_message: js_websocket_send_message,
7390
- js_websocket_subscribe: js_websocket_subscribe,
7549
+ js_initialize_typescript_bridge: js_initialize_typescript_bridge,
7391
7550
  random_get: _random_get
7392
7551
  };
7393
7552
  var wasmExports;
@@ -7438,7 +7597,7 @@ var Balancy = function() {
7438
7597
  Module["__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7439
7598
  Module["_balancySetUnzipCallback"] = createExportWrapper("balancySetUnzipCallback", 1);
7440
7599
  Module["__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_"] = createExportWrapper("_Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_", 2);
7441
- Module["__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE"] = createExportWrapper("_Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE", 2);
7600
+ Module["__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7442
7601
  Module["_balancySetDataRequestedCallback"] = createExportWrapper("balancySetDataRequestedCallback", 1);
7443
7602
  Module["_balancyViewAllowOptimization"] = createExportWrapper("balancyViewAllowOptimization", 1);
7444
7603
  Module["_balancyConfigLaunch"] = createExportWrapper("balancyConfigLaunch", 1);
@@ -7467,6 +7626,8 @@ var Balancy = function() {
7467
7626
  Module["__Z35jsbalancyDailyBonus_claimNextRewardPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z35jsbalancyDailyBonus_claimNextRewardPN7Balancy4Data8BaseDataE", 1);
7468
7627
  Module["__Z38jsbalancyDailyBonus_canClaimNextRewardPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z38jsbalancyDailyBonus_canClaimNextRewardPN7Balancy4Data8BaseDataE", 1);
7469
7628
  Module["__Z47jsbalancyDailyBonus_getSecondsTillTheNextRewardPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z47jsbalancyDailyBonus_getSecondsTillTheNextRewardPN7Balancy4Data8BaseDataE", 1);
7629
+ Module["__Z31jsbalancyBattlePass_claimRewardPN7Balancy4Data8BaseDataEi"] = createExportWrapper("_Z31jsbalancyBattlePass_claimRewardPN7Balancy4Data8BaseDataEi", 2);
7630
+ Module["__Z35jsbalancyBattlePass_getRewardStatusPN7Balancy4Data8BaseDataEi"] = createExportWrapper("_Z35jsbalancyBattlePass_getRewardStatusPN7Balancy4Data8BaseDataEi", 2);
7470
7631
  Module["__Z35jsbalancyOfferGroupInfo_CanPurchasePN7Balancy4Data8BaseDataEPNS_5Utils15JsonBasedObjectE"] = createExportWrapper("_Z35jsbalancyOfferGroupInfo_CanPurchasePN7Balancy4Data8BaseDataEPNS_5Utils15JsonBasedObjectE", 2);
7471
7632
  Module["__Z51jsbalancyOfferInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z51jsbalancyOfferInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE", 1);
7472
7633
  Module["__Z51jsbalancyEventInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z51jsbalancyEventInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE", 1);
@@ -7484,7 +7645,10 @@ var Balancy = function() {
7484
7645
  Module["__Z18jsbalancyGetStatusv"] = createExportWrapper("_Z18jsbalancyGetStatusv", 0);
7485
7646
  Module["_balancyGetTimeOffset"] = createExportWrapper("balancyGetTimeOffset", 0);
7486
7647
  Module["_balancySetTimeOffset"] = createExportWrapper("balancySetTimeOffset", 1);
7487
- Module["__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEb"] = createExportWrapper("_Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEb", 3);
7648
+ Module["__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib"] = createExportWrapper("_Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib", 4);
7649
+ Module["__Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi"] = createExportWrapper("_Z27jsbalancyInventory_AddItemsPN7Balancy5Utils15JsonBasedObjectEi", 2);
7650
+ Module["__Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi"] = createExportWrapper("_Z30jsbalancyInventory_RemoveItemsPN7Balancy5Utils15JsonBasedObjectEi", 2);
7651
+ Module["__Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE"] = createExportWrapper("_Z37jsbalancyInventory_GetTotalItemsCountPN7Balancy5Utils15JsonBasedObjectE", 1);
7488
7652
  Module["_emscripten_websocket_on_connection_status"] = createExportWrapper("emscripten_websocket_on_connection_status", 3);
7489
7653
  Module["_emscripten_websocket_on_socketio_event"] = createExportWrapper("emscripten_websocket_on_socketio_event", 5);
7490
7654
  Module["_emscripten_websocket_on_socketio_error"] = createExportWrapper("emscripten_websocket_on_socketio_error", 3);
@@ -7566,13 +7730,23 @@ var Balancy = function() {
7566
7730
  Module["_balancyDailyBonus_claimNextReward"] = createExportWrapper("balancyDailyBonus_claimNextReward", 1);
7567
7731
  Module["_balancyDailyBonus_canClaimNextReward"] = createExportWrapper("balancyDailyBonus_canClaimNextReward", 1);
7568
7732
  Module["_balancyDailyBonus_getSecondsTillTheNextReward"] = createExportWrapper("balancyDailyBonus_getSecondsTillTheNextReward", 1);
7733
+ Module["_balancyBattlePass_claimReward"] = createExportWrapper("balancyBattlePass_claimReward", 2);
7734
+ Module["_balancyBattlePass_getRewardStatus"] = createExportWrapper("balancyBattlePass_getRewardStatus", 2);
7569
7735
  Module["_balancySoftPurchaseStoreItem"] = createExportWrapper("balancySoftPurchaseStoreItem", 1);
7570
7736
  Module["_balancySoftPurchaseShopSlot"] = createExportWrapper("balancySoftPurchaseShopSlot", 1);
7571
7737
  Module["_balancySoftPurchaseGameOffer"] = createExportWrapper("balancySoftPurchaseGameOffer", 1);
7572
7738
  Module["_balancySoftPurchaseGameOfferGroup"] = createExportWrapper("balancySoftPurchaseGameOfferGroup", 2);
7739
+ Module["__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE"] = createExportWrapper("_Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE", 2);
7573
7740
  Module["_balancyWebViewRequest"] = createExportWrapper("balancyWebViewRequest", 1);
7574
7741
  Module["_balancyGetProductsIdAndType"] = createExportWrapper("balancyGetProductsIdAndType", 1);
7575
- Module["_balancyGetParsedObject"] = createExportWrapper("balancyGetParsedObject", 2);
7742
+ Module["_balancyGetParsedObject"] = createExportWrapper("balancyGetParsedObject", 3);
7743
+ Module["_balancyAuth_NameAndPassword"] = createExportWrapper("balancyAuth_NameAndPassword", 3);
7744
+ Module["__Z22jsbalancyAuth_DeviceIdNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z22jsbalancyAuth_DeviceIdNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7745
+ Module["__Z29jsbalancyAuth_NameAndPasswordNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_N10emscripten3valE"] = createExportWrapper("_Z29jsbalancyAuth_NameAndPasswordNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_N10emscripten3valE", 3);
7746
+ Module["__Z30jsbalancyAuth_EmailAndPasswordNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_N10emscripten3valE"] = createExportWrapper("_Z30jsbalancyAuth_EmailAndPasswordNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_N10emscripten3valE", 3);
7747
+ Module["_balancyInventory_AddItems"] = createExportWrapper("balancyInventory_AddItems", 2);
7748
+ Module["_balancyInventory_RemoveItems"] = createExportWrapper("balancyInventory_RemoveItems", 2);
7749
+ Module["_balancyInventory_GetTotalItemsCount"] = createExportWrapper("balancyInventory_GetTotalItemsCount", 1);
7576
7750
  var _fflush = createExportWrapper("fflush", 1);
7577
7751
  var _strerror = createExportWrapper("strerror", 1);
7578
7752
  var _setThrew = createExportWrapper("setThrew", 2);