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

gatewire

v2.0.0

Published

Official Node.js SDK for the GateWire SMS Infrastructure.

Readme

GateWire Node.js SDK

The official Node.js library for the GateWire SMS Infrastructure.

Send OTPs, alerts, and notifications to North African carriers (Mobilis, Djezzy, Ooredoo) using our decentralized mesh network.

Features

  • TypeScript Support: Fully typed for better DX.
  • Promise-based: Works with async/await.
  • Error Handling: Clean error messages for API failures via GateWireError.

Installation

npm install gatewire
# or
yarn add gatewire

Quick Start

import { GateWireClient, GateWireError } from 'gatewire';

const gw = new GateWireClient({ apiKey: 'sk_live_YOUR_API_KEY' });

// 1. Send OTP
const { reference_id } = await gw.sendOtp({ phone: '+213770123456' });

// 2. (optional) Poll until sent
const status = await gw.getStatus(reference_id);

// 3. Verify code entered by the user
try {
  await gw.verifyOtp(reference_id, userEnteredCode);
  console.log('Verified!');
} catch (err) {
  if (err instanceof GateWireError) {
    console.error(err.message, err.statusCode);
  }
}

API Reference

gw.sendOtp(options)

Send an OTP to a phone number.

| Field | Type | Required | Description | |---|---|---|---| | phone | string | Yes | E.164 format, e.g. +213770123456 | | template_key | string | No | Dashboard template key (omit for default) |

Returns { reference_id: string, status: 'pending' }.

gw.verifyOtp(referenceId, code)

Verify the code entered by the end-user.

Returns { status: 'verified', message: string }. Throws GateWireError on invalid/expired codes.

gw.getStatus(referenceId)

Poll the delivery status of a previously sent OTP.

Returns { reference_id, status, created_at } where status is one of: pending | dispatched | sent | verified | failed | expired | cancelled

Error Handling

All API errors throw a GateWireError with:

| Property | Type | Description | |---|---|---| | message | string | Human-readable error from the API | | statusCode | number \| undefined | HTTP status code | | body | unknown | Raw response body |

Notable status codes: 402 (insufficient balance), 429 (rate limited), 503 (no devices available).

Development

Running tests

npm test              # run all tests
npm run test:coverage # run with coverage report

Tests use Jest + ts-jest. Axios is mocked — no real HTTP requests are made.

Building

npm run build   # compiles TypeScript to dist/

License

The GateWire Node.js SDK is open-sourced software licensed under the MIT license.