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

@buun_group/destroy-network-sdk

v1.0.3

Published

Official TypeScript SDK for DESTROY.NETWORK — privacy-first disposable email service

Readme

@buun_group/destroy-network-sdk

Official TypeScript SDK for DESTROY.NETWORK — a privacy-first disposable email service.

Installation

npm install @buun_group/destroy-network-sdk

Quick Start

import { DestroyNetwork } from '@buun_group/destroy-network-sdk';

// Reads DESTROY_NETWORK_API_KEY from environment automatically
const client = new DestroyNetwork();

// Or provide explicitly
const client = new DestroyNetwork({
  apiKey: 'sk_live_abc123...',
});

Usage

Inboxes

// Create a disposable inbox
const inbox = await client.inboxes.create({
  domain: '748392.best',
  customName: 'my-temp',
});
console.log(inbox.address); // [email protected]

// List messages (paginated)
const page = await client.inboxes.listMessages(inbox.id, { limit: 10 });
console.log(`${page.pagination.total} messages`);

// Auto-paginate through all messages
for await (const msg of client.inboxes.listMessagesAutoPaging(inbox.id)) {
  console.log(msg.subject, msg.from);
}

// Get full message content
const message = await client.inboxes.getMessage(inbox.id, 'msg_123');
console.log(message.bodyText);
console.log(message.bodyHtml);

// Download attachment
const response = await client.inboxes.downloadAttachment(inbox.id, 'msg_123', 'att_456');
const blob = await response.blob();

// Extend inbox lifetime
await client.inboxes.extend(inbox.id);

// Delete inbox
await client.inboxes.delete(inbox.id);

User Account

// Get current user profile
const user = await client.user.me();
console.log(user.email, user.subscriptionTier);

// Get user stats
const stats = await client.user.stats();
console.log(`${stats.messages.total} emails received`);

// List all inboxes
const inboxes = await client.user.listInboxes();

Teams (Business Plan)

// Create a team
const team = await client.teams.create({ name: 'Engineering' });

// Invite a member
await client.teams.invite(team.id, { email: '[email protected]' });

// Share an inbox with the team
await client.teams.shareInbox(team.id, { inboxId: inbox.id });

// List team inboxes
const shared = await client.teams.listInboxes(team.id);

Labels (Pro/Business)

// Create a label
const label = await client.labels.create({ name: 'Important', color: '#ff0000' });

// Add label to a message
await client.labels.addToMessage('msg_123', label.id);

Inbox Rules (Pro/Business)

// Auto-forward emails from a specific sender
await client.inboxRules.create({
  name: 'Forward GitHub',
  fromPattern: '*@github.com',
  action: 'forward',
  actionValue: '[email protected]',
});

Webhooks

// Create a webhook for new messages
const webhook = await client.webhooks.create({
  url: 'https://example.com/webhook',
  events: ['message.received', 'inbox.expired'],
});
console.log(webhook.secret); // Store this — only returned once

// Test webhook delivery
await client.webhooks.test(webhook.id);

Custom Domains

// Add a custom domain
const domain = await client.domains.add({ domain: 'mail.example.com' });

// Verify DNS records
const txt = await client.domains.verifyTxt(domain.id);
const mx = await client.domains.verifyMx(domain.id);

Billing

// Create a checkout session for upgrading
const { url } = await client.billing.createCheckout({
  plan: 'pro',
  interval: 'monthly',
});
// Redirect user to `url`

// Check subscription status
const sub = await client.billing.getSubscription();
console.log(sub.plan, sub.status);

Error Handling

All errors extend APIError with typed subclasses:

import {
  DestroyNetwork,
  NotFoundError,
  RateLimitError,
  AuthenticationError,
} from '@buun_group/destroy-network-sdk';

try {
  await client.inboxes.get('nonexistent');
} catch (error) {
  if (error instanceof NotFoundError) {
    console.log('Inbox not found');
  } else if (error instanceof RateLimitError) {
    console.log(`Retry after ${error.retryAfter}s`);
  } else if (error instanceof AuthenticationError) {
    console.log('Invalid API key');
  }
}

Configuration

const client = new DestroyNetwork({
  // API key (default: reads DESTROY_NETWORK_API_KEY env var)
  apiKey: 'sk_live_...',

  // Base URL (default: https://destroy.network)
  baseURL: 'https://destroy.network',

  // Request timeout in ms (default: 30000)
  timeout: 30000,

  // Retry config
  retry: {
    maxRetries: 2,           // default: 2
    initialDelayMs: 500,     // default: 500
    maxDelayMs: 8000,        // default: 8000
    backoffMultiplier: 2,    // default: 2
  },

  // Custom fetch implementation
  fetch: customFetch,
});

Requirements

  • Node.js >= 18 (or any runtime with global fetch)
  • TypeScript >= 5.0 (optional, for type safety)

License

MIT