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

@lowstacktechnologies/mds-client

v3.0.0

Published

TypeScript client library for the Message Delivery Service

Downloads

95

Readme

Message Delivery Service TypeScript Client

A TypeScript/JavaScript client library for the Message Delivery Service, featuring automatic Ed25519 request signing and type-safe API wrappers.

Installation

# Using Bun
bun add @lowstacktechnologies/mds-client

# Using npm
npm install @lowstacktechnologies/mds-client

# Using pnpm
pnpm add @lowstacktechnologies/mds-client

Usage

import { MdsClient } from "@lowstacktechnologies/mds-client";

// Initialize the client
const client = new MdsClient(
  "http://localhost:3000",  // Server URL
  "your-client-id",         // Client ID
  "your-private-key-base64" // Ed25519 private key (Base64 or OpenSSH format)
);

// Send an email
const response = await client.sendEmail({
  from: { address: "[email protected]", name: "Sender Name" },
  to: "[email protected]",
  subject: "Hello World",
  content: { body: "This is the email body", isHtml: false }
});

console.log(response.message); // "Email accepted for delivery"

// Send an SMS
const smsResponse = await client.sendSms({
  senderName: "MyApp",
  to: "+1234567890",
  content: { body: "Hello from MDS!" }
});

Key Formats

The client supports multiple private key formats:

  • Base64: Raw 64-byte Ed25519 private key or 32-byte seed
  • OpenSSH: Keys generated with ssh-keygen -t ed25519
  • Hex: 64 or 128 character hex strings

Generating a Key Pair

ssh-keygen -t ed25519 -f mds_key -N ""

Then encode the private key for use:

cat mds_key | base64 -w 0

CLI Test Utility

The package includes an interactive CLI for testing:

# Run from cloned repository
bun run cli

# Run directly with Bun (via npm)
bunx @lowstacktechnologies/mds-client

# Or if installed globally
mds-cli

The CLI will prompt you for server URL, credentials, and message details.

API Reference

MdsClient

Constructor

new MdsClient(serverUrl: string, clientId: string, privateKey: string | Uint8Array)

Methods

  • sendEmail(request: EmailRequest): Promise<SuccessResponse>
  • sendSms(request: SmsRequest): Promise<SmsSuccessResponse>
  • health(): Promise<{ status: string; timestamp: string }>

Types

interface EmailRequest {
  from: { address: string; name?: string };
  to: string | EmailContact | (string | EmailContact)[];
  subject: string;
  content?: { body: string; isHtml?: boolean } | { template: { name: string; data: Record<string, unknown> } };
}

interface SmsRequest {
  senderName: string;
  to: string | { phone: string; country: string } | (string | { phone: string; country: string })[];
  content?: { body: string } | { template: { name: string; data: Record<string, unknown> } };
}