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

@galva-io/galva-admin-node

v1.0.2-dev

Published

Node.js SDK for Galva Admin API

Readme

Galva Admin Node SDK

Node.js SDK for syncing billing events and managing end users with Galva.

Installation

npm install galva-admin-node

Peer dependencies (install as needed):

npm install @paddle/paddle-node-sdk  # For Paddle
npm install googleapis               # For Play Store

Quick Start

import { Galva } from 'galva-admin-node';

const galva = new Galva({ apiKey: 'your-api-key' });
// Or set GALVA_API_KEY environment variable

Billing Events

With Pre-verified Payloads

Use when you've already decoded/verified payloads yourself.

// App Store
await galva.billingEvent.appstore('user-123', {
  signedPayload: '...',
  bundleId: 'com.example.app',
  appAppleId: 123456789,
});

// Play Store (decoded notification)
await galva.billingEvent.playstore('user-123', decodedNotification);

// Paddle (verified event)
await galva.billingEvent.paddle('user-123', verifiedEvent);

With Credentials (Auto-verification)

Use withCredentials() to let the SDK handle decoding and verification.

const galvaWithCreds = galva.withCredentials({
  appstore: {
    bundleId: 'com.example.app',
    appAppleId: 123456789,
  },
  playstore: {
    email: '[email protected]',
    key: '-----BEGIN PRIVATE KEY-----\n...',
  },
  paddle: {
    apiKey: 'pdl_...',
    secretKey: 'whsec_...',
  },
});

// App Store (signed payload only)
await galvaWithCreds.billingEvent.appstore('user-123', signedPayload);

// Play Store (base64 from Pub/Sub - auto-decodes and fetches subscription)
await galvaWithCreds.billingEvent.playstore('user-123', base64Payload);

// Paddle (raw body + signature - auto-verifies)
await galvaWithCreds.billingEvent.paddle('user-123', rawBody, signature);

End User Management

import { EndUserDefaultTraitName } from 'galva-admin-node';

// Identify with traits
await galva.endUser.identify('user-123', {
  traits: {
    [EndUserDefaultTraitName.EMAIL]: '[email protected]',
    [EndUserDefaultTraitName.FULL_NAME]: 'John Doe',
    customTrait: 'value',
  },
});

// Update default profile info
await galva.endUser.updateDefaultInfo('user-123', {
  email: '[email protected]',
  fullName: 'John Doe',
  country: 'US',
});

Configuration

interface GalvaOptions {
  apiKey?: string;                          // Falls back to GALVA_API_KEY env
  environment?: 'production' | 'development'; // Falls back to NODE_ENV
  timeout?: number;                         // Request timeout in ms (default: 10000)
}

Error Handling

import { GalvaError } from 'galva-admin-node';

try {
  await galva.billingEvent.appstore('user-123', payload);
} catch (error) {
  if (error instanceof GalvaError) {
    console.error(error.code, error.message);
  }
}

Requirements

  • Node.js >= 18.0

License

MIT