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

@justgold/partner-sdk

v1.0.0

Published

HMAC-SHA256 request signing and verification for API integrations

Readme

@justgold/partner-sdk

Official SDK for authenticating requests to the JustGold API. Provides HMAC-SHA256 request signing and verification with no dependencies.

Installation

npm install @justgold/partner-sdk

or

yarn add @justgold/partner-sdk

Requirements

  • Node.js >= 18

Quick Start

import { signRequest } from '@justgold/partner-sdk';

const headers = signRequest({
  method: 'POST',
  path: '/v1/orders',
  body: JSON.stringify({ amount: 100 }),
  clientId: 'YOUR_CLIENT_ID',
  secret: 'YOUR_CLIENT_SECRET',
});

// Attach the returned headers to your HTTP request
fetch('https://api.justgold.me/v1/orders', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    ...headers,
  },
  body: JSON.stringify({ amount: 100 }),
});

Signing Algorithm

Every request must be signed using HMAC-SHA256. This section documents the algorithm so you can implement it in any language.

Required Headers

| Header | Description | |---------------|--------------------------------------------------| | x-client-id | Your client ID, provided by JustGold | | x-timestamp | Unix timestamp (seconds) at time of request | | x-signature | HMAC-SHA256 hex signature of the string to sign |

String to Sign

Construct the string to sign by joining the following fields with a newline character (\n):

METHOD\n
PATH\n
SORTED_QUERY_STRING\n
BODY_HASH\n
TIMESTAMP

| Field | Description | |----------------------|-----------------------------------------------------------------------------| | METHOD | HTTP method in uppercase, e.g. GET, POST | | PATH | Request path without query string, e.g. /v1/orders | | SORTED_QUERY_STRING| Query parameters sorted alphabetically by key, joined with &, e.g. page=1&sort=asc. Empty string if no query params. | | BODY_HASH | SHA-256 hex digest of the raw request body. Use SHA-256 of an empty string if no body. | | TIMESTAMP | The same Unix timestamp sent in x-timestamp |

Generating the Signature

signature = HMAC-SHA256(secret, stringToSign)
           |> hex encode

Timestamp Tolerance

The server rejects requests where the x-timestamp differs from the server's current time by more than 300 seconds (5 minutes). Always use a fresh timestamp per request.