steamutils 1.3.64 → 1.3.66

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. package/SteamClient.js +12 -10
  2. package/index.js +96 -0
  3. package/package.json +2 -2
  4. package/protos/csgo/base_gcmessages.proto +553 -0
  5. package/protos/csgo/connectionless_netmessages.proto +0 -2
  6. package/protos/csgo/cs_gameevents.proto +1 -0
  7. package/protos/csgo/cstrike15_gcmessages.proto +41 -12
  8. package/protos/csgo/cstrike15_usermessages.proto +0 -4
  9. package/protos/csgo/demo.proto +5 -0
  10. package/protos/csgo/econ_gcmessages.proto +0 -9
  11. package/protos/csgo/gcsdk_gcmessages.proto +2 -2
  12. package/protos/csgo/gcsystemmsgs.proto +1 -0
  13. package/protos/csgo/netmessages.proto +22 -8
  14. package/protos/csgo/networkbasetypes.proto +2 -0
  15. package/protos/csgo/steammessages.proto +23 -0
  16. package/protos/csgo/usercmd.proto +2 -1
  17. package/protos/csgo/usermessages.proto +31 -0
  18. package/protos/steam/enums.proto +58 -1
  19. package/protos/steam/enums_clientserver.proto +3 -34
  20. package/protos/steam/enums_productinfo.proto +1 -0
  21. package/protos/steam/htmlmessages.proto +12 -0
  22. package/protos/steam/steamdatagram_messages_sdr.proto +1 -1
  23. package/protos/steam/steammessages_accounthardware.steamclient.proto +18 -52
  24. package/protos/steam/steammessages_appoverview.proto +18 -1
  25. package/protos/steam/steammessages_auth.steamclient.proto +128 -188
  26. package/protos/steam/steammessages_base.proto +3 -0
  27. package/protos/steam/steammessages_broadcast.steamclient.proto +126 -267
  28. package/protos/steam/steammessages_chat.steamclient.proto +79 -290
  29. package/protos/steam/steammessages_client_objects.proto +4 -0
  30. package/protos/steam/steammessages_clientlanp2p.proto +1 -0
  31. package/protos/steam/steammessages_clientmetrics.steamclient.proto +0 -2
  32. package/protos/steam/steammessages_clientnotificationtypes.proto +19 -0
  33. package/protos/steam/steammessages_clientserver_2.proto +11 -0
  34. package/protos/steam/steammessages_clientserver_login.proto +1 -1
  35. package/protos/steam/steammessages_clientserver_mms.proto +228 -235
  36. package/protos/steam/steammessages_clientserver_ucm.proto +2 -0
  37. package/protos/steam/steammessages_clientserver_uds.proto +1 -0
  38. package/protos/steam/steammessages_clientserver_ufs.proto +0 -127
  39. package/protos/steam/steammessages_clientsettings.proto +46 -6
  40. package/protos/steam/steammessages_cloud.steamclient.proto +158 -249
  41. package/protos/steam/steammessages_contentsystem.steamclient.proto +16 -8
  42. package/protos/steam/steammessages_credentials.steamclient.proto +7 -26
  43. package/protos/steam/steammessages_datapublisher.steamclient.proto +30 -44
  44. package/protos/steam/steammessages_depotbuilder.steamclient.proto +6 -25
  45. package/protos/steam/steammessages_deviceauth.steamclient.proto +11 -45
  46. package/protos/steam/steammessages_econ.steamclient.proto +12 -25
  47. package/protos/steam/steammessages_familygroups.steamclient.proto +441 -0
  48. package/protos/steam/steammessages_friendmessages.steamclient.proto +19 -46
  49. package/protos/steam/steammessages_gamenetworking.steamclient.proto +2 -9
  50. package/protos/steam/steammessages_gamenotifications.steamclient.proto +57 -82
  51. package/protos/steam/steammessages_gameservers.steamclient.proto +13 -29
  52. package/protos/steam/steammessages_inventory.steamclient.proto +21 -73
  53. package/protos/steam/steammessages_linkfilter.steamclient.proto +14 -24
  54. package/protos/steam/steammessages_lobbymatchmaking.steamclient.proto +1 -5
  55. package/protos/steam/steammessages_market.steamclient.proto +9 -13
  56. package/protos/steam/steammessages_marketingmessages.steamclient.proto +59 -60
  57. package/protos/steam/steammessages_offline.steamclient.proto +2 -9
  58. package/protos/steam/steammessages_parental.steamclient.proto +100 -66
  59. package/protos/steam/steammessages_parties.steamclient.proto +6 -25
  60. package/protos/steam/steammessages_partnerapps.steamclient.proto +11 -43
  61. package/protos/steam/steammessages_player.steamclient.proto +133 -278
  62. package/protos/steam/steammessages_publishedfile.steamclient.proto +213 -289
  63. package/protos/steam/steammessages_qms.steamclient.proto +4 -18
  64. package/protos/steam/steammessages_remoteclient.proto +2 -1
  65. package/protos/steam/steammessages_remoteclient_discovery.proto +9 -0
  66. package/protos/steam/steammessages_remoteclient_service.steamclient.proto +18 -73
  67. package/protos/steam/steammessages_remoteplay.proto +1 -2
  68. package/protos/steam/steammessages_secrets.steamclient.proto +1 -5
  69. package/protos/steam/steammessages_shader.steamclient.proto +6 -25
  70. package/protos/steam/steammessages_site_license.steamclient.proto +8 -33
  71. package/protos/steam/steammessages_steamtv.steamclient.proto +169 -266
  72. package/protos/steam/steammessages_store.steamclient.proto +110 -77
  73. package/protos/steam/steammessages_storebrowse.steamclient.proto +170 -115
  74. package/protos/steam/steammessages_timedtrial.steamclient.proto +3 -13
  75. package/protos/steam/steammessages_twofactor.steamclient.proto +92 -121
  76. package/protos/steam/steammessages_unified_base.steamclient.proto +12 -0
  77. package/protos/steam/steammessages_unified_test.steamclient.proto +10 -20
  78. package/protos/steam/steammessages_useraccount.steamclient.proto +26 -64
  79. package/protos/steam/steammessages_vac.steamclient.proto +2 -9
  80. package/protos/steam/steammessages_video.steamclient.proto +25 -128
  81. package/protos/steam/steammessages_workshop.steamclient.proto +1 -5
  82. package/protos/steam/webuimessages_achievements.proto +29 -0
  83. package/protos/steam/webuimessages_gamescope.proto +57 -0
  84. package/protos/steam/webuimessages_steamengine.proto +9 -0
  85. package/protos/steam/webuimessages_steamos.proto +114 -0
  86. package/protos/steam/webuimessages_transport.proto +4 -0
  87. package/protos/steam/webuimessages_transportvalidation.proto +14 -0
  88. package/test_steamclient.js +4 -3
  89. package/protos/csgo/steammessages_steamlearn.steamworkssdk.proto +0 -357
  90. package/protos/steam/renderer/rendermessages.proto +0 -893
  91. package/protos/steam/steammessages_star.steamclient.proto +0 -64
  92. package/protos/webui/common.proto +0 -5508
  93. package/protos/webui/common_base.proto +0 -27
  94. package/protos/webui/service_accountlinking.proto +0 -27
  95. package/protos/webui/service_accountprivacy.proto +0 -42
  96. package/protos/webui/service_auction.proto +0 -97
  97. package/protos/webui/service_authentication.proto +0 -222
  98. package/protos/webui/service_authenticationsupport.proto +0 -74
  99. package/protos/webui/service_broadcast.proto +0 -562
  100. package/protos/webui/service_chat.proto +0 -11
  101. package/protos/webui/service_chatroom.proto +0 -810
  102. package/protos/webui/service_chatusability.proto +0 -107
  103. package/protos/webui/service_clan.proto +0 -41
  104. package/protos/webui/service_clanchatrooms.proto +0 -25
  105. package/protos/webui/service_clanfaqs.proto +0 -202
  106. package/protos/webui/service_clientcomm.proto +0 -150
  107. package/protos/webui/service_clientmetrics.proto +0 -63
  108. package/protos/webui/service_cloud.proto +0 -222
  109. package/protos/webui/service_cloudconfigstore.proto +0 -51
  110. package/protos/webui/service_cloudgaming.proto +0 -30
  111. package/protos/webui/service_community.proto +0 -365
  112. package/protos/webui/service_econ.proto +0 -134
  113. package/protos/webui/service_embedded.proto +0 -24
  114. package/protos/webui/service_experimentservice.proto +0 -6
  115. package/protos/webui/service_fovasvideo.proto +0 -15
  116. package/protos/webui/service_friendmessages.proto +0 -133
  117. package/protos/webui/service_friendslist.proto +0 -70
  118. package/protos/webui/service_gamenotes.proto +0 -15
  119. package/protos/webui/service_helprequestlogs.proto +0 -26
  120. package/protos/webui/service_loyaltyrewards.proto +0 -252
  121. package/protos/webui/service_marketingmessages.proto +0 -184
  122. package/protos/webui/service_mobileapp.proto +0 -18
  123. package/protos/webui/service_mobileauth.proto +0 -24
  124. package/protos/webui/service_mobiledevice.proto +0 -26
  125. package/protos/webui/service_mobileperaccount.proto +0 -31
  126. package/protos/webui/service_news.proto +0 -101
  127. package/protos/webui/service_parental.proto +0 -178
  128. package/protos/webui/service_partnermembershipinvite.proto +0 -29
  129. package/protos/webui/service_partnerstorebrowse.proto +0 -6
  130. package/protos/webui/service_phone.proto +0 -51
  131. package/protos/webui/service_physicalgoods.proto +0 -15
  132. package/protos/webui/service_player.proto +0 -885
  133. package/protos/webui/service_promotioneventinvites.proto +0 -50
  134. package/protos/webui/service_promotionplanning.proto +0 -72
  135. package/protos/webui/service_publishedfile.proto +0 -687
  136. package/protos/webui/service_publishing.proto +0 -119
  137. package/protos/webui/service_quest.proto +0 -127
  138. package/protos/webui/service_salefeature.proto +0 -315
  139. package/protos/webui/service_saleitemrewards.proto +0 -54
  140. package/protos/webui/service_shoppingcart.proto +0 -108
  141. package/protos/webui/service_steamawards.proto +0 -19
  142. package/protos/webui/service_steamcharts.proto +0 -75
  143. package/protos/webui/service_steamengine.proto +0 -36
  144. package/protos/webui/service_steamlearn.proto +0 -727
  145. package/protos/webui/service_steamnotification.proto +0 -84
  146. package/protos/webui/service_steamtv.proto +0 -495
  147. package/protos/webui/service_steamvrvoicechat.proto +0 -67
  148. package/protos/webui/service_steamvrwebrtc.proto +0 -48
  149. package/protos/webui/service_storagedevicemanager.proto +0 -104
  150. package/protos/webui/service_store.proto +0 -289
  151. package/protos/webui/service_storeappsimilarity.proto +0 -76
  152. package/protos/webui/service_storebrowse.proto +0 -73
  153. package/protos/webui/service_storequery.proto +0 -97
  154. package/protos/webui/service_storesales.proto +0 -15
  155. package/protos/webui/service_storetopsellers.proto +0 -44
  156. package/protos/webui/service_systemmanager.proto +0 -11
  157. package/protos/webui/service_test_transporterror.proto +0 -6
  158. package/protos/webui/service_transportauth.proto +0 -12
  159. package/protos/webui/service_transportvalidation.proto +0 -69
  160. package/protos/webui/service_twofactor.proto +0 -181
  161. package/protos/webui/service_useraccount.proto +0 -138
  162. package/protos/webui/service_usergameactivity.proto +0 -34
  163. package/protos/webui/service_usergamenotes.proto +0 -53
  164. package/protos/webui/service_usernews.proto +0 -68
  165. package/protos/webui/service_userreviews.proto +0 -96
  166. package/protos/webui/service_video.proto +0 -128
  167. package/protos/webui/service_voicechat.proto +0 -139
  168. package/protos/webui/service_webrtc.proto +0 -52
