npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaqwq/valorantapi

v1.0.1

Published

local api

Readme

@reaqwq/valorantapi

日本語のREADMEはこちら

An unofficial, native JavaScript (Node.js) library for communicating directly with a locally running Valorant client and Riot's PvP APIs.

Automatically authenticates via the Valorant lockfile, so there is no manual credential setup — just call init() and start making API calls.

Features

  • Automatic Auth — Detects the Riot lockfile, parses the session, and sets up all required headers automatically.
  • Fully Async — Every endpoint is an async/await Promise.
  • Color Logger — Built-in INFO / SUCCESS / WARN / ERROR logger for clean terminal output.
  • MVC Controllers — Logically separated modules: account, match, party, pregame, store, content, system, chat.
  • FocusManager — Polls the active window (via active-win) and fires a callback when Valorant gains or loses focus.
  • Electron Overlay — Ships with a ready-to-run transparent always-on-top Electron overlay (overlay.js + overlay.html).

Installation

npm install @reaqwq/valorantapi

Quick Start

Valorant must be running on your local machine before calling init().

const ValorantApi = require('@reaqwq/valorantapi');

const api = await ValorantApi.init();
const puuid = await api.account.getCurrentPlayerPuuid();
ValorantApi.Logger.success(`My PUUID: ${puuid}`);

API Reference

Account (api.account)

| Method | Description | |---|---| | getCurrentPlayer() | Get your Riot account info | | getCurrentPlayerPuuid() | Get your PUUID | | getAccountXP(puuid) | Get player XP | | getPlayerLoadout(puuid) | Get weapon / banner loadout | | getPlayerMmr(puuid) | Get rank and MMR data | | getPlayerRestrictions() | Get account penalties |

Party & Matchmaking (api.party)

| Method | Description | |---|---| | getCurrentParty() | Get current party state | | partyInvite(displayName) | Invite a player (e.g. "Jett#001") | | setPlayerReady(state) | Set ready state (true/false) | | joinQueue() | Enter matchmaking queue |

Pregame & Agent Select (api.pregame)

| Method | Description | |---|---| | getPregamePlayer(puuid) | Get pregame match info | | pregameSelectCharacter(matchId, agentId) | Hover an agent | | pregameLockCharacter(matchId, agentId) | Lock in an agent |

Match History (api.match)

| Method | Description | |---|---| | getCurrentMatchInfo(matchId) | Get live match data | | getMatchHistory(puuid) | Get match history list | | getMatchDetails(matchId) | Get post-game result details |

Content (api.content)

| Method | Description | |---|---| | getAgentFromName(name) | Find an agent by name | | getAgentFromCategory(role) | List agents by role (Role.Duelist, etc.) |

Store (api.store)

| Method | Description | |---|---| | getStorefront(puuid) | Get daily shop offers | | getWallet(puuid) | Get VP and Radianite balances |

System & Chat (api.system / api.chat)

| Method | Description | |---|---| | getRegion() | Get client region | | getClientVersion() | Get current game patch version | | getFriends() | Get friends list | | sendMessage(message, cid) | Send a chat message |

FocusManager

Detects when Valorant has window focus. Uses active-win — no shell spawning.

const { FocusManager } = require('@reaqwq/valorantapi');

const fm = new FocusManager();
fm.start((isFocused) => {
    console.log(isFocused ? 'Valorant focused' : 'Backgrounded');
}).setInterval(1000); // poll every 1 second

Electron Overlay

A transparent, borderless, always-on-top overlay window that displays player stats while Valorant is in focus.

Files:

  • overlay.js — Electron main process. Initializes the API, loads player stats (name, rank, wins), and manages the FocusManager.
  • overlay.html — The overlay UI. Receives data via Electron IPC.

Run:

npm run overlay

The overlay automatically:

  1. Loads your player name and rank from the MMR API.
  2. Shows when Valorant is in focus, hides when backgrounded.
  3. Is fully click-through (does not intercept game input).

Examples

| File | Description | |---|---| | examples/basic_usage.js | Initialize and fetch your PUUID and game version | | examples/test_agent_helpers.js | Query agents using MVC controllers | | examples/instalock_bot.js | Experimental pregame agent auto-lock |

Disclaimer

This is an unofficial personal project. It is not affiliated with or endorsed by Riot Games. Use responsibly. Misuse (e.g. dodge tools, disruptive automation) may result in account bans. The developers hold no liability.