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

ordian-mail

v0.1.0

Published

Ordian Mail — pay-per-use email API for AI agents. No API keys, no accounts, just USDC.

Downloads

98

Readme

Ordian Mail

Email API for AI agents, paid with USDC on Base via the x402 protocol.

No API keys. No accounts. Your wallet is your identity.

Install

npm install ordian-mail viem

Quick Start

import { OrdianMail } from "ordian-mail";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { publicActions } from "viem";

const signer = createWalletClient({
  account: privateKeyToAccount("0x..."),
  chain: base,
  transport: http(),
}).extend(publicActions);

const mail = new OrdianMail({
  signer,
  baseUrl: "https://mail-api.ordian.ai",
});

// Create an inbox ($0.10)
const { data: inbox } = await mail.inboxes.create({
  display_name: "My Agent",
  username: "support",        // → [email protected]
});

// Send an email ($0.01)
await mail.messages.send({
  inbox_id: inbox.id,
  to: "[email protected]",
  subject: "Hello from my agent",
  text: "Plain text body",
  markdown: "# Hello\n\nThis email was sent by an AI agent.",
});

Pricing

USDC on Base. Paid per request.

| Action | Price | |--------|-------| | Create inbox | $0.10 | | Send email | $0.01 | | List messages | $0.002 | | Read message | $0.002 | | Register webhook | $0.05 | | Renew inbox | $0.05 | | Register domain | $1.00 |

What's included

  • Inboxes — Create, list, renew, delete. Optional custom username.
  • Send — Plain text, HTML, or Markdown. CC/BCC. Attachments.
  • Receive — Inbound emails stored and queryable. Webhook notifications.
  • Threads — Automatic threading via Message-ID/In-Reply-To. Filter by thread.
  • Custom Domains — Bring your own domain with DNS verification and DKIM.
  • Webhooksmessage.received, inbox.expiring, inbox.expired.
  • Bounce handling — Automatic bounce tracking and suppression.

How payments work

The SDK handles x402 payments automatically. Each paywalled request:

  1. Gets a 402 response with payment details
  2. Signs a USDC authorization with your wallet
  3. Retries with the payment attached

API

Inboxes

// Create
const { data, error } = await mail.inboxes.create({
  display_name: "My Agent",
  username: "hello",              // optional
  domain_id: "uuid",              // optional, use a verified custom domain
  metadata: { role: "support" },  // optional
});

// List (filtered by wallet)
const { data } = await mail.inboxes.list({ limit: 10 });

// List messages
const { data } = await mail.inboxes.listMessages(inboxId, {
  thread_id: "uuid",  // optional
});

// Renew (extend expiry by 30 days)
const { data } = await mail.inboxes.renew(inboxId);

// Delete
const { data } = await mail.inboxes.delete(inboxId);

Messages

// Send
const { data } = await mail.messages.send({
  inbox_id: "uuid",
  to: "[email protected]",          // or ["[email protected]", "[email protected]"]
  cc: ["[email protected]"],               // optional
  bcc: ["[email protected]"],             // optional
  subject: "Hello",
  text: "Plain text body",
  markdown: "# Hello\n\nMarkdown body", // optional, rendered to HTML
  html: "<h1>Hello</h1>",               // optional, overrides markdown
  in_reply_to: "<message-id>",          // optional, for threading
});

// Read
const { data } = await mail.messages.read(messageId);

// Delivery status
const { data } = await mail.messages.deliveryStatus(messageId);

Custom Domains

// Register (returns DNS records to configure)
const { data } = await mail.domains.create({ domain: "mycompany.com" });

// Verify DNS
const { data } = await mail.domains.verify(domainId);

// List
const { data } = await mail.domains.list();

Webhooks

// Register
const { data } = await mail.webhooks.create({
  inbox_id: "uuid",
  url: "https://your-server.com/webhook",
  events: ["message.received", "inbox.expiring"],
});

// List deliveries
const { data } = await mail.webhooks.deliveries(webhookId);

CLI

A companion CLI is available as ordian-mail-cli:

npx ordian-mail-cli inbox create --name "My Agent" --username "hello"
npx ordian-mail-cli send --inbox <id> --to [email protected] --subject "Hi" --text "Hello"

License

MIT