package/SteamClient.js CHANGED
@@ -680,6 +680,9 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
680
680
  }
681
681
 
682
682
  async function sendHello() {
683
+ steamClient.sendToGC(AppID, Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingClient2GCHello, {}, Buffer.alloc(0));
684
+ // steamClient.sendToGC(AppID, Protos.csgo.EGCBaseClientMsg.k_EMsgGCClientHello, {}, Buffer.alloc(0));
685
+
683
686
  steamClient.sendToGC(
684
687
  AppID,
685
688
  Protos.csgo.EGCBaseClientMsg.k_EMsgGCClientHello,
@@ -1244,7 +1247,6 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
1244
1247
  }
1245
1248
  case Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientLogonFatalError: {
1246
1249
  const data = protoDecode(Protos.csgo.CMsgGCCStrike15_v2_ClientLogonFatalError, payload);
1247
- console.log(data);
1248
1250
  const dataExample = {
1249
1251
  errorcode: 4,
1250
1252
  message: "",
@@ -2303,15 +2305,15 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
2303
2305
  ];
2304
2306
  },
2305
2307
  uploadRichPresence(appid, richPresence) {
2306
- if (Array.isArray(richPresence)) {
2307
- richPresence = richPresence.reduce(function (previousValue, currentValue, currentIndex, array) {
2308
- if (currentValue.key) {
2309
- previousValue[currentValue.key] = currentValue.value?.toString() || "";
2310
- }
2311
- return previousValue;
2312
- });
2313
- }
2314
- steamClient.uploadRichPresence(appid, richPresence);
2308
+ const _richPresence = Array.isArray(richPresence)
2309
+ ? richPresence.reduce(function (previousValue, currentValue, currentIndex, array) {
2310
+ if (currentValue.key) {
2311
+ previousValue[currentValue.key] = currentValue.value?.toString() || "";
2312
+ }
2313
+ return previousValue;
2314
+ }, {})
2315
+ : richPresence;
2316
+ steamClient.uploadRichPresence(appid, _richPresence);
2315
2317
  },
2316
2318
  getUserOwnedApps,
2317
2319
  getPlayingAppIds,
package/index.js CHANGED
@@ -6410,6 +6410,13 @@ export default class SteamUser {
6410
6410
  }
6411
6411
 
6412
6412
  async acceptConfirmationForObject(accessToken, identitySecret, objectID) {
6413
+ if (!accessToken || typeof accessToken !== "string") {
6414
+ return { error: "Invalid accessToken: " + accessToken };
6415
+ }
6416
+ if (!identitySecret || typeof identitySecret !== "string") {
6417
+ return { error: "Invalid identitySecret: " + identitySecret };
6418
+ }
6419
+
6413
6420
  let error = null;
6414
6421
  for (const cookie of this._cookies) {
6415
6422
  try {
@@ -6433,7 +6440,60 @@ export default class SteamUser {
6433
6440
  return { error };
6434
6441
  }
6435
6442
 
6443
+ async denyConfirmationForObject(accessToken, identitySecret, objectID) {
6444
+ if (!accessToken || typeof accessToken !== "string") {
6445
+ return { error: "Invalid accessToken: " + accessToken };
6446
+ }
6447
+ if (!identitySecret || typeof identitySecret !== "string") {
6448
+ return { error: "Invalid identitySecret: " + identitySecret };
6449
+ }
6450
+
6451
+ let error = null;
6452
+ for (const cookie of this._cookies) {
6453
+ try {
6454
+ const community = new SteamCommunity();
6455
+ community.setCookies(cookie.toString().split(";"));
6456
+ community.oAuthToken = accessToken;
6457
+ try {
6458
+ community.setMobileAppAccessToken(accessToken);
6459
+ } catch (e) {}
6460
+
6461
+ error = await new Promise((resolve) => {
6462
+ let time = SteamTotp.time();
6463
+ let confKey = SteamTotp.getConfirmationKey(identitySecret, time, "list");
6464
+ community.getConfirmations(time, { tag: "list", key: confKey }, function (err, confs) {
6465
+ if (err) {
6466
+ resolve(err);
6467
+ return;
6468
+ }
6469
+
6470
+ const conf = confs.find((conf) => conf.creator == objectID);
6471
+ if (!conf) {
6472
+ resolve("Could not find confirmation for object " + objectID);
6473
+ return;
6474
+ }
6475
+ confKey = SteamTotp.getConfirmationKey(identitySecret, time, "accept");
6476
+ conf.respond(time, { tag: "accept", key: confKey }, false, resolve);
6477
+ });
6478
+ });
6479
+ if (!error) {
6480
+ return {
6481
+ success: true,
6482
+ };
6483
+ }
6484
+ } catch (e) {}
6485
+ }
6486
+ return { error };
6487
+ }
6488
+
6436
6489
  async getConfirmations(accessToken, identitySecret) {
6490
+ if (!accessToken || typeof accessToken !== "string") {
6491
+ return { error: "Invalid accessToken: " + accessToken };
6492
+ }
6493
+ if (!identitySecret || typeof identitySecret !== "string") {
6494
+ return { error: "Invalid identitySecret: " + identitySecret };
6495
+ }
6496
+
6437
6497
  let error = null;
6438
6498
  for (const cookie of this._cookies) {
6439
6499
  try {
@@ -6465,7 +6525,43 @@ export default class SteamUser {
6465
6525
  return { error };
6466
6526
  }
6467
6527
 
6528
+ async enableTwoFactor(accessToken) {
6529
+ if (!accessToken || typeof accessToken !== "string") {
6530
+ return { error: "Invalid accessToken: " + accessToken };
6531
+ }
6532
+
6533
+ let error = null;
6534
+ for (const cookie of this._cookies) {
6535
+ try {
6536
+ const community = new SteamCommunity();
6537
+ community.setCookies(cookie.toString().split(";"));
6538
+ community.oAuthToken = accessToken;
6539
+ try {
6540
+ community.setMobileAppAccessToken(accessToken);
6541
+ } catch (e) {}
6542
+ const response = await new Promise((resolve) => {
6543
+ community.enableTwoFactor((error, response) => {
6544
+ resolve({ error, response });
6545
+ });
6546
+ });
6547
+ if (!response.error) {
6548
+ return { ...response, success: true };
6549
+ } else {
6550
+ error = response.error;
6551
+ }
6552
+ } catch (e) {}
6553
+ }
6554
+ return { error };
6555
+ }
6556
+
6468
6557
  async finalizeTwoFactor(accessToken, identitySecret, finalizeTwoFactorCode) {
6558
+ if (!accessToken || typeof accessToken !== "string") {
6559
+ return { error: "Invalid accessToken: " + accessToken };
6560
+ }
6561
+ if (!identitySecret || typeof identitySecret !== "string") {
6562
+ return { error: "Invalid identitySecret: " + identitySecret };
6563
+ }
6564
+
6469
6565
  let error = null;
6470
6566
  for (const cookie of this._cookies) {
6471
6567
  try {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.64",
3
+ "version": "1.3.66",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",
7
- "axios": "^1.6.7",
7
+ "axios": "^1.6.8",
8
8
  "bytebuffer": "^5.0.1",
9
9
  "cheerio": "^1.0.0-rc.12",
10
10
  "crypto-js": "^4.2.0",