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

armoris-agent-buyer

v0.1.4

Published

Core SDK for the Armoris Agent Gateway, enabling AI Agents to checkout over the x402 Protocol.

Readme

armoris-agent-buyer

Core SDK for AI Agents to purchase products from WooCommerce stores using the x402 payment protocol.

npm License: MIT

Installation

npm install armoris-agent-buyer

Quick Start

import { discoverStore, buyFromStore } from 'armoris-agent-buyer';

// 1. Auto-discover store config from a product page URL
const store = await discoverStore('https://my-store.com/product/sneakers');

// 2. Purchase the item
const result = await buyFromStore({
  gatewayUrl: store.gatewayUrl,
  storeId: store.storeId,
  privateKey: '0x...',       // Agent's EVM wallet
  networkId: 31337,          // 31337 (local) or 324705682 (Skale Testnet)
  rpcUrl: 'http://localhost:8545',
}, {
  items: [{ sku: 'sneakers-001', quantity: 1 }],
  customerDetails: {
    email: '[email protected]',
    firstName: 'AI',
    lastName: 'Agent',
    address1: '123 Cloud St',
    city: 'Serverville',
    country: 'US',
    state: 'CA',
    postcode: '90210',
    phone: '555-0123',
  },
});

console.log('Order ID:', result.orderId);

API

discoverStore(shopUrl, fetchContextData?)

Scrapes a WooCommerce product/shop page for <meta name="x402:..."> tags and returns the store configuration.

| Parameter | Type | Description | |-----------|------|-------------| | shopUrl | string | URL of the WooCommerce product or shop page | | fetchContextData | boolean | Whether to also fetch extended context (default: true) |

Returns: StoreContext{ storeId, gatewayUrl, contextUrl, contextData? }

buyFromStore(config, request)

Executes the full purchase flow: quote → x402 payment signature → order submission.

| Parameter | Type | Description | |-----------|------|-------------| | config.gatewayUrl | string | Armoris Gateway URL | | config.storeId | string | Store identifier | | config.privateKey | 0x${string} | Agent's EVM private key | | config.networkId | number | Chain ID | | config.rpcUrl | string | RPC endpoint URL | | config.tokenAddress? | 0x${string} | ERC-20 token address (optional) | | config.facilitatorAddress? | 0x${string} | Facilitator contract address (optional) | | request.items | Array | [{ sku: string, quantity: number }] | | request.customerDetails | object | Billing/shipping details |

Returns: PurchaseResult{ success, orderId?, receipt?, error? }

Supported Frameworks

Works in any Node.js/TypeScript environment:

  • n8n — via the companion n8n-nodes-armoris-buyer node or Code Node
  • LangChain — wrap buyFromStore as a custom Tool
  • AutoGPT / CrewAI — import as a standard npm package
  • Custom scripts — see src/example.ts

Environment Variables

Copy .env.example and configure:

AGENT_PRIVATE_KEY=0x...
NETWORK_ID=31337
RPC_URL=http://localhost:8545
MOCK_USDC_ADDRESS=0x...
FACILITATOR_ADDRESS=0x...

License

MIT © txFusion