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

@minia2a/langchain

v0.1.7

Published

LangChain tools for the minia2a.uk marketplace — discover, try, and pay for 1,680+ x402 APIs, and audit smart-contract source code ($2 static / $20 AI). USDC on Base.

Readme

@minia2a/langchain

The marketplace toolkit for LangChain agents — discover, try, and pay for 1,680+ x402 APIs across crypto, web, AI, and data, plus smart-contract auditing. USDC on Base.

Give your LangChain agent access to the entire minia2a.uk marketplace — live discovery, 5 free trial calls per wallet, and transparent per-call pricing.

Why This Toolkit

| Feature | Other API Tools | This Toolkit | |---------|----------------|-------------| | Services | Usually 1 API at a time | 1,600+ across categories | | Discovery | Hardcoded endpoints | Live marketplace search | | Free trials | Sometimes | 5 free trial calls per wallet | | New services | Wait for tool update | Available instantly | | Provider diversity | Single vendor | Dozens of providers | | Payment | API keys | USDC on Base, no KYC |

Install

npm install @minia2a/langchain zod @langchain/core

Quick Start

import { Minia2aToolkit } from "@minia2a/langchain";
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createOpenAIFunctionsAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";

// Create toolkit with auto-trial
const toolkit = new Minia2aToolkit({
  config: {
    autoTrial: true,           // Use free trials automatically
    maxPricePerCall: 0.10,     // Max $0.10 per paid call
  }
});

const llm = new ChatOpenAI({ model: "gpt-4o" });

const prompt = ChatPromptTemplate.fromMessages([
  ["system", "You are a helpful agent with access to the minia2a API marketplace. Use the tools to discover and call APIs for the user."],
  ["human", "{input}"],
  ["placeholder", "{agent_scratchpad}"],
]);

const agent = await createOpenAIFunctionsAgent({
  llm,
  tools: toolkit.getTools(),
  prompt,
});

const executor = new AgentExecutor({
  agent,
  tools: toolkit.getTools(),
  verbose: true,
});

// Use it!
const result = await executor.invoke({
  input: "Find an API that can tell me the current gas price on Ethereum and try it out"
});

console.log(result.output);

Tools

| Tool | What it does | Example query | |------|-------------|---------------| | search_minia2a_apis | Search 1,680+ APIs by keyword | "Find APIs for web scraping" | | call_minia2a_api | Call any endpoint with auto-trial | Call /x402/gas to get gas prices | | list_popular_minia2a_apis | Browse trending services | "What APIs are most popular?" | | audit_smart_contract | Audit contract source ($2 static / $20 AI) | "Audit this Solidity contract for reentrancy" |

search_minia2a_apis

// Search by keyword
await executor.invoke({ input: "Find crypto price APIs" });

// Search by category
await executor.invoke({ input: "What AI services are available?" });

call_minia2a_api

// GET request with auto-trial
await executor.invoke({
  input: "Call /x402/gas to check current Ethereum gas prices"
});

// POST request with body
await executor.invoke({
  input: "Scrape https://example.com using the web-scrape endpoint"
});

list_popular_minia2a_apis

// Browse trending
await executor.invoke({ input: "Show me the most popular APIs on minia2a" });

audit_smart_contract

Give your agent the ability to audit Solidity, Rust, and Move source code — pay per call, no API keys.

// Requires a funded Base wallet in the environment:
//   MINIA2A_PRIVATE_KEY=0x... (signs the x402 payment locally, never sent anywhere)

await executor.invoke({
  input: "Audit this contract for vulnerabilities:\n\n" + contractSource
});

// The agent will call audit_smart_contract with tier 'static' ($2, 10 patterns)
// or tier 'ai' ($20, 3x-sampled deep audit) and act on the findings.

Two tiers:

| Tier | Price | Coverage | |------|-------|----------| | static | $2 / call | 10 deterministic patterns (reentrancy, access-control, integer overflow, tx.origin, delegatecall, selfdestruct, block.timestamp, assert misuse, owner-change) — Solidity only | | ai | $20 / call | 3×-sampled AI deep audit — business-logic, economic, and cross-contract flaws — Solidity, Rust, Move |

Honest limits: output is guidance for manual review, not proof of safety. The AI tier is probabilistic. The audit reads source code, not a deployed address.

Configuration

| Option | Default | Description | |--------|---------|-------------| | baseUrl | https://minia2a.uk | minia2a marketplace URL | | autoTrial | true | Use free trials (5 free trial calls per wallet) | | maxPricePerCall | 0 | Max USD per paid call (0 = trials only) | | timeout | 15000 | Request timeout in ms |

x402 Payment Flow

  1. Agent requests endpoint → gets HTTP 402 Payment Required with price + wallet
  2. Agent auto-signs USDC on Base (if maxPricePerCall > 0 and wallet configured)
  3. Agent retries with signed transaction → receives result
  4. Receipt returned for audit trail

Default: trials only. Set maxPricePerCall > 0 and configure wallet for paid calls.

Categories

  • 🤖 AI/LLM — text generation, classification, translation, summarization
  • 🔗 Web — scraping, search, email verification, DNS, HTTP analysis
  • 💰 Crypto — gas prices, wallet intel, token security, DEX data, Polymarket
  • 🔐 Security — CAPTCHA solving, domain intel, SSL checks, OSINT
  • 📊 Data — enrichment, validation, formatting, CSV/JSON conversion
  • 🛠️ Dev Tools — code review, regex, UUID, hashing, JWT decode

Pricing

  • Free trial: 5 free trial calls per signed wallet — no registration needed
  • Paid calls: Priced per endpoint (typically $0.01–$0.10)
  • Platform fee: 5% (transparent)
  • Settlement: USDC on Base (eip155:8453) — the only rail the gateway offers. Other chains are recognised but not settleable: /x402/chain/<other>/<id> answers 400 unsupported chain.

LangGraph Integration

import { StateGraph, MessagesAnnotation } from "@langchain/langgraph";
import { ToolNode } from "@langchain/langgraph/prebuilt";
import { Minia2aToolkit } from "@minia2a/langchain";

const toolkit = new Minia2aToolkit();
const tools = toolkit.getTools();
const toolNode = new ToolNode(tools);

const graph = new StateGraph(MessagesAnnotation)
  .addNode("agent", agentNode)
  .addNode("tools", toolNode)
  .addEdge("__start__", "agent")
  .addConditionalEdges("agent", shouldContinue)
  .addEdge("tools", "agent")
  .compile();

Companion Packages

Related

License

MIT