@voxary/valorant-client 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +119 -3
- package/dist/index.cjs +1495 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6308 -0
- package/dist/index.d.ts +6308 -0
- package/dist/index.js +1439 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -6
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1495 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/index.ts
|
|
32
|
+
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
|
+
MissingContextError: () => MissingContextError,
|
|
35
|
+
MissingParameterError: () => MissingParameterError,
|
|
36
|
+
ValorantApiError: () => ValorantApiError,
|
|
37
|
+
ValorantAuthError: () => ValorantAuthError,
|
|
38
|
+
ValorantClient: () => ValorantClient,
|
|
39
|
+
ValorantContext: () => ValorantContext,
|
|
40
|
+
ValorantError: () => ValorantError,
|
|
41
|
+
ValorantNetworkError: () => ValorantNetworkError,
|
|
42
|
+
ValorantRateLimitError: () => ValorantRateLimitError,
|
|
43
|
+
ValorantValidationError: () => ValorantValidationError,
|
|
44
|
+
fetchTransport: () => fetchTransport,
|
|
45
|
+
isRegion: () => isRegion,
|
|
46
|
+
localTransport: () => localTransport,
|
|
47
|
+
parseAuthRedirect: () => parseAuthRedirect,
|
|
48
|
+
parseLockfile: () => parseLockfile,
|
|
49
|
+
readLockfile: () => readLockfile,
|
|
50
|
+
registry: () => registry,
|
|
51
|
+
shardForRegion: () => shardForRegion
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(index_exports);
|
|
54
|
+
|
|
55
|
+
// src/client.ts
|
|
56
|
+
var import_zod4 = require("zod");
|
|
57
|
+
|
|
58
|
+
// src/api/registry.ts
|
|
59
|
+
var import_valorant_api_types = require("valorant-api-types");
|
|
60
|
+
|
|
61
|
+
// src/extra/catalog.ts
|
|
62
|
+
var import_zod = require("zod");
|
|
63
|
+
|
|
64
|
+
// src/envelope.ts
|
|
65
|
+
var enveloped = /* @__PURE__ */ new WeakSet();
|
|
66
|
+
function markEnveloped(endpoint2) {
|
|
67
|
+
enveloped.add(endpoint2);
|
|
68
|
+
return endpoint2;
|
|
69
|
+
}
|
|
70
|
+
function unwrapEnvelope(endpoint2, body) {
|
|
71
|
+
if (enveloped.has(endpoint2) && typeof body === "object" && body !== null && "data" in body) {
|
|
72
|
+
return body.data;
|
|
73
|
+
}
|
|
74
|
+
return body;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// src/extra/catalog.ts
|
|
78
|
+
var BASE = "https://valorant-api.com/v1/";
|
|
79
|
+
var text = import_zod.z.string().nullish();
|
|
80
|
+
var asset = import_zod.z.object({
|
|
81
|
+
uuid: import_zod.z.string(),
|
|
82
|
+
displayName: text,
|
|
83
|
+
displayIcon: text,
|
|
84
|
+
assetPath: text
|
|
85
|
+
}).passthrough();
|
|
86
|
+
var agentSchema = asset.extend({
|
|
87
|
+
description: text,
|
|
88
|
+
developerName: text,
|
|
89
|
+
characterTags: import_zod.z.array(import_zod.z.string()).nullish(),
|
|
90
|
+
displayIconSmall: text,
|
|
91
|
+
bustPortrait: text,
|
|
92
|
+
fullPortrait: text,
|
|
93
|
+
killfeedPortrait: text,
|
|
94
|
+
background: text,
|
|
95
|
+
isPlayableCharacter: import_zod.z.boolean(),
|
|
96
|
+
role: import_zod.z.object({ uuid: import_zod.z.string(), displayName: text, description: text, displayIcon: text }).passthrough().nullish(),
|
|
97
|
+
abilities: import_zod.z.array(import_zod.z.object({ slot: import_zod.z.string(), displayName: text, description: text, displayIcon: text }).passthrough()).nullish()
|
|
98
|
+
});
|
|
99
|
+
var mapSchema = asset.extend({
|
|
100
|
+
coordinates: text,
|
|
101
|
+
listViewIcon: text,
|
|
102
|
+
splash: text,
|
|
103
|
+
mapUrl: text,
|
|
104
|
+
xMultiplier: import_zod.z.number(),
|
|
105
|
+
yMultiplier: import_zod.z.number(),
|
|
106
|
+
xScalarToAdd: import_zod.z.number(),
|
|
107
|
+
yScalarToAdd: import_zod.z.number(),
|
|
108
|
+
callouts: import_zod.z.array(import_zod.z.object({ regionName: import_zod.z.string(), superRegionName: import_zod.z.string(), location: import_zod.z.object({ x: import_zod.z.number(), y: import_zod.z.number() }) }).passthrough()).nullish()
|
|
109
|
+
});
|
|
110
|
+
var weaponSchema = asset.extend({
|
|
111
|
+
category: import_zod.z.string(),
|
|
112
|
+
defaultSkinUuid: import_zod.z.string(),
|
|
113
|
+
killStreamIcon: text,
|
|
114
|
+
weaponStats: import_zod.z.object({}).passthrough().nullish(),
|
|
115
|
+
shopData: import_zod.z.object({}).passthrough().nullish(),
|
|
116
|
+
skins: import_zod.z.array(import_zod.z.object({}).passthrough())
|
|
117
|
+
});
|
|
118
|
+
var skinSchema = asset.extend({
|
|
119
|
+
themeUuid: import_zod.z.string(),
|
|
120
|
+
contentTierUuid: text,
|
|
121
|
+
wallpaper: text,
|
|
122
|
+
chromas: import_zod.z.array(asset.passthrough()),
|
|
123
|
+
levels: import_zod.z.array(asset.passthrough())
|
|
124
|
+
});
|
|
125
|
+
var seasonSchema = import_zod.z.object({
|
|
126
|
+
uuid: import_zod.z.string(),
|
|
127
|
+
displayName: text,
|
|
128
|
+
type: text,
|
|
129
|
+
startTime: import_zod.z.string(),
|
|
130
|
+
endTime: import_zod.z.string(),
|
|
131
|
+
parentUuid: text,
|
|
132
|
+
assetPath: text
|
|
133
|
+
}).passthrough();
|
|
134
|
+
var versionSchema = import_zod.z.object({
|
|
135
|
+
manifestId: import_zod.z.string(),
|
|
136
|
+
branch: import_zod.z.string(),
|
|
137
|
+
version: import_zod.z.string(),
|
|
138
|
+
buildVersion: import_zod.z.string(),
|
|
139
|
+
engineVersion: import_zod.z.string(),
|
|
140
|
+
riotClientVersion: import_zod.z.string().describe("Value of the X-Riot-ClientVersion header"),
|
|
141
|
+
riotClientBuild: import_zod.z.string(),
|
|
142
|
+
buildDate: import_zod.z.string()
|
|
143
|
+
}).passthrough();
|
|
144
|
+
function query(extra = []) {
|
|
145
|
+
return new Map([
|
|
146
|
+
["language", import_zod.z.string().optional().describe("Language code such as `fr-FR`. Defaults to `en-US`.")],
|
|
147
|
+
...extra
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
function endpoint(name, description, path, schema, extra = []) {
|
|
151
|
+
return markEnveloped({
|
|
152
|
+
name,
|
|
153
|
+
description,
|
|
154
|
+
category: "Valorant-API.com",
|
|
155
|
+
type: "other",
|
|
156
|
+
suffix: `${BASE}${path}`,
|
|
157
|
+
query: query(extra),
|
|
158
|
+
responses: { "200": schema }
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function collection(title, singular, path, schema, extra = []) {
|
|
162
|
+
return {
|
|
163
|
+
list: endpoint(title, `List of ${title.toLowerCase()}`, path, import_zod.z.array(schema), extra),
|
|
164
|
+
one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}`, schema)
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
var playable = [["isPlayableCharacter", import_zod.z.boolean().optional().describe("Only return playable agents. Skips the duplicate Sova.")]];
|
|
168
|
+
var agents = collection("Agents", "Agent", "agents", agentSchema, playable);
|
|
169
|
+
var buddies = collection("Buddies", "Buddy", "buddies", asset);
|
|
170
|
+
var buddyLevels = collection("Buddy Levels", "Buddy Level", "buddies/levels", asset);
|
|
171
|
+
var bundles = collection("Bundles", "Bundle", "bundles", asset);
|
|
172
|
+
var ceremonies = collection("Ceremonies", "Ceremony", "ceremonies", asset);
|
|
173
|
+
var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers", import_zod.z.object({ uuid: import_zod.z.string(), tiers: import_zod.z.array(import_zod.z.object({ tier: import_zod.z.number(), tierName: text, division: text, color: text }).passthrough()) }).passthrough());
|
|
174
|
+
var contentTiers = collection("Content Tiers", "Content Tier", "contenttiers", asset);
|
|
175
|
+
var contracts = collection("Contracts", "Contract", "contracts", asset);
|
|
176
|
+
var currencies = collection("Currencies", "Currency", "currencies", asset);
|
|
177
|
+
var events = collection("Events", "Event", "events", asset);
|
|
178
|
+
var flex = collection("Flex", "Flex Item", "flex", asset);
|
|
179
|
+
var gamemodes = collection("Gamemodes", "Gamemode", "gamemodes", asset);
|
|
180
|
+
var gamemodeEquippables = collection("Gamemode Equippables", "Gamemode Equippable", "gamemodes/equippables", asset);
|
|
181
|
+
var gear = collection("Gear", "Gear Item", "gear", asset);
|
|
182
|
+
var levelBorders = collection("Level Borders", "Level Border", "levelborders", asset);
|
|
183
|
+
var maps = collection("Maps", "Map", "maps", mapSchema);
|
|
184
|
+
var missions = collection("Missions", "Mission", "missions", import_zod.z.object({ uuid: import_zod.z.string(), displayName: text }).passthrough());
|
|
185
|
+
var playerCards = collection("Player Cards", "Player Card", "playercards", asset);
|
|
186
|
+
var playerTitles = collection("Player Titles", "Player Title", "playertitles", import_zod.z.object({ uuid: import_zod.z.string(), displayName: text, titleText: text }).passthrough());
|
|
187
|
+
var seasons = collection("Seasons", "Season", "seasons", seasonSchema);
|
|
188
|
+
var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive", import_zod.z.object({ uuid: import_zod.z.string(), seasonUuid: import_zod.z.string(), startTime: import_zod.z.string(), endTime: import_zod.z.string() }).passthrough());
|
|
189
|
+
var sprays = collection("Sprays", "Spray", "sprays", asset);
|
|
190
|
+
var sprayLevels = collection("Spray Levels", "Spray Level", "sprays/levels", asset);
|
|
191
|
+
var themes = collection("Themes", "Theme", "themes", asset);
|
|
192
|
+
var weapons = collection("Weapons", "Weapon", "weapons", weaponSchema);
|
|
193
|
+
var weaponSkins = collection("Weapon Skins", "Weapon Skin", "weapons/skins", skinSchema);
|
|
194
|
+
var weaponSkinChromas = collection("Weapon Skin Chromas", "Weapon Skin Chroma", "weapons/skinchromas", asset);
|
|
195
|
+
var weaponSkinLevels = collection("Weapon Skin Levels", "Weapon Skin Level", "weapons/skinlevels", asset);
|
|
196
|
+
var catalogEndpoints = {
|
|
197
|
+
agents: agents.list,
|
|
198
|
+
agent: agents.one,
|
|
199
|
+
buddies: buddies.list,
|
|
200
|
+
buddy: buddies.one,
|
|
201
|
+
buddyLevels: buddyLevels.list,
|
|
202
|
+
buddyLevel: buddyLevels.one,
|
|
203
|
+
bundles: bundles.list,
|
|
204
|
+
bundle: bundles.one,
|
|
205
|
+
ceremonies: ceremonies.list,
|
|
206
|
+
ceremony: ceremonies.one,
|
|
207
|
+
competitiveTiers: competitiveTiers.list,
|
|
208
|
+
competitiveTier: competitiveTiers.one,
|
|
209
|
+
contentTiers: contentTiers.list,
|
|
210
|
+
contentTier: contentTiers.one,
|
|
211
|
+
contracts: contracts.list,
|
|
212
|
+
contract: contracts.one,
|
|
213
|
+
currencies: currencies.list,
|
|
214
|
+
currency: currencies.one,
|
|
215
|
+
events: events.list,
|
|
216
|
+
event: events.one,
|
|
217
|
+
flex: flex.list,
|
|
218
|
+
flexItem: flex.one,
|
|
219
|
+
gamemodes: gamemodes.list,
|
|
220
|
+
gamemode: gamemodes.one,
|
|
221
|
+
gamemodeEquippables: gamemodeEquippables.list,
|
|
222
|
+
gamemodeEquippable: gamemodeEquippables.one,
|
|
223
|
+
gear: gear.list,
|
|
224
|
+
gearItem: gear.one,
|
|
225
|
+
levelBorders: levelBorders.list,
|
|
226
|
+
levelBorder: levelBorders.one,
|
|
227
|
+
maps: maps.list,
|
|
228
|
+
map: maps.one,
|
|
229
|
+
missions: missions.list,
|
|
230
|
+
mission: missions.one,
|
|
231
|
+
playerCards: playerCards.list,
|
|
232
|
+
playerCard: playerCards.one,
|
|
233
|
+
playerTitles: playerTitles.list,
|
|
234
|
+
playerTitle: playerTitles.one,
|
|
235
|
+
seasons: seasons.list,
|
|
236
|
+
season: seasons.one,
|
|
237
|
+
competitiveSeasons: competitiveSeasons.list,
|
|
238
|
+
competitiveSeason: competitiveSeasons.one,
|
|
239
|
+
sprays: sprays.list,
|
|
240
|
+
spray: sprays.one,
|
|
241
|
+
sprayLevels: sprayLevels.list,
|
|
242
|
+
sprayLevel: sprayLevels.one,
|
|
243
|
+
themes: themes.list,
|
|
244
|
+
theme: themes.one,
|
|
245
|
+
version: endpoint("Version", "Current game version and the matching client version", "version", versionSchema),
|
|
246
|
+
weapons: weapons.list,
|
|
247
|
+
weapon: weapons.one,
|
|
248
|
+
weaponSkins: weaponSkins.list,
|
|
249
|
+
weaponSkin: weaponSkins.one,
|
|
250
|
+
weaponSkinChromas: weaponSkinChromas.list,
|
|
251
|
+
weaponSkinChroma: weaponSkinChromas.one,
|
|
252
|
+
weaponSkinLevels: weaponSkinLevels.list,
|
|
253
|
+
weaponSkinLevel: weaponSkinLevels.one
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// src/extra/riot.ts
|
|
257
|
+
var import_zod2 = require("zod");
|
|
258
|
+
var contractsActiveStoryEndpoint = {
|
|
259
|
+
name: "Active Story",
|
|
260
|
+
description: "Get the battlepass contracts",
|
|
261
|
+
queryName: "ContractDefinitions_FetchActiveStory",
|
|
262
|
+
category: "Contract Endpoints",
|
|
263
|
+
type: "pd",
|
|
264
|
+
suffix: "contract-definitions/v2/definitions/story",
|
|
265
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
266
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
267
|
+
};
|
|
268
|
+
var currentGameAllChatTokenEndpoint = {
|
|
269
|
+
name: "All Chat Token",
|
|
270
|
+
description: "Get a token for all chat",
|
|
271
|
+
queryName: "CoreGame_FetchAllChatMUCToken",
|
|
272
|
+
category: "Current Game Endpoints",
|
|
273
|
+
type: "glz",
|
|
274
|
+
suffix: "core-game/v1/matches/{in-progress match id}/allchatmuctoken",
|
|
275
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
276
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
277
|
+
};
|
|
278
|
+
var currentGameTeamChatTokenEndpoint = {
|
|
279
|
+
name: "Team Chat Token",
|
|
280
|
+
description: "Get a token for team chat",
|
|
281
|
+
queryName: "CoreGame_FetchTeamChatMUCToken",
|
|
282
|
+
category: "Current Game Endpoints",
|
|
283
|
+
type: "glz",
|
|
284
|
+
suffix: "core-game/v1/matches/{in-progress match id}/teamchatmuctoken",
|
|
285
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
286
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
287
|
+
};
|
|
288
|
+
var localAntiAddictionShutdownEndpoint = {
|
|
289
|
+
name: "Anti Addiction Shutdown",
|
|
290
|
+
description: "GET ANTI_ADDICTION_RNet_FetchShutdownPolicyState",
|
|
291
|
+
queryName: "ANTI_ADDICTION_RNet_FetchShutdownPolicyState",
|
|
292
|
+
category: "Local Endpoints",
|
|
293
|
+
type: "local",
|
|
294
|
+
suffix: "anti-addiction/v1/products/valorant/policies/shutdown/anti-addiction-state",
|
|
295
|
+
riotRequirements: { localAuth: true },
|
|
296
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
297
|
+
};
|
|
298
|
+
var localAntiAddictionWarningEndpoint = {
|
|
299
|
+
name: "Anti Addiction Warning",
|
|
300
|
+
description: "GET ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState",
|
|
301
|
+
queryName: "ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState",
|
|
302
|
+
category: "Local Endpoints",
|
|
303
|
+
type: "local",
|
|
304
|
+
suffix: "anti-addiction/v1/products/valorant/policies/warningMessage/anti-addiction-state",
|
|
305
|
+
riotRequirements: { localAuth: true },
|
|
306
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
307
|
+
};
|
|
308
|
+
var localClientConfigEndpoint = {
|
|
309
|
+
name: "Client Config",
|
|
310
|
+
description: "GET CLIENTCONFIG_RNET_GET_ValorantClientConfig",
|
|
311
|
+
queryName: "CLIENTCONFIG_RNET_GET_ValorantClientConfig",
|
|
312
|
+
category: "Local Endpoints",
|
|
313
|
+
type: "local",
|
|
314
|
+
suffix: "client-config/v2/namespace/valorant.client/player",
|
|
315
|
+
riotRequirements: { localAuth: true },
|
|
316
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
317
|
+
};
|
|
318
|
+
var localEulaEndpoint = {
|
|
319
|
+
name: "Eula",
|
|
320
|
+
description: "Get the EULA",
|
|
321
|
+
queryName: "LEGAL_INFO_RNet_EULA",
|
|
322
|
+
category: "Local Endpoints",
|
|
323
|
+
type: "local",
|
|
324
|
+
suffix: "eula/v1/agreement/content",
|
|
325
|
+
riotRequirements: { localAuth: true },
|
|
326
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
327
|
+
};
|
|
328
|
+
var localPrivacyPolicyEndpoint = {
|
|
329
|
+
name: "Privacy Policy",
|
|
330
|
+
description: "Get privacy policy",
|
|
331
|
+
queryName: "LEGAL_INFO_RNet_Privacy",
|
|
332
|
+
category: "Local Endpoints",
|
|
333
|
+
type: "local",
|
|
334
|
+
suffix: "eula/v1/privacy-policy/content",
|
|
335
|
+
riotRequirements: { localAuth: true },
|
|
336
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
337
|
+
};
|
|
338
|
+
var localAvailableLocalesEndpoint = {
|
|
339
|
+
name: "Available Locales",
|
|
340
|
+
description: "Get available locales",
|
|
341
|
+
queryName: "LOCALE_RNet_FetchAvailableLocales",
|
|
342
|
+
category: "Local Endpoints",
|
|
343
|
+
type: "local",
|
|
344
|
+
suffix: "rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live",
|
|
345
|
+
riotRequirements: { localAuth: true },
|
|
346
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
347
|
+
};
|
|
348
|
+
var localLocaleEndpoint = {
|
|
349
|
+
name: "Locale",
|
|
350
|
+
description: "Get the current locale",
|
|
351
|
+
queryName: "LOCALE_RNet_FetchLocale",
|
|
352
|
+
category: "Local Endpoints",
|
|
353
|
+
type: "local",
|
|
354
|
+
suffix: "riotclient/product-locales/products/valorant/patchlines/live",
|
|
355
|
+
riotRequirements: { localAuth: true },
|
|
356
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
357
|
+
};
|
|
358
|
+
var localReporterFeedbackEndpoint = {
|
|
359
|
+
name: "Reporter Feedback",
|
|
360
|
+
description: "GET REPORTER_FEEDBACK_RNet_GetReporterFeedback",
|
|
361
|
+
queryName: "REPORTER_FEEDBACK_RNet_GetReporterFeedback",
|
|
362
|
+
category: "Local Endpoints",
|
|
363
|
+
type: "local",
|
|
364
|
+
suffix: "player-reporting/v1/reporter-feedback",
|
|
365
|
+
riotRequirements: { localAuth: true },
|
|
366
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
367
|
+
};
|
|
368
|
+
var localCommandLineArgsEndpoint = {
|
|
369
|
+
name: "Command Line Args",
|
|
370
|
+
description: "Gets the command-line args provided to the Riot client",
|
|
371
|
+
queryName: "Riot Client Command-Line Args",
|
|
372
|
+
category: "Local Endpoints",
|
|
373
|
+
type: "local",
|
|
374
|
+
suffix: "riotclient/command-line-args",
|
|
375
|
+
riotRequirements: { localAuth: true },
|
|
376
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
377
|
+
};
|
|
378
|
+
var localRiotStatusEndpoint = {
|
|
379
|
+
name: "Riot Status",
|
|
380
|
+
description: "Get game status information such as maintenances and incidents Response is an escaped JSON string.",
|
|
381
|
+
queryName: "RiotStatus_RNet_FetchStatus",
|
|
382
|
+
category: "Local Endpoints",
|
|
383
|
+
type: "local",
|
|
384
|
+
suffix: "riot-status/v1/products/valorant/patchlines/live/deployments/{region}",
|
|
385
|
+
riotRequirements: { localAuth: true },
|
|
386
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
387
|
+
};
|
|
388
|
+
var localRiotWarningEndpoint = {
|
|
389
|
+
name: "Riot Warning",
|
|
390
|
+
description: "GET RIOT_WARNING_RNet_GetRiotWarning",
|
|
391
|
+
queryName: "RIOT_WARNING_RNet_GetRiotWarning",
|
|
392
|
+
category: "Local Endpoints",
|
|
393
|
+
type: "local",
|
|
394
|
+
suffix: "ga-warning/v1/warnings",
|
|
395
|
+
riotRequirements: { localAuth: true },
|
|
396
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
397
|
+
};
|
|
398
|
+
var localClientAuthorizationsEndpoint = {
|
|
399
|
+
name: "Client Authorizations",
|
|
400
|
+
description: "Gets tokens in use by the client",
|
|
401
|
+
queryName: "RSO_RNet_FetchClientAuthorizations",
|
|
402
|
+
category: "Local Endpoints",
|
|
403
|
+
type: "local",
|
|
404
|
+
suffix: "rso-auth/v2/authorizations/valorant-client",
|
|
405
|
+
riotRequirements: { localAuth: true },
|
|
406
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
407
|
+
};
|
|
408
|
+
var localAccessTokenEndpoint = {
|
|
409
|
+
name: "Access Token",
|
|
410
|
+
description: "Gets a Riot access token",
|
|
411
|
+
queryName: "RSO_RNet_GetAccessToken",
|
|
412
|
+
category: "Local Endpoints",
|
|
413
|
+
type: "local",
|
|
414
|
+
suffix: "rso-auth/v1/authorization/access-token",
|
|
415
|
+
riotRequirements: { localAuth: true },
|
|
416
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
417
|
+
};
|
|
418
|
+
var localUserInfoTokenEndpoint = {
|
|
419
|
+
name: "User Info Token",
|
|
420
|
+
description: "GET RSO_RNet_GetUserInfoToken",
|
|
421
|
+
queryName: "RSO_RNet_GetUserInfoToken",
|
|
422
|
+
category: "Local Endpoints",
|
|
423
|
+
type: "local",
|
|
424
|
+
suffix: "rso-auth/v1/userinfo/valorant-client",
|
|
425
|
+
riotRequirements: { localAuth: true },
|
|
426
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
427
|
+
};
|
|
428
|
+
var chatSettingsEndpoint = {
|
|
429
|
+
name: "Settings",
|
|
430
|
+
description: "Get chat settings",
|
|
431
|
+
queryName: "TEXT_CHAT_RNet_FetchSettings",
|
|
432
|
+
category: "Local Endpoints - Chat",
|
|
433
|
+
type: "local",
|
|
434
|
+
suffix: "chat/v1/settings",
|
|
435
|
+
riotRequirements: { localAuth: true },
|
|
436
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
437
|
+
};
|
|
438
|
+
var chatTournamentInfoEndpoint = {
|
|
439
|
+
name: "Tournament Info",
|
|
440
|
+
description: "Get in-tournament conversations",
|
|
441
|
+
queryName: "TEXT_CHAT_RNet_GetMUCInfos - tournaments",
|
|
442
|
+
category: "Local Endpoints - Chat",
|
|
443
|
+
type: "local",
|
|
444
|
+
suffix: "chat/v6/conversations/ares-tournaments",
|
|
445
|
+
riotRequirements: { localAuth: true },
|
|
446
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
447
|
+
};
|
|
448
|
+
var localPluginStatusEndpoint = {
|
|
449
|
+
name: "Plugin Status",
|
|
450
|
+
description: "Gets plugin status",
|
|
451
|
+
queryName: "URNetClient_CheckPluginStatus",
|
|
452
|
+
category: "Local Endpoints",
|
|
453
|
+
type: "local",
|
|
454
|
+
suffix: "plugin-manager/v1/status",
|
|
455
|
+
riotRequirements: { localAuth: true },
|
|
456
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
457
|
+
};
|
|
458
|
+
var localRmsSessionEndpoint = {
|
|
459
|
+
name: "Rms Session",
|
|
460
|
+
description: "Gets the token for Riot Messaging Service",
|
|
461
|
+
queryName: "URNetClient_CheckRMSSession",
|
|
462
|
+
category: "Local Endpoints",
|
|
463
|
+
type: "local",
|
|
464
|
+
suffix: "riot-messaging-service/v1/session",
|
|
465
|
+
riotRequirements: { localAuth: true },
|
|
466
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
467
|
+
};
|
|
468
|
+
var localProcessInfoEndpoint = {
|
|
469
|
+
name: "Process Info",
|
|
470
|
+
description: "Gets the Valorant process ID",
|
|
471
|
+
queryName: "URNetClient_GetProcessInfo",
|
|
472
|
+
category: "Local Endpoints",
|
|
473
|
+
type: "local",
|
|
474
|
+
suffix: "process-control/v1/process",
|
|
475
|
+
riotRequirements: { localAuth: true },
|
|
476
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
477
|
+
};
|
|
478
|
+
var localLogPathEndpoint = {
|
|
479
|
+
name: "Log Path",
|
|
480
|
+
description: "Gets the Valorant log path",
|
|
481
|
+
queryName: "Valorant Log Path",
|
|
482
|
+
category: "Local Endpoints",
|
|
483
|
+
type: "local",
|
|
484
|
+
suffix: "product-session/v1/logs/path/VALORANT",
|
|
485
|
+
riotRequirements: { localAuth: true },
|
|
486
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
487
|
+
};
|
|
488
|
+
var voiceAudioPropertiesEndpoint = {
|
|
489
|
+
name: "Audio Properties",
|
|
490
|
+
description: "Get audio properties such as if the microphone is in use",
|
|
491
|
+
queryName: "VOICE_CHAT_RNet_FetchAudioProperties",
|
|
492
|
+
category: "Local Endpoints - Voice",
|
|
493
|
+
type: "local",
|
|
494
|
+
suffix: "voice-chat/v1/audio-properties",
|
|
495
|
+
riotRequirements: { localAuth: true },
|
|
496
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
497
|
+
};
|
|
498
|
+
var voiceCaptureDevicesEndpoint = {
|
|
499
|
+
name: "Capture Devices",
|
|
500
|
+
description: "Get microphone input device info",
|
|
501
|
+
queryName: "VOICE_CHAT_RNet_FetchCaptureDevices",
|
|
502
|
+
category: "Local Endpoints - Voice",
|
|
503
|
+
type: "local",
|
|
504
|
+
suffix: "voice-chat/v2/devices/capture",
|
|
505
|
+
riotRequirements: { localAuth: true },
|
|
506
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
507
|
+
};
|
|
508
|
+
var voicePushToTalkEndpoint = {
|
|
509
|
+
name: "Push To Talk",
|
|
510
|
+
description: "GET VOICE_CHAT_RNet_FetchPTTSettings",
|
|
511
|
+
queryName: "VOICE_CHAT_RNet_FetchPTTSettings",
|
|
512
|
+
category: "Local Endpoints - Voice",
|
|
513
|
+
type: "local",
|
|
514
|
+
suffix: "voice-chat/v2/push-to-talk/valorant",
|
|
515
|
+
riotRequirements: { localAuth: true },
|
|
516
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
517
|
+
};
|
|
518
|
+
var voiceRenderDevicesEndpoint = {
|
|
519
|
+
name: "Render Devices",
|
|
520
|
+
description: "Get audio output devices",
|
|
521
|
+
queryName: "VOICE_CHAT_RNet_FetchRenderDevices",
|
|
522
|
+
category: "Local Endpoints - Voice",
|
|
523
|
+
type: "local",
|
|
524
|
+
suffix: "voice-chat/v2/devices/render",
|
|
525
|
+
riotRequirements: { localAuth: true },
|
|
526
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
527
|
+
};
|
|
528
|
+
var voiceSessionsEndpoint = {
|
|
529
|
+
name: "Sessions",
|
|
530
|
+
description: "GET VOICE_CHAT_RNet_FetchSessions",
|
|
531
|
+
queryName: "VOICE_CHAT_RNet_FetchSessions",
|
|
532
|
+
category: "Local Endpoints - Voice",
|
|
533
|
+
type: "local",
|
|
534
|
+
suffix: "voice-chat/v3/sessions/valorant",
|
|
535
|
+
riotRequirements: { localAuth: true },
|
|
536
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
537
|
+
};
|
|
538
|
+
var voiceSettingsEndpoint = {
|
|
539
|
+
name: "Settings",
|
|
540
|
+
description: "GET VOICE_CHAT_RNet_FetchSettings",
|
|
541
|
+
queryName: "VOICE_CHAT_RNet_FetchSettings",
|
|
542
|
+
category: "Local Endpoints - Voice",
|
|
543
|
+
type: "local",
|
|
544
|
+
suffix: "voice-chat/v3/settings/valorant",
|
|
545
|
+
riotRequirements: { localAuth: true },
|
|
546
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
547
|
+
};
|
|
548
|
+
var pregameChatTokenEndpoint = {
|
|
549
|
+
name: "Chat Token",
|
|
550
|
+
description: "Get a chat token",
|
|
551
|
+
queryName: "Pregame_FetchChatToken",
|
|
552
|
+
category: "Pre-Game Endpoints",
|
|
553
|
+
type: "glz",
|
|
554
|
+
suffix: "pregame/v1/matches/{pre-game match id}/chattoken",
|
|
555
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
556
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
557
|
+
};
|
|
558
|
+
var pregameVoiceTokenEndpoint = {
|
|
559
|
+
name: "Voice Token",
|
|
560
|
+
description: "Get a voice token",
|
|
561
|
+
queryName: "Pregame_FetchVoiceToken",
|
|
562
|
+
category: "Pre-Game Endpoints",
|
|
563
|
+
type: "glz",
|
|
564
|
+
suffix: "pregame/v1/matches/{pre-game match id}/voicetoken",
|
|
565
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
566
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
567
|
+
};
|
|
568
|
+
var sessionGetEndpoint = {
|
|
569
|
+
name: "Get",
|
|
570
|
+
description: "Get information about the current game session",
|
|
571
|
+
queryName: "Session_Get",
|
|
572
|
+
category: "Session Endpoints",
|
|
573
|
+
type: "glz",
|
|
574
|
+
suffix: "session/v1/sessions/{puuid}",
|
|
575
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
576
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
577
|
+
};
|
|
578
|
+
var sessionReconnectEndpoint = {
|
|
579
|
+
name: "Reconnect",
|
|
580
|
+
description: "GET Session_ReConnect",
|
|
581
|
+
queryName: "Session_ReConnect",
|
|
582
|
+
category: "Session Endpoints",
|
|
583
|
+
type: "glz",
|
|
584
|
+
suffix: "session/v1/sessions/{puuid}/reconnect",
|
|
585
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
586
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
587
|
+
};
|
|
588
|
+
var storeOrderEndpoint = {
|
|
589
|
+
name: "Order",
|
|
590
|
+
description: "GET Store_GetOrder",
|
|
591
|
+
queryName: "Store_GetOrder",
|
|
592
|
+
category: "Store Endpoints",
|
|
593
|
+
type: "pd",
|
|
594
|
+
suffix: "store/v1/order/{order id}",
|
|
595
|
+
riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
|
|
596
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
597
|
+
};
|
|
598
|
+
var localPlayerSettingsEndpoint = {
|
|
599
|
+
name: "Player Settings",
|
|
600
|
+
description: "Get client settings",
|
|
601
|
+
queryName: "RiotKV_RNet_GetSettings",
|
|
602
|
+
category: "Local Endpoints",
|
|
603
|
+
type: "local",
|
|
604
|
+
suffix: "player-preferences/v1/data-json/Ares.PlayerSettings",
|
|
605
|
+
riotRequirements: { localAuth: true },
|
|
606
|
+
responses: { "200": import_zod2.z.unknown() }
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
// src/extra/store.ts
|
|
610
|
+
var import_zod3 = require("zod");
|
|
611
|
+
var offerSchema = import_zod3.z.object({
|
|
612
|
+
OfferID: import_zod3.z.string(),
|
|
613
|
+
IsDirectPurchase: import_zod3.z.boolean(),
|
|
614
|
+
StartDate: import_zod3.z.string(),
|
|
615
|
+
Cost: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.number()),
|
|
616
|
+
Rewards: import_zod3.z.array(import_zod3.z.object({
|
|
617
|
+
ItemTypeID: import_zod3.z.string(),
|
|
618
|
+
ItemID: import_zod3.z.string(),
|
|
619
|
+
Quantity: import_zod3.z.number()
|
|
620
|
+
}).passthrough())
|
|
621
|
+
}).passthrough();
|
|
622
|
+
var bundleSchema = import_zod3.z.object({
|
|
623
|
+
ID: import_zod3.z.string(),
|
|
624
|
+
DataAssetID: import_zod3.z.string(),
|
|
625
|
+
CurrencyID: import_zod3.z.string(),
|
|
626
|
+
Items: import_zod3.z.array(import_zod3.z.unknown()),
|
|
627
|
+
ItemOffers: import_zod3.z.array(import_zod3.z.unknown()).nullish(),
|
|
628
|
+
TotalBaseCost: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.number()).nullish(),
|
|
629
|
+
TotalDiscountedCost: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.number()).nullish(),
|
|
630
|
+
TotalDiscountPercent: import_zod3.z.number(),
|
|
631
|
+
DurationRemainingInSeconds: import_zod3.z.number(),
|
|
632
|
+
WholesaleOnly: import_zod3.z.boolean()
|
|
633
|
+
}).passthrough();
|
|
634
|
+
var storefrontV3Endpoint = {
|
|
635
|
+
name: "Storefront V3",
|
|
636
|
+
description: "Get the current storefront of the player: featured bundles, the daily skin offers, accessories and night market plugins. Replaces the v2 storefront endpoint, which now answers 404.",
|
|
637
|
+
queryName: "Store_GetStorefrontV3",
|
|
638
|
+
category: "Store Endpoints",
|
|
639
|
+
type: "pd",
|
|
640
|
+
method: "POST",
|
|
641
|
+
suffix: "store/v3/storefront/{puuid}",
|
|
642
|
+
headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
|
|
643
|
+
riotRequirements: {
|
|
644
|
+
token: true,
|
|
645
|
+
entitlement: true,
|
|
646
|
+
clientPlatform: true,
|
|
647
|
+
clientVersion: true
|
|
648
|
+
},
|
|
649
|
+
responses: {
|
|
650
|
+
"200": import_zod3.z.object({
|
|
651
|
+
FeaturedBundle: import_zod3.z.object({
|
|
652
|
+
Bundle: bundleSchema,
|
|
653
|
+
Bundles: import_zod3.z.array(bundleSchema),
|
|
654
|
+
BundleRemainingDurationInSeconds: import_zod3.z.number()
|
|
655
|
+
}).passthrough(),
|
|
656
|
+
SkinsPanelLayout: import_zod3.z.object({
|
|
657
|
+
SingleItemOffers: import_zod3.z.array(import_zod3.z.string()),
|
|
658
|
+
SingleItemStoreOffers: import_zod3.z.array(offerSchema),
|
|
659
|
+
SingleItemOffersRemainingDurationInSeconds: import_zod3.z.number()
|
|
660
|
+
}).passthrough(),
|
|
661
|
+
UpgradeCurrencyStore: import_zod3.z.object({
|
|
662
|
+
UpgradeCurrencyOffers: import_zod3.z.array(import_zod3.z.object({ OfferID: import_zod3.z.string(), StorefrontItemID: import_zod3.z.string() }).passthrough())
|
|
663
|
+
}).passthrough(),
|
|
664
|
+
AccessoryStore: import_zod3.z.object({
|
|
665
|
+
AccessoryStoreOffers: import_zod3.z.array(import_zod3.z.object({ Offer: offerSchema, ContractID: import_zod3.z.string() }).passthrough()),
|
|
666
|
+
AccessoryStoreRemainingDurationInSeconds: import_zod3.z.number(),
|
|
667
|
+
StorefrontID: import_zod3.z.string()
|
|
668
|
+
}).passthrough(),
|
|
669
|
+
BonusStore: import_zod3.z.object({
|
|
670
|
+
BonusStoreOffers: import_zod3.z.array(import_zod3.z.unknown()),
|
|
671
|
+
BonusStoreRemainingDurationInSeconds: import_zod3.z.number()
|
|
672
|
+
}).passthrough().optional().describe("Only present while the night market is active"),
|
|
673
|
+
PluginStores: import_zod3.z.array(import_zod3.z.object({ PluginID: import_zod3.z.string(), PluginOffers: import_zod3.z.unknown(), StartDate: import_zod3.z.string() }).passthrough()).optional()
|
|
674
|
+
}).passthrough()
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
// src/api/registry.ts
|
|
679
|
+
var registry = {
|
|
680
|
+
pvp: {
|
|
681
|
+
content: import_valorant_api_types.endpoints.fetchContentEndpoint,
|
|
682
|
+
accountXp: import_valorant_api_types.endpoints.accountXPEndpoint,
|
|
683
|
+
playerLoadout: import_valorant_api_types.endpoints.playerLoadoutEndpoint,
|
|
684
|
+
setPlayerLoadout: import_valorant_api_types.endpoints.setPlayerLoadoutEndpoint,
|
|
685
|
+
playerMmr: import_valorant_api_types.endpoints.playerMMREndpoint,
|
|
686
|
+
matchHistory: import_valorant_api_types.endpoints.matchHistoryEndpoint,
|
|
687
|
+
matchDetails: import_valorant_api_types.endpoints.matchDetailsEndpoint,
|
|
688
|
+
competitiveUpdates: import_valorant_api_types.endpoints.competitiveUpdatesEndpoint,
|
|
689
|
+
leaderboard: import_valorant_api_types.endpoints.leaderboardEndpoint,
|
|
690
|
+
penalties: import_valorant_api_types.endpoints.penaltiesEndpoint,
|
|
691
|
+
config: import_valorant_api_types.endpoints.configEndpoint,
|
|
692
|
+
nameService: import_valorant_api_types.endpoints.nameServiceEndpoint
|
|
693
|
+
},
|
|
694
|
+
party: {
|
|
695
|
+
get: import_valorant_api_types.endpoints.partyEndpoint,
|
|
696
|
+
player: import_valorant_api_types.endpoints.partyPlayerEndpoint,
|
|
697
|
+
removePlayer: import_valorant_api_types.endpoints.partyRemovePlayerEndpoint,
|
|
698
|
+
setMemberReady: import_valorant_api_types.endpoints.partySetMemberReadyEndpoint,
|
|
699
|
+
refreshCompetitiveTier: import_valorant_api_types.endpoints.refreshCompetitiveTierEndpoint,
|
|
700
|
+
refreshPlayerIdentity: import_valorant_api_types.endpoints.refreshPlayerIdentityEndpoint,
|
|
701
|
+
refreshPings: import_valorant_api_types.endpoints.refreshPingsEndpoint,
|
|
702
|
+
changeQueue: import_valorant_api_types.endpoints.changeQueueEndpoint,
|
|
703
|
+
startCustomGame: import_valorant_api_types.endpoints.startCustomGameEndpoint,
|
|
704
|
+
enterMatchmakingQueue: import_valorant_api_types.endpoints.enterMatchmakingQueueEndpoint,
|
|
705
|
+
leaveMatchmakingQueue: import_valorant_api_types.endpoints.leaveMatchmakingQueueEndpoint,
|
|
706
|
+
setAccessibility: import_valorant_api_types.endpoints.setPartyAccessibilityEndpoint,
|
|
707
|
+
setCustomGameSettings: import_valorant_api_types.endpoints.setCustomGameSettingsEndpoint,
|
|
708
|
+
invite: import_valorant_api_types.endpoints.partyInviteEndpoint,
|
|
709
|
+
requestToJoin: import_valorant_api_types.endpoints.partyRequestEndpoint,
|
|
710
|
+
declineRequest: import_valorant_api_types.endpoints.partyDeclineEndpoint,
|
|
711
|
+
customGameConfigs: import_valorant_api_types.endpoints.customGameConfigsEndpoint,
|
|
712
|
+
chatToken: import_valorant_api_types.endpoints.partyChatTokenEndpoint,
|
|
713
|
+
voiceToken: import_valorant_api_types.endpoints.partyVoiceTokenEndpoint,
|
|
714
|
+
disableCode: import_valorant_api_types.endpoints.partyDisableCodeEndpoint,
|
|
715
|
+
generateCode: import_valorant_api_types.endpoints.partyGenerateCodeEndpoint,
|
|
716
|
+
joinByCode: import_valorant_api_types.endpoints.partyJoinByCodeEndpoint
|
|
717
|
+
},
|
|
718
|
+
store: {
|
|
719
|
+
prices: import_valorant_api_types.endpoints.pricesEndpoint,
|
|
720
|
+
storefront: import_valorant_api_types.endpoints.storefrontEndpoint,
|
|
721
|
+
wallet: import_valorant_api_types.endpoints.walletEndpoint,
|
|
722
|
+
ownedItems: import_valorant_api_types.endpoints.ownedItemsEndpoint,
|
|
723
|
+
storefrontV3: storefrontV3Endpoint,
|
|
724
|
+
order: storeOrderEndpoint
|
|
725
|
+
},
|
|
726
|
+
pregame: {
|
|
727
|
+
player: import_valorant_api_types.endpoints.pregamePlayerEndpoint,
|
|
728
|
+
match: import_valorant_api_types.endpoints.pregameMatchEndpoint,
|
|
729
|
+
loadouts: import_valorant_api_types.endpoints.pregameLoadoutsEndpoint,
|
|
730
|
+
selectCharacter: import_valorant_api_types.endpoints.selectCharacterEndpoint,
|
|
731
|
+
lockCharacter: import_valorant_api_types.endpoints.lockCharacterEndpoint,
|
|
732
|
+
quit: import_valorant_api_types.endpoints.pregameQuitEndpoint,
|
|
733
|
+
chatToken: pregameChatTokenEndpoint,
|
|
734
|
+
voiceToken: pregameVoiceTokenEndpoint
|
|
735
|
+
},
|
|
736
|
+
currentGame: {
|
|
737
|
+
player: import_valorant_api_types.endpoints.currentGamePlayerEndpoint,
|
|
738
|
+
match: import_valorant_api_types.endpoints.currentGameMatchEndpoint,
|
|
739
|
+
loadouts: import_valorant_api_types.endpoints.currentGameLoadoutsEndpoint,
|
|
740
|
+
quit: import_valorant_api_types.endpoints.currentGameQuitEndpoint,
|
|
741
|
+
allChatToken: currentGameAllChatTokenEndpoint,
|
|
742
|
+
teamChatToken: currentGameTeamChatTokenEndpoint
|
|
743
|
+
},
|
|
744
|
+
contracts: {
|
|
745
|
+
itemUpgrades: import_valorant_api_types.endpoints.itemUpgradesEndpoint,
|
|
746
|
+
list: import_valorant_api_types.endpoints.contractsEndpoint,
|
|
747
|
+
activate: import_valorant_api_types.endpoints.activateContractEndpoint,
|
|
748
|
+
activeStory: contractsActiveStoryEndpoint
|
|
749
|
+
},
|
|
750
|
+
local: {
|
|
751
|
+
help: import_valorant_api_types.endpoints.localHelpEndpoint,
|
|
752
|
+
sessions: import_valorant_api_types.endpoints.sessionsEndpoint,
|
|
753
|
+
rsoUserInfo: import_valorant_api_types.endpoints.rsoUserInfoEndpoint,
|
|
754
|
+
clientRegion: import_valorant_api_types.endpoints.clientRegionEndpoint,
|
|
755
|
+
accountAlias: import_valorant_api_types.endpoints.accountAliasEndpoint,
|
|
756
|
+
entitlementsToken: import_valorant_api_types.endpoints.entitlementsTokenEndpoint,
|
|
757
|
+
chatSession: import_valorant_api_types.endpoints.chatSessionEndpoint,
|
|
758
|
+
friends: import_valorant_api_types.endpoints.friendsEndpoint,
|
|
759
|
+
sendFriendRequest: import_valorant_api_types.endpoints.sendFriendRequestEndpoint,
|
|
760
|
+
removeFriendRequest: import_valorant_api_types.endpoints.removeFriendRequestEndpoint,
|
|
761
|
+
presence: import_valorant_api_types.endpoints.presenceEndpoint,
|
|
762
|
+
friendRequests: import_valorant_api_types.endpoints.friendRequestsEndpoint,
|
|
763
|
+
swaggerDocs: import_valorant_api_types.endpoints.localSwaggerDocsEndpoint,
|
|
764
|
+
antiAddictionShutdown: localAntiAddictionShutdownEndpoint,
|
|
765
|
+
antiAddictionWarning: localAntiAddictionWarningEndpoint,
|
|
766
|
+
clientConfig: localClientConfigEndpoint,
|
|
767
|
+
eula: localEulaEndpoint,
|
|
768
|
+
privacyPolicy: localPrivacyPolicyEndpoint,
|
|
769
|
+
availableLocales: localAvailableLocalesEndpoint,
|
|
770
|
+
locale: localLocaleEndpoint,
|
|
771
|
+
reporterFeedback: localReporterFeedbackEndpoint,
|
|
772
|
+
commandLineArgs: localCommandLineArgsEndpoint,
|
|
773
|
+
riotStatus: localRiotStatusEndpoint,
|
|
774
|
+
riotWarning: localRiotWarningEndpoint,
|
|
775
|
+
clientAuthorizations: localClientAuthorizationsEndpoint,
|
|
776
|
+
accessToken: localAccessTokenEndpoint,
|
|
777
|
+
userInfoToken: localUserInfoTokenEndpoint,
|
|
778
|
+
pluginStatus: localPluginStatusEndpoint,
|
|
779
|
+
rmsSession: localRmsSessionEndpoint,
|
|
780
|
+
processInfo: localProcessInfoEndpoint,
|
|
781
|
+
logPath: localLogPathEndpoint,
|
|
782
|
+
playerSettings: localPlayerSettingsEndpoint
|
|
783
|
+
},
|
|
784
|
+
chat: {
|
|
785
|
+
partyInfo: import_valorant_api_types.endpoints.partyChatInfoEndpoint,
|
|
786
|
+
pregameInfo: import_valorant_api_types.endpoints.pregameChatInfoEndpoint,
|
|
787
|
+
currentGameInfo: import_valorant_api_types.endpoints.currentGameChatInfoEndpoint,
|
|
788
|
+
allInfo: import_valorant_api_types.endpoints.allChatInfoEndpoint,
|
|
789
|
+
participants: import_valorant_api_types.endpoints.chatParticipantsEndpoint,
|
|
790
|
+
send: import_valorant_api_types.endpoints.sendChatEndpoint,
|
|
791
|
+
history: import_valorant_api_types.endpoints.chatHistoryEndpoint,
|
|
792
|
+
settings: chatSettingsEndpoint,
|
|
793
|
+
tournamentInfo: chatTournamentInfoEndpoint
|
|
794
|
+
},
|
|
795
|
+
session: {
|
|
796
|
+
get: sessionGetEndpoint,
|
|
797
|
+
reconnect: sessionReconnectEndpoint
|
|
798
|
+
},
|
|
799
|
+
voice: {
|
|
800
|
+
audioProperties: voiceAudioPropertiesEndpoint,
|
|
801
|
+
captureDevices: voiceCaptureDevicesEndpoint,
|
|
802
|
+
renderDevices: voiceRenderDevicesEndpoint,
|
|
803
|
+
pushToTalk: voicePushToTalkEndpoint,
|
|
804
|
+
sessions: voiceSessionsEndpoint,
|
|
805
|
+
settings: voiceSettingsEndpoint
|
|
806
|
+
},
|
|
807
|
+
auth: {
|
|
808
|
+
cookies: import_valorant_api_types.endpoints.authCookiesEndpoint,
|
|
809
|
+
request: import_valorant_api_types.endpoints.authRequestEndpoint,
|
|
810
|
+
multiFactor: import_valorant_api_types.endpoints.multiFactorAuthenticationEndpoint,
|
|
811
|
+
cookieReauth: import_valorant_api_types.endpoints.cookieReauthEndpoint,
|
|
812
|
+
entitlement: import_valorant_api_types.endpoints.entitlementEndpoint,
|
|
813
|
+
playerInfo: import_valorant_api_types.endpoints.playerInfoEndpoint,
|
|
814
|
+
riotGeo: import_valorant_api_types.endpoints.riotGeoEndpoint,
|
|
815
|
+
pasToken: import_valorant_api_types.endpoints.pasTokenEndpoint,
|
|
816
|
+
riotClientConfig: import_valorant_api_types.endpoints.riotClientConfigEndpoint
|
|
817
|
+
},
|
|
818
|
+
catalog: catalogEndpoints
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
// src/auth.ts
|
|
822
|
+
var import_valorant_api_types2 = require("valorant-api-types");
|
|
823
|
+
|
|
824
|
+
// src/errors.ts
|
|
825
|
+
var ValorantError = class extends Error {
|
|
826
|
+
constructor(message, options) {
|
|
827
|
+
super(message, options);
|
|
828
|
+
this.name = new.target.name;
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
var MissingContextError = class extends ValorantError {
|
|
832
|
+
constructor(key) {
|
|
833
|
+
super(`Context value "${key}" is required for this request but is not set`);
|
|
834
|
+
this.key = key;
|
|
835
|
+
}
|
|
836
|
+
key;
|
|
837
|
+
};
|
|
838
|
+
var MissingParameterError = class extends ValorantError {
|
|
839
|
+
constructor(parameter, endpoint2) {
|
|
840
|
+
super(`Path parameter "${parameter}" is required for "${endpoint2}"`);
|
|
841
|
+
this.parameter = parameter;
|
|
842
|
+
this.endpoint = endpoint2;
|
|
843
|
+
}
|
|
844
|
+
parameter;
|
|
845
|
+
endpoint;
|
|
846
|
+
};
|
|
847
|
+
var ValorantNetworkError = class extends ValorantError {
|
|
848
|
+
constructor(message, url, options) {
|
|
849
|
+
super(message, options);
|
|
850
|
+
this.url = url;
|
|
851
|
+
}
|
|
852
|
+
url;
|
|
853
|
+
};
|
|
854
|
+
var ValorantValidationError = class extends ValorantError {
|
|
855
|
+
constructor(target, endpoint2, issues, data) {
|
|
856
|
+
super(`Invalid ${target} for "${endpoint2}": ${issues.issues.map((i) => `${i.path.join(".") || "(root)"}: ${i.message}`).slice(0, 5).join("; ")}`);
|
|
857
|
+
this.target = target;
|
|
858
|
+
this.endpoint = endpoint2;
|
|
859
|
+
this.issues = issues;
|
|
860
|
+
this.data = data;
|
|
861
|
+
}
|
|
862
|
+
target;
|
|
863
|
+
endpoint;
|
|
864
|
+
issues;
|
|
865
|
+
data;
|
|
866
|
+
};
|
|
867
|
+
var ValorantApiError = class extends ValorantError {
|
|
868
|
+
constructor(status, endpoint2, url, body, headers) {
|
|
869
|
+
const code = extractErrorCode(body);
|
|
870
|
+
super(`${endpoint2} failed with HTTP ${status}${code ? ` (${code})` : ""}`);
|
|
871
|
+
this.status = status;
|
|
872
|
+
this.endpoint = endpoint2;
|
|
873
|
+
this.url = url;
|
|
874
|
+
this.body = body;
|
|
875
|
+
this.headers = headers;
|
|
876
|
+
this.errorCode = code;
|
|
877
|
+
}
|
|
878
|
+
status;
|
|
879
|
+
endpoint;
|
|
880
|
+
url;
|
|
881
|
+
body;
|
|
882
|
+
headers;
|
|
883
|
+
errorCode;
|
|
884
|
+
};
|
|
885
|
+
var ValorantAuthError = class extends ValorantApiError {
|
|
886
|
+
};
|
|
887
|
+
var ValorantRateLimitError = class extends ValorantApiError {
|
|
888
|
+
constructor(status, endpoint2, url, body, headers, retryAfterMs) {
|
|
889
|
+
super(status, endpoint2, url, body, headers);
|
|
890
|
+
this.retryAfterMs = retryAfterMs;
|
|
891
|
+
}
|
|
892
|
+
retryAfterMs;
|
|
893
|
+
};
|
|
894
|
+
function extractErrorCode(body) {
|
|
895
|
+
if (typeof body === "object" && body !== null && "errorCode" in body) {
|
|
896
|
+
const code = body.errorCode;
|
|
897
|
+
return typeof code === "string" ? code : void 0;
|
|
898
|
+
}
|
|
899
|
+
return void 0;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
// src/auth.ts
|
|
903
|
+
function parseAuthRedirect(location) {
|
|
904
|
+
const fragment = location.split("#")[1];
|
|
905
|
+
if (fragment === void 0) return void 0;
|
|
906
|
+
const params = new URLSearchParams(fragment);
|
|
907
|
+
const accessToken = params.get("access_token");
|
|
908
|
+
const idToken = params.get("id_token");
|
|
909
|
+
if (accessToken === null || idToken === null) return void 0;
|
|
910
|
+
const expiresIn = Number(params.get("expires_in"));
|
|
911
|
+
return { accessToken, idToken, expiresIn: Number.isFinite(expiresIn) && expiresIn > 0 ? expiresIn : void 0 };
|
|
912
|
+
}
|
|
913
|
+
var AUTH_COOKIES_BODY = {
|
|
914
|
+
client_id: "play-valorant-web-prod",
|
|
915
|
+
nonce: "1",
|
|
916
|
+
redirect_uri: "https://playvalorant.com/opt_in",
|
|
917
|
+
response_type: "token id_token",
|
|
918
|
+
scope: "account openid"
|
|
919
|
+
};
|
|
920
|
+
function createAuthFlows(client) {
|
|
921
|
+
const ctx = client.context;
|
|
922
|
+
function applyTokens(tokens) {
|
|
923
|
+
if (tokens) ctx.update({ accessToken: tokens.accessToken, idToken: tokens.idToken });
|
|
924
|
+
}
|
|
925
|
+
function toLoginResult(data) {
|
|
926
|
+
const body = data ?? {};
|
|
927
|
+
if (body.type === "multifactor") return { status: "multifactor", email: body.multifactor?.email ?? "" };
|
|
928
|
+
const redirect = body.success?.redirect_url ?? JSON.stringify(data);
|
|
929
|
+
const tokens = parseAuthRedirect(redirect.replaceAll("\\u0026", "&"));
|
|
930
|
+
applyTokens(tokens);
|
|
931
|
+
return { status: "success", tokens };
|
|
932
|
+
}
|
|
933
|
+
return {
|
|
934
|
+
async login(options) {
|
|
935
|
+
await client.auth.cookies({ body: AUTH_COOKIES_BODY });
|
|
936
|
+
const data = await client.auth.request({
|
|
937
|
+
body: {
|
|
938
|
+
type: "auth",
|
|
939
|
+
language: "en_US",
|
|
940
|
+
remember: options.remember ?? true,
|
|
941
|
+
riot_identity: { captcha: options.captcha, username: options.username, password: options.password }
|
|
942
|
+
}
|
|
943
|
+
});
|
|
944
|
+
return toLoginResult(data);
|
|
945
|
+
},
|
|
946
|
+
async submitMfa(code, rememberDevice = true) {
|
|
947
|
+
const data = await client.auth.multiFactor({ body: { type: "multifactor", multifactor: { otp: code, rememberDevice } } });
|
|
948
|
+
return toLoginResult(data);
|
|
949
|
+
},
|
|
950
|
+
async reauthenticate(options) {
|
|
951
|
+
const response = await client.send(import_valorant_api_types2.endpoints.cookieReauthEndpoint);
|
|
952
|
+
const tokens = parseAuthRedirect(response.headers.get("location") ?? "");
|
|
953
|
+
if (tokens === void 0) throw new ValorantError("Cookie reauthentication failed: the session cookies are missing or expired, log in again");
|
|
954
|
+
applyTokens(tokens);
|
|
955
|
+
await this.establishSession(options);
|
|
956
|
+
return tokens;
|
|
957
|
+
},
|
|
958
|
+
async establishSession(options) {
|
|
959
|
+
const { entitlements_token } = await client.auth.entitlement();
|
|
960
|
+
ctx.set("entitlementToken", entitlements_token);
|
|
961
|
+
const info = await client.auth.playerInfo();
|
|
962
|
+
ctx.set("puuid", info.sub);
|
|
963
|
+
const geo = await client.auth.riotGeo({ body: { id_token: ctx.require("idToken") } });
|
|
964
|
+
ctx.applyAffinity(geo.affinities.live);
|
|
965
|
+
if (options?.fetchClientVersion) await this.fetchClientVersion();
|
|
966
|
+
},
|
|
967
|
+
async fetchClientVersion() {
|
|
968
|
+
const response = await client.transport({
|
|
969
|
+
method: "GET",
|
|
970
|
+
url: "https://valorant-api.com/v1/version",
|
|
971
|
+
headers: { Accept: "application/json" },
|
|
972
|
+
signal: AbortSignal.timeout(15e3)
|
|
973
|
+
});
|
|
974
|
+
const version = JSON.parse(response.text).data?.riotClientVersion;
|
|
975
|
+
if (!version) throw new ValorantError("valorant-api.com did not return a client version");
|
|
976
|
+
ctx.set("clientVersion", version);
|
|
977
|
+
return version;
|
|
978
|
+
}
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
// src/context.ts
|
|
983
|
+
var DEFAULT_PLATFORM = btoa(JSON.stringify({
|
|
984
|
+
platformType: "PC",
|
|
985
|
+
platformOS: "Windows",
|
|
986
|
+
platformOSVersion: "10.0.19042.1.256.64bit",
|
|
987
|
+
platformChipset: "Unknown"
|
|
988
|
+
}));
|
|
989
|
+
var SECRET_KEYS = ["accessToken", "entitlementToken", "idToken", "pasToken", "cookies", "localPassword"];
|
|
990
|
+
var REGION_TO_SHARD = { na: "na", latam: "na", br: "na", eu: "eu", ap: "ap", kr: "kr" };
|
|
991
|
+
function isRegion(value) {
|
|
992
|
+
return Object.hasOwn(REGION_TO_SHARD, value);
|
|
993
|
+
}
|
|
994
|
+
function shardForRegion(region) {
|
|
995
|
+
return REGION_TO_SHARD[region];
|
|
996
|
+
}
|
|
997
|
+
var ValorantContext = class {
|
|
998
|
+
#state;
|
|
999
|
+
#listeners = /* @__PURE__ */ new Set();
|
|
1000
|
+
constructor(initial = {}) {
|
|
1001
|
+
this.#state = Object.freeze({ clientPlatform: DEFAULT_PLATFORM, ...stripUndefined(initial) });
|
|
1002
|
+
}
|
|
1003
|
+
get(key) {
|
|
1004
|
+
return this.#state[key];
|
|
1005
|
+
}
|
|
1006
|
+
/** Like {@link get}, but throws {@link MissingContextError} when the value is not set. */
|
|
1007
|
+
require(key) {
|
|
1008
|
+
const value = this.#state[key];
|
|
1009
|
+
if (value === void 0) throw new MissingContextError(key);
|
|
1010
|
+
return value;
|
|
1011
|
+
}
|
|
1012
|
+
has(key) {
|
|
1013
|
+
return this.#state[key] !== void 0;
|
|
1014
|
+
}
|
|
1015
|
+
/** Sets one value. `undefined` removes it. */
|
|
1016
|
+
set(key, value) {
|
|
1017
|
+
this.update({ [key]: value });
|
|
1018
|
+
}
|
|
1019
|
+
/** Merges a patch into the state. Keys set to `undefined` are removed. */
|
|
1020
|
+
update(patch) {
|
|
1021
|
+
this.#commit({ ...this.#state, ...patch });
|
|
1022
|
+
}
|
|
1023
|
+
/** Replaces the whole state. The default client platform is kept unless provided. */
|
|
1024
|
+
replace(next) {
|
|
1025
|
+
this.#commit({ clientPlatform: DEFAULT_PLATFORM, ...next });
|
|
1026
|
+
}
|
|
1027
|
+
/** Removes everything except the default client platform. */
|
|
1028
|
+
clear() {
|
|
1029
|
+
this.replace({});
|
|
1030
|
+
}
|
|
1031
|
+
/** Sets region and the matching shard from a Riot affinity (`eu`, `latam`, ...). Unknown values are ignored. */
|
|
1032
|
+
applyAffinity(affinity) {
|
|
1033
|
+
if (!isRegion(affinity)) return false;
|
|
1034
|
+
this.update({ region: affinity, shard: shardForRegion(affinity) });
|
|
1035
|
+
return true;
|
|
1036
|
+
}
|
|
1037
|
+
setCookie(name, value) {
|
|
1038
|
+
const cookies = { ...this.#state.cookies };
|
|
1039
|
+
if (value === void 0) delete cookies[name];
|
|
1040
|
+
else cookies[name] = value;
|
|
1041
|
+
this.update({ cookies });
|
|
1042
|
+
}
|
|
1043
|
+
cookieHeader() {
|
|
1044
|
+
const entries = Object.entries(this.#state.cookies ?? {});
|
|
1045
|
+
return entries.length === 0 ? void 0 : entries.map(([name, value]) => `${name}=${value}`).join("; ");
|
|
1046
|
+
}
|
|
1047
|
+
/** Immutable copy of the current state. Contains secrets. */
|
|
1048
|
+
snapshot() {
|
|
1049
|
+
return this.#state;
|
|
1050
|
+
}
|
|
1051
|
+
/** Calls `listener` after every change. Returns an unsubscribe function. */
|
|
1052
|
+
subscribe(listener) {
|
|
1053
|
+
this.#listeners.add(listener);
|
|
1054
|
+
return () => void this.#listeners.delete(listener);
|
|
1055
|
+
}
|
|
1056
|
+
/** State with secrets masked, safe to log. */
|
|
1057
|
+
redacted() {
|
|
1058
|
+
const out = { ...this.#state };
|
|
1059
|
+
for (const key of SECRET_KEYS) {
|
|
1060
|
+
if (out[key] !== void 0) out[key] = "[redacted]";
|
|
1061
|
+
}
|
|
1062
|
+
return out;
|
|
1063
|
+
}
|
|
1064
|
+
toJSON() {
|
|
1065
|
+
return this.redacted();
|
|
1066
|
+
}
|
|
1067
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
|
1068
|
+
return this.redacted();
|
|
1069
|
+
}
|
|
1070
|
+
#commit(next) {
|
|
1071
|
+
const previous = this.#state;
|
|
1072
|
+
const clean = Object.freeze(stripUndefined(next));
|
|
1073
|
+
const keys = /* @__PURE__ */ new Set([...Object.keys(previous), ...Object.keys(clean)]);
|
|
1074
|
+
const changed = [...keys].filter((key) => !sameValue(previous[key], clean[key]));
|
|
1075
|
+
if (changed.length === 0) return;
|
|
1076
|
+
this.#state = clean;
|
|
1077
|
+
for (const listener of [...this.#listeners]) listener(clean, changed);
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
function stripUndefined(value) {
|
|
1081
|
+
return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0));
|
|
1082
|
+
}
|
|
1083
|
+
function sameValue(a, b) {
|
|
1084
|
+
if (Object.is(a, b)) return true;
|
|
1085
|
+
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
|
|
1086
|
+
const aEntries = Object.entries(a);
|
|
1087
|
+
const bEntries = Object.entries(b);
|
|
1088
|
+
return aEntries.length === bEntries.length && aEntries.every(([key, value]) => Object.is(b[key], value));
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
// src/http.ts
|
|
1092
|
+
var fetchTransport = async (request) => {
|
|
1093
|
+
const response = await fetch(request.url, {
|
|
1094
|
+
method: request.method,
|
|
1095
|
+
headers: request.headers,
|
|
1096
|
+
body: request.body,
|
|
1097
|
+
signal: request.signal,
|
|
1098
|
+
redirect: "manual"
|
|
1099
|
+
});
|
|
1100
|
+
return {
|
|
1101
|
+
status: response.status,
|
|
1102
|
+
headers: response.headers,
|
|
1103
|
+
setCookies: response.headers.getSetCookie(),
|
|
1104
|
+
text: await response.text()
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
var localTransport = async (request) => {
|
|
1108
|
+
const { request: httpsRequest } = await import("https");
|
|
1109
|
+
const url = new URL(request.url);
|
|
1110
|
+
if (url.hostname !== "127.0.0.1" && url.hostname !== "localhost") {
|
|
1111
|
+
throw new Error(`localTransport only talks to loopback hosts, got ${url.hostname}`);
|
|
1112
|
+
}
|
|
1113
|
+
return new Promise((resolve, reject) => {
|
|
1114
|
+
const req = httpsRequest(url, {
|
|
1115
|
+
method: request.method,
|
|
1116
|
+
headers: request.headers,
|
|
1117
|
+
rejectUnauthorized: false,
|
|
1118
|
+
signal: request.signal
|
|
1119
|
+
}, (res) => {
|
|
1120
|
+
const chunks = [];
|
|
1121
|
+
res.on("data", (chunk) => chunks.push(chunk));
|
|
1122
|
+
res.on("error", reject);
|
|
1123
|
+
res.on("end", () => {
|
|
1124
|
+
const headers = new Headers();
|
|
1125
|
+
for (const [name, value] of Object.entries(res.headers)) {
|
|
1126
|
+
if (Array.isArray(value)) value.forEach((v) => headers.append(name, v));
|
|
1127
|
+
else if (value !== void 0) headers.set(name, value);
|
|
1128
|
+
}
|
|
1129
|
+
resolve({
|
|
1130
|
+
status: res.statusCode ?? 0,
|
|
1131
|
+
headers,
|
|
1132
|
+
setCookies: res.headers["set-cookie"] ?? [],
|
|
1133
|
+
text: Buffer.concat(chunks).toString("utf8")
|
|
1134
|
+
});
|
|
1135
|
+
});
|
|
1136
|
+
});
|
|
1137
|
+
req.on("error", reject);
|
|
1138
|
+
req.end(request.body);
|
|
1139
|
+
});
|
|
1140
|
+
};
|
|
1141
|
+
|
|
1142
|
+
// src/local.ts
|
|
1143
|
+
function parseLockfile(content) {
|
|
1144
|
+
const [name, pid, port, password, protocol] = content.trim().split(":");
|
|
1145
|
+
if (!name || !pid || !port || !password || !protocol) throw new ValorantError("Malformed lockfile");
|
|
1146
|
+
return { name, pid: Number(pid), port: Number(port), password, protocol };
|
|
1147
|
+
}
|
|
1148
|
+
async function readLockfile(path) {
|
|
1149
|
+
const { readFile } = await import("fs/promises");
|
|
1150
|
+
const { join } = await import("path");
|
|
1151
|
+
const file = path ?? join(process.env["LOCALAPPDATA"] ?? "", "Riot Games", "Riot Client", "Config", "lockfile");
|
|
1152
|
+
try {
|
|
1153
|
+
return parseLockfile(await readFile(file, "utf8"));
|
|
1154
|
+
} catch (cause) {
|
|
1155
|
+
throw new ValorantError(`Could not read the Riot Client lockfile at "${file}". Is the Riot Client running?`, { cause });
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
function createLocalFlows(client) {
|
|
1159
|
+
const ctx = client.context;
|
|
1160
|
+
return {
|
|
1161
|
+
async connect(options) {
|
|
1162
|
+
const lockfile = await readLockfile(options?.lockfilePath);
|
|
1163
|
+
ctx.update({ localPort: lockfile.port, localPassword: lockfile.password });
|
|
1164
|
+
const tokens = await client.local.entitlementsToken();
|
|
1165
|
+
ctx.update({ accessToken: tokens.accessToken, entitlementToken: tokens.token, puuid: tokens.subject });
|
|
1166
|
+
const sessions = await client.local.sessions();
|
|
1167
|
+
const valorant = Object.values(sessions).find((session) => session.productId === "valorant");
|
|
1168
|
+
if (valorant) {
|
|
1169
|
+
ctx.set("clientVersion", valorant.version);
|
|
1170
|
+
const region = launchArgument(valorant.launchConfiguration.arguments, "ares-deployment");
|
|
1171
|
+
if (region !== void 0 && isRegion(region)) ctx.update({ region, shard: shardForRegion(region) });
|
|
1172
|
+
}
|
|
1173
|
+
if (!ctx.has("region")) {
|
|
1174
|
+
const info = await client.auth.playerInfo();
|
|
1175
|
+
const affinity = Object.values(info.affinity ?? {}).find(isRegion);
|
|
1176
|
+
if (affinity !== void 0) ctx.applyAffinity(affinity);
|
|
1177
|
+
}
|
|
1178
|
+
if (!ctx.has("clientVersion") && options?.fetchClientVersion !== false) {
|
|
1179
|
+
await client.auth.fetchClientVersion().catch(() => void 0);
|
|
1180
|
+
}
|
|
1181
|
+
},
|
|
1182
|
+
async events() {
|
|
1183
|
+
return openEventStream(ctx);
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
function launchArgument(args, name) {
|
|
1188
|
+
const prefix = `-${name}=`;
|
|
1189
|
+
return args.find((arg) => arg.startsWith(prefix))?.slice(prefix.length);
|
|
1190
|
+
}
|
|
1191
|
+
async function openEventStream(ctx) {
|
|
1192
|
+
let WebSocket;
|
|
1193
|
+
try {
|
|
1194
|
+
WebSocket = (await import("ws")).WebSocket;
|
|
1195
|
+
} catch (cause) {
|
|
1196
|
+
throw new ValorantError('The local event stream needs the optional "ws" package: npm install ws', { cause });
|
|
1197
|
+
}
|
|
1198
|
+
const socket = new WebSocket(`wss://127.0.0.1:${ctx.require("localPort")}`, {
|
|
1199
|
+
headers: { Authorization: `Basic ${btoa(`riot:${ctx.require("localPassword")}`)}` },
|
|
1200
|
+
rejectUnauthorized: false
|
|
1201
|
+
});
|
|
1202
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
1203
|
+
socket.on("message", (raw) => {
|
|
1204
|
+
const text2 = raw.toString();
|
|
1205
|
+
if (text2 === "") return;
|
|
1206
|
+
const message = JSON.parse(text2);
|
|
1207
|
+
if (!Array.isArray(message) || message[0] !== 8) return;
|
|
1208
|
+
for (const listener of [...listeners]) listener(String(message[1]), message[2]);
|
|
1209
|
+
});
|
|
1210
|
+
await new Promise((resolve, reject) => {
|
|
1211
|
+
socket.once("open", resolve);
|
|
1212
|
+
socket.once("error", reject);
|
|
1213
|
+
});
|
|
1214
|
+
return {
|
|
1215
|
+
onEvent(listener) {
|
|
1216
|
+
listeners.add(listener);
|
|
1217
|
+
return () => void listeners.delete(listener);
|
|
1218
|
+
},
|
|
1219
|
+
subscribe: (eventName) => socket.send(JSON.stringify([5, eventName])),
|
|
1220
|
+
unsubscribe: (eventName) => socket.send(JSON.stringify([6, eventName])),
|
|
1221
|
+
close: () => socket.close()
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
// src/request.ts
|
|
1226
|
+
var import_valorant_api_types3 = require("valorant-api-types");
|
|
1227
|
+
|
|
1228
|
+
// src/types.ts
|
|
1229
|
+
function paramName(variable) {
|
|
1230
|
+
const [first = "", ...rest] = variable.replaceAll("-", " ").split(" ");
|
|
1231
|
+
return first.charAt(0).toLowerCase() + first.slice(1) + rest.map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("");
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
// src/request.ts
|
|
1235
|
+
var AUTH_HOST = "auth.riotgames.com";
|
|
1236
|
+
function applyQuirks(path, ctx) {
|
|
1237
|
+
const hardcoded = "/leaderboards/affinity/na/";
|
|
1238
|
+
return path.includes(hardcoded) ? path.replace(hardcoded, `/leaderboards/affinity/${ctx.require("shard")}/`) : path;
|
|
1239
|
+
}
|
|
1240
|
+
function resolvePath(endpoint2, input, ctx) {
|
|
1241
|
+
const suffix = applyQuirks(endpoint2.suffix, ctx);
|
|
1242
|
+
return suffix.replace(/\{([^}]+)\}/g, (_, variable) => {
|
|
1243
|
+
const name = paramName(variable);
|
|
1244
|
+
const value = input.params?.[name] ?? (name === "puuid" || name === "region" ? ctx.require(name) : void 0);
|
|
1245
|
+
if (value === void 0) throw new MissingParameterError(name, endpoint2.name);
|
|
1246
|
+
return encodeURIComponent(value);
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
function resolveBase(endpoint2, ctx) {
|
|
1250
|
+
switch (endpoint2.type) {
|
|
1251
|
+
case "pd":
|
|
1252
|
+
case "shared":
|
|
1253
|
+
return (0, import_valorant_api_types3.typeToPrefix)({ type: endpoint2.type, shard: ctx.require("shard") });
|
|
1254
|
+
case "glz":
|
|
1255
|
+
return (0, import_valorant_api_types3.typeToPrefix)({ type: "glz", shard: ctx.require("shard"), region: ctx.require("region") });
|
|
1256
|
+
case "local":
|
|
1257
|
+
return (0, import_valorant_api_types3.typeToPrefix)({ type: "local", port: ctx.require("localPort") });
|
|
1258
|
+
case "other":
|
|
1259
|
+
return "";
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
function appendQuery(url, query2) {
|
|
1263
|
+
if (!query2) return url;
|
|
1264
|
+
const params = new URLSearchParams();
|
|
1265
|
+
for (const [key, value] of Object.entries(query2)) {
|
|
1266
|
+
if (value !== void 0 && value !== null) params.append(key, String(value));
|
|
1267
|
+
}
|
|
1268
|
+
const encoded = params.toString();
|
|
1269
|
+
if (encoded === "") return url;
|
|
1270
|
+
return url + (url.includes("?") ? "&" : "?") + encoded;
|
|
1271
|
+
}
|
|
1272
|
+
function resolveHeaders(endpoint2, input, ctx, url) {
|
|
1273
|
+
const headers = { Accept: "application/json" };
|
|
1274
|
+
const need = endpoint2.riotRequirements ?? {};
|
|
1275
|
+
const userAgent = ctx.get("userAgent");
|
|
1276
|
+
if (userAgent) headers["User-Agent"] = userAgent;
|
|
1277
|
+
if (need.token) headers["Authorization"] = `Bearer ${ctx.require("accessToken")}`;
|
|
1278
|
+
if (need.localAuth) headers["Authorization"] = `Basic ${btoa(`riot:${ctx.require("localPassword")}`)}`;
|
|
1279
|
+
if (need.entitlement) headers["X-Riot-Entitlements-JWT"] = ctx.require("entitlementToken");
|
|
1280
|
+
if (need.clientVersion) headers["X-Riot-ClientVersion"] = ctx.require("clientVersion");
|
|
1281
|
+
if (need.clientPlatform) headers["X-Riot-ClientPlatform"] = ctx.require("clientPlatform");
|
|
1282
|
+
for (const [name, value] of endpoint2.headers ?? []) headers[name] = value;
|
|
1283
|
+
if (input.body !== void 0 && !Object.keys(headers).some((h) => h.toLowerCase() === "content-type")) {
|
|
1284
|
+
headers["Content-Type"] = "application/json";
|
|
1285
|
+
}
|
|
1286
|
+
if (new URL(url).hostname === AUTH_HOST) {
|
|
1287
|
+
const cookie = ctx.cookieHeader();
|
|
1288
|
+
if (cookie) headers["Cookie"] = cookie;
|
|
1289
|
+
}
|
|
1290
|
+
return { ...headers, ...input.headers };
|
|
1291
|
+
}
|
|
1292
|
+
function isAuthHost(url) {
|
|
1293
|
+
return new URL(url).hostname === AUTH_HOST;
|
|
1294
|
+
}
|
|
1295
|
+
function buildRequest(endpoint2, input, ctx) {
|
|
1296
|
+
const path = resolvePath(endpoint2, input, ctx);
|
|
1297
|
+
const base = resolveBase(endpoint2, ctx);
|
|
1298
|
+
const url = appendQuery(base + (base === "" ? path : path.replace(/^\/+/, "")), input.query);
|
|
1299
|
+
const method = endpoint2.method ?? "GET";
|
|
1300
|
+
const headers = resolveHeaders(endpoint2, input, ctx, url);
|
|
1301
|
+
const declaresJson = [...endpoint2.headers?.keys() ?? []].some((h) => h.toLowerCase() === "content-type");
|
|
1302
|
+
const body = input.body !== void 0 ? JSON.stringify(input.body) : method !== "GET" && declaresJson ? "{}" : void 0;
|
|
1303
|
+
return { method, url, headers, body };
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
// src/client.ts
|
|
1307
|
+
var RETRYABLE_STATUS = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
|
|
1308
|
+
var IDEMPOTENT = /* @__PURE__ */ new Set(["GET", "HEAD", "PUT", "DELETE"]);
|
|
1309
|
+
var ValorantClient = class {
|
|
1310
|
+
context;
|
|
1311
|
+
#options;
|
|
1312
|
+
#warned = /* @__PURE__ */ new Set();
|
|
1313
|
+
#refreshing;
|
|
1314
|
+
constructor(options = {}) {
|
|
1315
|
+
this.#options = options;
|
|
1316
|
+
this.context = options.context instanceof ValorantContext ? options.context : new ValorantContext(options.context);
|
|
1317
|
+
Object.assign(this, this.#createApi());
|
|
1318
|
+
}
|
|
1319
|
+
/** Sends a request and returns status, headers and the parsed body. */
|
|
1320
|
+
async send(endpoint2, options = {}) {
|
|
1321
|
+
const input = options;
|
|
1322
|
+
const validation = input.validation ?? this.#options.validation ?? "loose";
|
|
1323
|
+
if (validation === "strict" && endpoint2.body !== void 0 && input.body !== void 0) {
|
|
1324
|
+
const parsed = endpoint2.body.safeParse(input.body);
|
|
1325
|
+
if (!parsed.success) throw new ValorantValidationError("request", endpoint2.name, parsed.error, input.body);
|
|
1326
|
+
}
|
|
1327
|
+
const retry = this.#options.retry === false ? void 0 : this.#options.retry ?? {};
|
|
1328
|
+
const maxRetries = retry ? retry.retries ?? 2 : 0;
|
|
1329
|
+
let refreshed = false;
|
|
1330
|
+
for (let attempt = 0; ; attempt++) {
|
|
1331
|
+
const request = buildRequest(endpoint2, input, this.context);
|
|
1332
|
+
const canRetry = attempt < maxRetries && input.signal?.aborted !== true;
|
|
1333
|
+
let response;
|
|
1334
|
+
try {
|
|
1335
|
+
response = await this.#transportFor(endpoint2)({ ...request, signal: this.#signal(input) });
|
|
1336
|
+
} catch (cause) {
|
|
1337
|
+
if (canRetry && IDEMPOTENT.has(request.method) && input.signal?.aborted !== true) {
|
|
1338
|
+
await sleep(backoff(attempt, retry), input.signal);
|
|
1339
|
+
continue;
|
|
1340
|
+
}
|
|
1341
|
+
throw new ValorantNetworkError(`${endpoint2.name} could not reach ${new URL(request.url).host}`, request.url, { cause });
|
|
1342
|
+
}
|
|
1343
|
+
if (isAuthHost(request.url)) this.#storeCookies(response.setCookies);
|
|
1344
|
+
this.#options.logger?.debug?.(`${request.method} ${request.url} -> ${response.status}`);
|
|
1345
|
+
if (response.status < 400) {
|
|
1346
|
+
return {
|
|
1347
|
+
status: response.status,
|
|
1348
|
+
headers: response.headers,
|
|
1349
|
+
data: this.#parseResponse(endpoint2, response, validation)
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
const error = this.#toError(endpoint2, request, response);
|
|
1353
|
+
if (error instanceof ValorantAuthError && this.#options.refreshTokens && !refreshed) {
|
|
1354
|
+
refreshed = true;
|
|
1355
|
+
await this.#refreshOnce();
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
if (canRetry && RETRYABLE_STATUS.has(response.status) && (response.status === 429 || IDEMPOTENT.has(request.method))) {
|
|
1359
|
+
const retryAfter = error instanceof ValorantRateLimitError ? error.retryAfterMs : void 0;
|
|
1360
|
+
await sleep(retryAfter ?? backoff(attempt, retry), input.signal);
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
throw error;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
#createApi() {
|
|
1367
|
+
const api = {};
|
|
1368
|
+
for (const [group, endpoints] of Object.entries(registry)) {
|
|
1369
|
+
api[group] = Object.fromEntries(Object.entries(endpoints).map(([name, endpoint2]) => [
|
|
1370
|
+
name,
|
|
1371
|
+
async (options) => (await this.send(endpoint2, options)).data
|
|
1372
|
+
]));
|
|
1373
|
+
}
|
|
1374
|
+
Object.assign(api["auth"], createAuthFlows(this));
|
|
1375
|
+
Object.assign(api["local"], createLocalFlows(this));
|
|
1376
|
+
return api;
|
|
1377
|
+
}
|
|
1378
|
+
#transportFor(endpoint2) {
|
|
1379
|
+
if (endpoint2.type === "local") return this.#options.localTransport ?? localTransport;
|
|
1380
|
+
return this.#options.transport ?? fetchTransport;
|
|
1381
|
+
}
|
|
1382
|
+
/** Transport used for requests to arbitrary remote hosts. */
|
|
1383
|
+
get transport() {
|
|
1384
|
+
return this.#options.transport ?? fetchTransport;
|
|
1385
|
+
}
|
|
1386
|
+
#signal(input) {
|
|
1387
|
+
const timeout = AbortSignal.timeout(input.timeoutMs ?? this.#options.timeoutMs ?? 15e3);
|
|
1388
|
+
return input.signal ? AbortSignal.any([input.signal, timeout]) : timeout;
|
|
1389
|
+
}
|
|
1390
|
+
#storeCookies(setCookies) {
|
|
1391
|
+
for (const line of setCookies) {
|
|
1392
|
+
const [pair = "", ...attributes] = line.split(";").map((part) => part.trim());
|
|
1393
|
+
const separator = pair.indexOf("=");
|
|
1394
|
+
if (separator <= 0) continue;
|
|
1395
|
+
const name = pair.slice(0, separator);
|
|
1396
|
+
const value = pair.slice(separator + 1);
|
|
1397
|
+
const expired = value === "" || attributes.some((a) => a.toLowerCase() === "max-age=0");
|
|
1398
|
+
this.context.setCookie(name, expired ? void 0 : value);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
#parseResponse(endpoint2, response, validation) {
|
|
1402
|
+
const data = unwrapEnvelope(endpoint2, parseBody(response.text));
|
|
1403
|
+
const schema = endpoint2.responses?.[String(response.status)];
|
|
1404
|
+
if (schema === void 0 || validation === "off") return data;
|
|
1405
|
+
const parsed = safeParse(schema, data);
|
|
1406
|
+
if (parsed.success) return parsed.data;
|
|
1407
|
+
if (validation === "strict") throw new ValorantValidationError("response", endpoint2.name, parsed.error, data);
|
|
1408
|
+
if (!this.#warned.has(endpoint2.name)) {
|
|
1409
|
+
this.#warned.add(endpoint2.name);
|
|
1410
|
+
this.#options.logger?.warn(`Response of "${endpoint2.name}" does not match its schema, returning raw data`, parsed.error.issues.slice(0, 5));
|
|
1411
|
+
}
|
|
1412
|
+
return data;
|
|
1413
|
+
}
|
|
1414
|
+
#toError(endpoint2, request, response) {
|
|
1415
|
+
const body = parseBody(response.text);
|
|
1416
|
+
const args = [response.status, endpoint2.name, request.url, body, response.headers];
|
|
1417
|
+
if (response.status === 429) return new ValorantRateLimitError(...args, parseRetryAfter(response.headers.get("retry-after")));
|
|
1418
|
+
const needsToken = endpoint2.riotRequirements?.token === true;
|
|
1419
|
+
const badClaims = typeof body === "object" && body !== null && body.errorCode === "BAD_CLAIMS";
|
|
1420
|
+
if (needsToken && (response.status === 401 || response.status === 400 && badClaims)) return new ValorantAuthError(...args);
|
|
1421
|
+
return new ValorantApiError(...args);
|
|
1422
|
+
}
|
|
1423
|
+
#refreshOnce() {
|
|
1424
|
+
this.#refreshing ??= Promise.resolve(this.#options.refreshTokens(this)).finally(() => {
|
|
1425
|
+
this.#refreshing = void 0;
|
|
1426
|
+
});
|
|
1427
|
+
return this.#refreshing;
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
function safeParse(schema, data) {
|
|
1431
|
+
try {
|
|
1432
|
+
return schema.safeParse(data);
|
|
1433
|
+
} catch (thrown) {
|
|
1434
|
+
if (thrown instanceof import_zod4.ZodError) return { success: false, error: thrown };
|
|
1435
|
+
const message = thrown instanceof Error ? thrown.message : String(thrown);
|
|
1436
|
+
return { success: false, error: new import_zod4.ZodError([{ code: "custom", path: [], message: `Schema transform threw: ${message}` }]) };
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
function parseBody(text2) {
|
|
1440
|
+
if (text2 === "") return void 0;
|
|
1441
|
+
try {
|
|
1442
|
+
return JSON.parse(text2);
|
|
1443
|
+
} catch {
|
|
1444
|
+
return text2;
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
function parseRetryAfter(value) {
|
|
1448
|
+
if (value === null) return void 0;
|
|
1449
|
+
const seconds = Number(value);
|
|
1450
|
+
if (Number.isFinite(seconds)) return seconds * 1e3;
|
|
1451
|
+
const date = Date.parse(value);
|
|
1452
|
+
return Number.isNaN(date) ? void 0 : Math.max(0, date - Date.now());
|
|
1453
|
+
}
|
|
1454
|
+
function backoff(attempt, retry) {
|
|
1455
|
+
const base = retry?.baseDelayMs ?? 500;
|
|
1456
|
+
const max = retry?.maxDelayMs ?? 8e3;
|
|
1457
|
+
return Math.min(max, base * 2 ** attempt) * (0.5 + Math.random() / 2);
|
|
1458
|
+
}
|
|
1459
|
+
function sleep(ms, signal) {
|
|
1460
|
+
return new Promise((resolve) => {
|
|
1461
|
+
const timer = setTimeout(done, ms);
|
|
1462
|
+
signal?.addEventListener("abort", done, { once: true });
|
|
1463
|
+
function done() {
|
|
1464
|
+
clearTimeout(timer);
|
|
1465
|
+
signal?.removeEventListener("abort", done);
|
|
1466
|
+
resolve();
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
// src/index.ts
|
|
1472
|
+
__reExport(index_exports, require("valorant-api-types"), module.exports);
|
|
1473
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1474
|
+
0 && (module.exports = {
|
|
1475
|
+
MissingContextError,
|
|
1476
|
+
MissingParameterError,
|
|
1477
|
+
ValorantApiError,
|
|
1478
|
+
ValorantAuthError,
|
|
1479
|
+
ValorantClient,
|
|
1480
|
+
ValorantContext,
|
|
1481
|
+
ValorantError,
|
|
1482
|
+
ValorantNetworkError,
|
|
1483
|
+
ValorantRateLimitError,
|
|
1484
|
+
ValorantValidationError,
|
|
1485
|
+
fetchTransport,
|
|
1486
|
+
isRegion,
|
|
1487
|
+
localTransport,
|
|
1488
|
+
parseAuthRedirect,
|
|
1489
|
+
parseLockfile,
|
|
1490
|
+
readLockfile,
|
|
1491
|
+
registry,
|
|
1492
|
+
shardForRegion,
|
|
1493
|
+
...require("valorant-api-types")
|
|
1494
|
+
});
|
|
1495
|
+
//# sourceMappingURL=index.cjs.map
|