@reino-doce/steam-dota-client is an ESM Node.js library for Steam authentication, Dota Game Coordinator queries, and spectator feeds. Each connector owns its account and computer profile; each watch owns its transport, decoder, and observation history.
Use Node.js >=24.21.0 <25 and npm >=12.1.0.
npm install @reino-doce/steam-dota-clientThe package's lifecycle script applies reviewed patches to pinned upstream dependencies. For an npm 12 consumer, approve that script and rebuild the dependency:
npm install-scripts approve @reino-doce/steam-dota-client
npm rebuild @reino-doce/steam-dota-clientKeep the resulting allowScripts policy in the consuming project. Also apply the consumer dependency overrides: npm does not inherit a dependency's root overrides.
Steam-only operations need a saved account. Standalone spectator feeds additionally need an operator-supplied native worker and compatible Valve networking library; follow SDR runtime setup. The package does not require a desktop Steam client or installed Dota game for its standalone path.
Enroll an account through the local operator or account API. Auth files contain reusable plaintext credentials; keep them in a private directory and pass their paths only to the local connector.
This example reads the saved account's friends. Set STEAM_AUTH_FILE_PATH and a positive numeric DOTA_CLIENT_VERSION before running it:
import { SteamDotaClient } from '@reino-doce/steam-dota-client';
const authFile = process.env.STEAM_AUTH_FILE_PATH;
const clientVersion = Number(process.env.DOTA_CLIENT_VERSION);
if (!authFile || !Number.isInteger(clientVersion) || clientVersion < 1 || clientVersion > 0xffffffff) {
throw new Error('Configure STEAM_AUTH_FILE_PATH and DOTA_CLIENT_VERSION.');
}
const client = new SteamDotaClient({
authFile,
gameData: {
clientVersion,
schemaHash: 'unverified',
mapIdentity: 'unverified',
protocolManifest: {},
data: {},
},
});
try {
await client.connect();
const friends = await client.refreshFriends({ timeoutMs: 10_000 });
for (const friend of friends) {
console.log(friend.steamId64, friend.name, friend.dotaStatus);
}
} finally {
await client.close();
}connect() establishes Steam access. Opening a watch activates Dota for that feed. Replace the example's unverified metadata with version-matched game data when projecting a spectator stream.
The documentation index lists the public exports and integration paths.
| Reference | Contents |
|---|---|
| Client and watches | Constructor, queries, target resolution, lifecycle, recovery, events |
| Accounts and authentication | Enrollment, saved profiles, Guard challenges, computer profiles |
| Identity utilities | Steam/Dota identifiers, profile lookup, lane-selection flags |
| Frames | Snapshot fields, coverage, observation times, inventory and abilities |
| Event streams | Combat logs, late names, gameplay messages, explicit gaps |
| Game data | Caller-supplied schema, map, and projection metadata |
| Transport | Native SDR, local SourceTV, low-level Source 2 sessions |
| Errors | Error codes and safe diagnostics |
| Guide | Task |
|---|---|
| Watching a match | Open delayed or Dota Plus feeds and clean up resources |
| Local account operator | Enroll accounts through a local HTTP interface |
| JSONL feed | Configure snapshot streaming and the bounded JSONL writer |
| SDR runtime | Build and supply the native runtime; platform evidence |
| SDR troubleshooting | Bootstrap, trust, ABI, IPC, and transport failures |
| Development | Build, checks, packaging, and opt-in live validation |
Preserve Steam, account, lobby, match, game-server, and watch-server IDs as decimal strings. Delayed DotaTV and Dota Plus plus-live are separate authorization paths; a live denial never becomes a delayed feed automatically.
Frames are latest projected snapshots with explicit domain coverage. A missing or out-of-PVS value does not establish an empty inventory, destroyed entity, or current position. Retained values keep their original observation time. Ordered combat/gameplay events and decode gaps are delivered separately from frames.
Offline tests establish local behavior. Historical live observations and remaining platform limits are documented in the runtime guide; a successful handshake alone does not establish complete decoding or sustained match coverage.