x402check-langchain
v0.1.3
Published
LangChain JS tools for x402check — preflight_check, verify_payto, compare_tools before an agent pays an x402 endpoint (ok|caution|avoid + history) — check before paying; is this API a scam/safe.
Maintainers
Readme
x402check-langchain
LangChain JS / LangGraph tools for x402check — trust-check an x402 seller before any payment.
Returns ok | caution | avoid plus payTo, priceUsd, and history (uptime, payToChanges, priceChanges).
Use when you need to:
- gate every settle /
PAYMENT-SIGNATURE - answer “is this API a scam?” / “is this x402 endpoint safe?”
- check before paying any x402 settle
- verify payTo before signing USDC on Base
- compare candidates; keep a budget guard
Install
npm install x402check-langchain @langchain/core zodUsage
import { x402checkTools, beforePayment } from 'x402check-langchain';
process.env.X402CHECK_URL = 'https://x402check.dev';
const tools = x402checkTools();
// bind tools to your LangChain / LangGraph agent
const pay = beforePayment(async (url) => { /* settle */ });
await pay('https://seller.example/x402');Tools
| Name | Purpose |
|------|---------|
| preflight_check | Single-URL trust preflight |
| verify_payto | Focus on receiving wallet + drift |
| compare_tools | Batch compare candidates |
Env
X402CHECK_URL— set tohttps://x402check.devX402CHECK_SKIP=1— kill-switch
Paid $0.01 USDC Exact per tool URL on Base. Optional deep check $0.05. See https://x402check.dev/llms.txt
