🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

mastra-gate402

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mastra-gate402

Mastra tools for Gate402: pay-per-call GPU/CPU compute + open-model LLM inference, plus Base market data (token-risk, DEX, momentum, launches, best-swap, onchain), over x402 (USDC). No API keys — the agent pays the 402.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

mastra-gate402

Mastra tools for Gate402 — pay-per-call GPU/CPU compute + open-model LLM inference, plus Base market data, over x402 (USDC). No vendor API keys: the agent pays the HTTP 402, and a free-tier key is auto-claimed on first use.

Install

npm install mastra-gate402

Use

import { Agent } from '@mastra/core/agent';
import { gate402Tools } from 'mastra-gate402';

export const defiAgent = new Agent({
  id: 'defi-agent',
  name: 'DeFi Agent',
  instructions: 'Vet Base tokens before acting: check risk, liquidity, and momentum.',
  model: 'openai/gpt-5.5',
  tools: { ...gate402Tools }
});

Or import individual tools:

import { gate402TokenRisk, gate402Infer } from 'mastra-gate402';

Tools

ToolWhat it does
gate402_computeRent metered GPU/CPU to run a container job, per-second; signed execution receipt
gate402_token_riskRug/tradeability verdict + live honeypot sim for a Base token
gate402_dexLive DEX price / liquidity / 24h volume
gate402_momentumMomentum + order-flow signal
gate402_best_swapBest pool + estimated price impact for a trade size
gate402_onchainWallet/token intel (balances, EOA/contract, tx count)
gate402_launchesFreshest Base token launches
gate402_inferPer-token open-model LLM inference (Llama 3.1 / Qwen / mistral-small)

Config (optional)

EnvDefaultPurpose
GATE402_API_KEY(auto free tier)Funded Gate402 account key to skip the free tier
GATE402_BASE_URLhttps://gate402.appOverride the gateway

Each tool is a pay-per-call Gate402 endpoint settled over x402 (USDC on Base) — the payment is the auth. Full catalog: https://gate402.app/v1.

MIT.

Keywords

mastra

FAQs

Package last updated on 03 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts