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

@viverse/sdk

v1.3.3

Published

VIVERSE SDK

Readme

VIVERSE SDK

📝 Requirements

  • Node.js v20.19.0 or higher

📦 Installation

ES Module

npm install @viverse/sdk

🛠️ Usage

Client

The main client for handling authentication and user information.

Initialization

import { Client } from '@viverse/sdk';

const viverseClient = new Client({
  clientId: 'YOUR_APP_ID', // APP ID
  domain: 'account.htcvive.com', // HTC Account domain
  cookieDomain: 'YOUR_COOKIE_DOMAIN', // Optional — if not provided, the current domain will be used.
});

Login

Login With Worlds:

/**
 * If successful, the `Result` value will be returned.
 * It will also automatically refresh the token if expires_in is less than 180 seconds.
 */

interface Result {
  access_token: string; // The access token to be used in API requests
  account_id: string; // The unique user account ID
  expires_in: number; // Remaining token lifetime in seconds
  state: string; // Optional custom state value from the original login
}

// Step 1: Use loginWithWorlds to login
viverseClient.loginWithWorlds({
  state: '{"page":"/items/123456"}', // Optional — this variable is returned upon successful login.
});

// Step 2: If login successfully, iframe will be refreshed. please use the following functions to check the login status
window.addEventListener('load', async function () {
  const result = await viverseClient.checkAuth() as Result | undefined;
  if (result && result.access_token) {
    // already login
  } else {
    // no logged in
  }
});

Get Token

type TokenResponse = {
  access_token: string;
  account_id: string;
  expires_in: number;
  scope?: string;
  token_type?: string;
  created_at?: number;
  state?: string;
};

// Get the access token
const token = await viverseClient.getToken() as string | undefined;

// Get detailed token response
const detailedToken = await viverseClient.getToken({ detailedResponse: true }) as TokenResponse | undefined;

Avatar

Get user profile and avatar data

Initialization

import { Avatar } from '@viverse/sdk';

const avatarClient = new Avatar({
  baseURL: 'https://sdk-api.viverse.com/',
  token: 'USER_ACCESS_TOKEN', // from viverseClient.getToken()
});

Get User Profile

const profile = await avatarClient.getProfile();

Get User Avatar List

const avatarList = await avatarClient.getAvatarList();

Get User Active Avatar

const activeAvatar = await avatarClient.getActiveAvatar();

Get Public Avatar List

const publicAvatarList = await avatarClient.getPublicAvatarList();

Get Public Avatar By ID

const publicAvatar = await avatarClient.getPublicAvatarByID('PUBLIC_AVATAR_ID');

Get Public Avatar By ID

const avatarArrayBuffer = await avatarClient.getAvatarFileWithSDK('AVATAR_URL');

Game Dashboard

Provides access to game-related features like leaderboards and achievements.

Initialization

import { GameDashboard } from '@viverse/sdk';

const gameDashboardClient = new GameDashboard({
  baseURL: 'https://www.viveport.com/',
  communityBaseURL: 'https://www.viverse.com/',
  token: 'USER_ACCESS_TOKEN', // from viverseClient.getToken()
});

Get Leaderboard Ranking:

const ranking = await gameDashboardClient.getLeaderboard(
  'YOUR_APP_ID',
  {
    name: 'LEADERBOARD_NAME',
    range_start: 0,
    range_end: 100,
    region: 'global', // or 'local'
    time_range: 'alltime', // or 'daily', 'weekly', 'monthly'
    around_user: false,
  }
);

Get Guest Leaderboard Ranking:

const ranking = await gameDashboardClient.getGuestLeaderboard(
  'YOUR_APP_ID',
  {
    name: 'LEADERBOARD_NAME',
    range_start: 0,
    range_end: 100,
    region: 'global', // or 'local'
    time_range: 'alltime', // or 'daily', 'weekly', 'monthly'
    country_code: 'US', // ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'JP', 'TW')
  }
);

Upload Score:

await gameDashboardClient.uploadLeaderboardScore(
  'YOUR_APP_ID',
  [{ name: 'LEADERBOARD_NAME', value: '100.0' }]
);

Get User Achievements:

const achievements = await gameDashboardClient.getUserAchievement('YOUR_APP_ID');

Upload User Achievements:

await gameDashboardClient.uploadUserAchievement(
  'YOUR_APP_ID',
  [{ api_name: 'ACHIEVEMENT_API_NAME', unlock: true }]
);

Play

Handles real-time gameplay features.

Initialization

import { Play } from '@viverse/sdk';

const playClient = new Play();

Matchmaking

const matchmakingClient = playClient.newMatchmakingClient('YOUR_APP_ID');

Multiplayer

const multiplayerClient = playClient.newMultiplayerClient('YOUR_ROOM_ID', 'YOUR_APP_ID', 'USER_SESSION_ID');

Storage

Manages cloud save data.

Initialization

import { Storage } from '@viverse/sdk';

const storageClient = new Storage();

Cloud Save

const cloudSaveClient = storageClient.newCloudSaveClient('YOUR_APP_ID');

📚 Documentation

For further API details, please refer to the VIVERSE Documentation site.

Introduction to Developer Tools