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

@metadai/seller-sdk

v0.1.0

Published

MetaD Seller Agent SDK - Build AI agents for e-commerce

Readme

@metad/seller-sdk

MetaD Seller Agent SDK — Build AI agents for e-commerce. Connect your store to the MetaD agent network in minutes.

Installation

npm install @metad/seller-sdk

Quick Start

Seller Side

import { AgentCardManager, OfferBuilder, createRegistryClient } from '@metad/seller-sdk';

// 1. Create agent identity
const manager = new AgentCardManager({
  domain: 'shop.mybrand.com',
  config: {
    name: 'MyBrand Agent',
    type: 'seller',
    endpoint: 'https://agent.mybrand.com/metad',
    capabilities: ['product.search', 'order.create'],
    catalog: {
      categories: ['fashion'],
      sku_count: 500,
      price_range: { min: 20, max: 300, currency: 'USD' },
    },
  },
});

const card = manager.create();
const keyPair = manager.getKeyPair()!;

// 2. Register with MetaD Registry
const registry = createRegistryClient({ base_url: 'https://registry.metad.ai' });
await registry.register(card, keyPair);

// 3. Build and sign an Offer in response to a buyer Intent
const builder = new OfferBuilder({ agentCard: card, keyPair });
const offer = builder.build({
  intent: buyerIntent,
  products: [{ sku: 'DRESS-001', name: 'Linen Dress', price: 89, currency: 'USD' }],
  shipping: { method: 'standard', days: 5, cost: 0 },
  validity_period: 300,
});

Buyer Side

import { IntentBuilder, OfferEvaluator, OrderClient } from '@metad/seller-sdk/buyer';

// 1. Build a purchase Intent
const intentBuilder = new IntentBuilder({ agentCard: buyerCard, keyPair: buyerKeyPair });
const intent = intentBuilder.build({
  type: 'purchase',
  product: { category: 'fashion' },
  budget: { max: 150, currency: 'USD' },
  delivery: { country: 'US', days_max: 7, method: 'standard' },
  quantity: 1,
});

// 2. Evaluate multiple Offers and pick the best
const evaluator = new OfferEvaluator();
const ranked = evaluator.rank(offers);
const best = ranked[0];

// 3. Confirm order (with optional x402 payment)
const client = new OrderClient({ signer: viemSigner });
const order = await client.confirm(best, intent);

Shopify Adapter

import { ShopifyAdapter } from '@metad/seller-sdk/adapters/shopify';
import { IntentHandler } from '@metad/seller-sdk';

const shopify = new ShopifyAdapter({
  storeDomain: 'my-store.myshopify.com',
  accessToken: 'shpat_xxxxx',
});

const handler = new IntentHandler({ agentCard: card, keyPair, catalogAdapter: shopify });
const result = await handler.handle(buyerIntent);

x402 Payment (USDC on Base)

import { createViemSigner, X402Client } from '@metad/seller-sdk';

// Buyer: sign and send USDC payment
const signer = createViemSigner({ privateKey: process.env.BUYER_PRIVATE_KEY });
const x402 = new X402Client(signer);
const response = await x402.fetch('https://seller.example.com/metad/orders', {
  method: 'POST',
  body: JSON.stringify(orderBody),
});

Onboarding CLI

npx @metad/seller-sdk init

Interactive setup: generates ed25519 keypair, builds AgentCard, registers with MetaD Registry.

Protocol Flow

Buyer Agent          MetaD Registry        Seller Agent
    │                      │                    │
    │── discover ──────────>│                    │
    │<─ [AgentCards] ───────│                    │
    │                       │                    │
    │── Intent ─────────────────────────────────>│
    │<─ Offer (signed) ──────────────────────────│
    │                       │                    │
    │── x402 payment ───────────────────────────>│
    │<─ Order confirmed ─────────────────────────│

Links

License

MIT