steamutils 1.3.64 → 1.3.66
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +12 -10
- package/index.js +96 -0
- package/package.json +2 -2
- package/protos/csgo/base_gcmessages.proto +553 -0
- package/protos/csgo/connectionless_netmessages.proto +0 -2
- package/protos/csgo/cs_gameevents.proto +1 -0
- package/protos/csgo/cstrike15_gcmessages.proto +41 -12
- package/protos/csgo/cstrike15_usermessages.proto +0 -4
- package/protos/csgo/demo.proto +5 -0
- package/protos/csgo/econ_gcmessages.proto +0 -9
- package/protos/csgo/gcsdk_gcmessages.proto +2 -2
- package/protos/csgo/gcsystemmsgs.proto +1 -0
- package/protos/csgo/netmessages.proto +22 -8
- package/protos/csgo/networkbasetypes.proto +2 -0
- package/protos/csgo/steammessages.proto +23 -0
- package/protos/csgo/usercmd.proto +2 -1
- package/protos/csgo/usermessages.proto +31 -0
- package/protos/steam/enums.proto +58 -1
- package/protos/steam/enums_clientserver.proto +3 -34
- package/protos/steam/enums_productinfo.proto +1 -0
- package/protos/steam/htmlmessages.proto +12 -0
- package/protos/steam/steamdatagram_messages_sdr.proto +1 -1
- package/protos/steam/steammessages_accounthardware.steamclient.proto +18 -52
- package/protos/steam/steammessages_appoverview.proto +18 -1
- package/protos/steam/steammessages_auth.steamclient.proto +128 -188
- package/protos/steam/steammessages_base.proto +3 -0
- package/protos/steam/steammessages_broadcast.steamclient.proto +126 -267
- package/protos/steam/steammessages_chat.steamclient.proto +79 -290
- package/protos/steam/steammessages_client_objects.proto +4 -0
- package/protos/steam/steammessages_clientlanp2p.proto +1 -0
- package/protos/steam/steammessages_clientmetrics.steamclient.proto +0 -2
- package/protos/steam/steammessages_clientnotificationtypes.proto +19 -0
- package/protos/steam/steammessages_clientserver_2.proto +11 -0
- package/protos/steam/steammessages_clientserver_login.proto +1 -1
- package/protos/steam/steammessages_clientserver_mms.proto +228 -235
- package/protos/steam/steammessages_clientserver_ucm.proto +2 -0
- package/protos/steam/steammessages_clientserver_uds.proto +1 -0
- package/protos/steam/steammessages_clientserver_ufs.proto +0 -127
- package/protos/steam/steammessages_clientsettings.proto +46 -6
- package/protos/steam/steammessages_cloud.steamclient.proto +158 -249
- package/protos/steam/steammessages_contentsystem.steamclient.proto +16 -8
- package/protos/steam/steammessages_credentials.steamclient.proto +7 -26
- package/protos/steam/steammessages_datapublisher.steamclient.proto +30 -44
- package/protos/steam/steammessages_depotbuilder.steamclient.proto +6 -25
- package/protos/steam/steammessages_deviceauth.steamclient.proto +11 -45
- package/protos/steam/steammessages_econ.steamclient.proto +12 -25
- package/protos/steam/steammessages_familygroups.steamclient.proto +441 -0
- package/protos/steam/steammessages_friendmessages.steamclient.proto +19 -46
- package/protos/steam/steammessages_gamenetworking.steamclient.proto +2 -9
- package/protos/steam/steammessages_gamenotifications.steamclient.proto +57 -82
- package/protos/steam/steammessages_gameservers.steamclient.proto +13 -29
- package/protos/steam/steammessages_inventory.steamclient.proto +21 -73
- package/protos/steam/steammessages_linkfilter.steamclient.proto +14 -24
- package/protos/steam/steammessages_lobbymatchmaking.steamclient.proto +1 -5
- package/protos/steam/steammessages_market.steamclient.proto +9 -13
- package/protos/steam/steammessages_marketingmessages.steamclient.proto +59 -60
- package/protos/steam/steammessages_offline.steamclient.proto +2 -9
- package/protos/steam/steammessages_parental.steamclient.proto +100 -66
- package/protos/steam/steammessages_parties.steamclient.proto +6 -25
- package/protos/steam/steammessages_partnerapps.steamclient.proto +11 -43
- package/protos/steam/steammessages_player.steamclient.proto +133 -278
- package/protos/steam/steammessages_publishedfile.steamclient.proto +213 -289
- package/protos/steam/steammessages_qms.steamclient.proto +4 -18
- package/protos/steam/steammessages_remoteclient.proto +2 -1
- package/protos/steam/steammessages_remoteclient_discovery.proto +9 -0
- package/protos/steam/steammessages_remoteclient_service.steamclient.proto +18 -73
- package/protos/steam/steammessages_remoteplay.proto +1 -2
- package/protos/steam/steammessages_secrets.steamclient.proto +1 -5
- package/protos/steam/steammessages_shader.steamclient.proto +6 -25
- package/protos/steam/steammessages_site_license.steamclient.proto +8 -33
- package/protos/steam/steammessages_steamtv.steamclient.proto +169 -266
- package/protos/steam/steammessages_store.steamclient.proto +110 -77
- package/protos/steam/steammessages_storebrowse.steamclient.proto +170 -115
- package/protos/steam/steammessages_timedtrial.steamclient.proto +3 -13
- package/protos/steam/steammessages_twofactor.steamclient.proto +92 -121
- package/protos/steam/steammessages_unified_base.steamclient.proto +12 -0
- package/protos/steam/steammessages_unified_test.steamclient.proto +10 -20
- package/protos/steam/steammessages_useraccount.steamclient.proto +26 -64
- package/protos/steam/steammessages_vac.steamclient.proto +2 -9
- package/protos/steam/steammessages_video.steamclient.proto +25 -128
- package/protos/steam/steammessages_workshop.steamclient.proto +1 -5
- package/protos/steam/webuimessages_achievements.proto +29 -0
- package/protos/steam/webuimessages_gamescope.proto +57 -0
- package/protos/steam/webuimessages_steamengine.proto +9 -0
- package/protos/steam/webuimessages_steamos.proto +114 -0
- package/protos/steam/webuimessages_transport.proto +4 -0
- package/protos/steam/webuimessages_transportvalidation.proto +14 -0
- package/test_steamclient.js +4 -3
- package/protos/csgo/steammessages_steamlearn.steamworkssdk.proto +0 -357
- package/protos/steam/renderer/rendermessages.proto +0 -893
- package/protos/steam/steammessages_star.steamclient.proto +0 -64
- package/protos/webui/common.proto +0 -5508
- package/protos/webui/common_base.proto +0 -27
- package/protos/webui/service_accountlinking.proto +0 -27
- package/protos/webui/service_accountprivacy.proto +0 -42
- package/protos/webui/service_auction.proto +0 -97
- package/protos/webui/service_authentication.proto +0 -222
- package/protos/webui/service_authenticationsupport.proto +0 -74
- package/protos/webui/service_broadcast.proto +0 -562
- package/protos/webui/service_chat.proto +0 -11
- package/protos/webui/service_chatroom.proto +0 -810
- package/protos/webui/service_chatusability.proto +0 -107
- package/protos/webui/service_clan.proto +0 -41
- package/protos/webui/service_clanchatrooms.proto +0 -25
- package/protos/webui/service_clanfaqs.proto +0 -202
- package/protos/webui/service_clientcomm.proto +0 -150
- package/protos/webui/service_clientmetrics.proto +0 -63
- package/protos/webui/service_cloud.proto +0 -222
- package/protos/webui/service_cloudconfigstore.proto +0 -51
- package/protos/webui/service_cloudgaming.proto +0 -30
- package/protos/webui/service_community.proto +0 -365
- package/protos/webui/service_econ.proto +0 -134
- package/protos/webui/service_embedded.proto +0 -24
- package/protos/webui/service_experimentservice.proto +0 -6
- package/protos/webui/service_fovasvideo.proto +0 -15
- package/protos/webui/service_friendmessages.proto +0 -133
- package/protos/webui/service_friendslist.proto +0 -70
- package/protos/webui/service_gamenotes.proto +0 -15
- package/protos/webui/service_helprequestlogs.proto +0 -26
- package/protos/webui/service_loyaltyrewards.proto +0 -252
- package/protos/webui/service_marketingmessages.proto +0 -184
- package/protos/webui/service_mobileapp.proto +0 -18
- package/protos/webui/service_mobileauth.proto +0 -24
- package/protos/webui/service_mobiledevice.proto +0 -26
- package/protos/webui/service_mobileperaccount.proto +0 -31
- package/protos/webui/service_news.proto +0 -101
- package/protos/webui/service_parental.proto +0 -178
- package/protos/webui/service_partnermembershipinvite.proto +0 -29
- package/protos/webui/service_partnerstorebrowse.proto +0 -6
- package/protos/webui/service_phone.proto +0 -51
- package/protos/webui/service_physicalgoods.proto +0 -15
- package/protos/webui/service_player.proto +0 -885
- package/protos/webui/service_promotioneventinvites.proto +0 -50
- package/protos/webui/service_promotionplanning.proto +0 -72
- package/protos/webui/service_publishedfile.proto +0 -687
- package/protos/webui/service_publishing.proto +0 -119
- package/protos/webui/service_quest.proto +0 -127
- package/protos/webui/service_salefeature.proto +0 -315
- package/protos/webui/service_saleitemrewards.proto +0 -54
- package/protos/webui/service_shoppingcart.proto +0 -108
- package/protos/webui/service_steamawards.proto +0 -19
- package/protos/webui/service_steamcharts.proto +0 -75
- package/protos/webui/service_steamengine.proto +0 -36
- package/protos/webui/service_steamlearn.proto +0 -727
- package/protos/webui/service_steamnotification.proto +0 -84
- package/protos/webui/service_steamtv.proto +0 -495
- package/protos/webui/service_steamvrvoicechat.proto +0 -67
- package/protos/webui/service_steamvrwebrtc.proto +0 -48
- package/protos/webui/service_storagedevicemanager.proto +0 -104
- package/protos/webui/service_store.proto +0 -289
- package/protos/webui/service_storeappsimilarity.proto +0 -76
- package/protos/webui/service_storebrowse.proto +0 -73
- package/protos/webui/service_storequery.proto +0 -97
- package/protos/webui/service_storesales.proto +0 -15
- package/protos/webui/service_storetopsellers.proto +0 -44
- package/protos/webui/service_systemmanager.proto +0 -11
- package/protos/webui/service_test_transporterror.proto +0 -6
- package/protos/webui/service_transportauth.proto +0 -12
- package/protos/webui/service_transportvalidation.proto +0 -69
- package/protos/webui/service_twofactor.proto +0 -181
- package/protos/webui/service_useraccount.proto +0 -138
- package/protos/webui/service_usergameactivity.proto +0 -34
- package/protos/webui/service_usergamenotes.proto +0 -53
- package/protos/webui/service_usernews.proto +0 -68
- package/protos/webui/service_userreviews.proto +0 -96
- package/protos/webui/service_video.proto +0 -128
- package/protos/webui/service_voicechat.proto +0 -139
- 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
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
steamClient.uploadRichPresence(appid,
|
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.
|
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
|
+
"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",
|