KyvernLabs

Setup Guide

Integrate Pulse into your x402 endpoint in under 2 minutes. Works on Base, Stellar, and Solana mainnet — automatically.

Your API Key

Connect your wallet to get your kv_live_ API key.

kv_live_your_key_here

Middleware Integration

Recommended
1

Install

npm install @kyvernlabs/pulse

Already using @x402/next or another x402 framework? Pulse wraps it without changing anything.

2

Wrap your handler

import { withX402 } from '@x402/next'
import { withPulse } from '@kyvernlabs/pulse'

// Your x402 handler — Pulse captures every payment
const x402Handler = withX402(handler, {
  accepts: { scheme: 'exact', price: '$0.01',
             network: 'eip155:8453', payTo: '0x...' }
}, server)

// One line — that's the entire integration
export const GET = withPulse(x402Handler, {
  apiKey: 'kv_live_your_key_here'
})

Pulse reads the payment-signature and payment-response headers and captures every successful x402 payment to your dashboard. Fire-and-forget — zero impact on your endpoint latency.

3

Deploy & see your revenue

Deploy your endpoint. As soon as an agent pays, the transaction shows up in your dashboard — with the real on-chain hash, payer address, and a link to verify on the block explorer. No polling, no manual config.

Framework & chain examples

Pick your stack. Pulse works with all of them — no extra configuration per chain.

// app/api/my-service/route.ts
import { withX402 } from '@x402/next'
import { withPulse } from '@kyvernlabs/pulse'

const handler = async (req) => {
  return Response.json({ data: "premium content" })
}

const x402Handler = withX402(handler, {
  accepts: {
    scheme: 'exact',
    price: '$0.01',
    network: 'eip155:8453',     // Base mainnet
    payTo: '0xYOUR_WALLET'
  }
}, server)

export const GET = withPulse(x402Handler, {
  apiKey: 'kv_live_your_key_here'
})

Supported Networks

Pulse auto-detects the network from your x402 payment headers and stores it as a CAIP-2 chain ID. Use these values when sending events directly to the ingest API.

NetworkChain IDExplorer

Base Mainnet

USDC0x...

eip155:8453basescan.org

Stellar Mainnet

USDC / XLMG...

stellar:pubnetstellar.expert

Stellar Testnet

USDC / XLMG...

stellar:testnetstellar.expert/testnet

Solana Mainnet

USDC / SOLbase58

solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpsolscan.io

Solana Devnet

USDC / SOLbase58

solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1solscan.io?cluster=devnet

MCP Server — for AI Agents

17 tools

Let AI agents (Claude, GPT, Cursor) query your x402 analytics directly. The MCP server exposes your Pulse data as tools any LLM can call.

Install globally

npm install -g @kyvernlabs/mcp

Add to Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "kyvernlabs-pulse": {
      "command": "npx",
      "args": ["@kyvernlabs/mcp"],
      "env": {
        "KYVERNLABS_API_KEY": "kv_live_your_key_here"
      }
    }
  }
}

Available tools

ToolDescription
pulse_get_statsRevenue, calls, customers with deltas
pulse_get_endpointsPer-endpoint revenue and latency
pulse_get_customersTop paying agent wallets
pulse_get_transactionsRecent payments with tx hashes
pulse_get_timeseriesRevenue over time for charting
pulse_ingest_eventRecord an x402 payment event

Example prompts

What's my x402 revenue this week?

Which endpoints are making the most money?

Show me my top 5 paying agents

How many verified payments did I get today?

Direct API

Send events directly to the Pulse ingest API from any language or framework. Use this if you're not using the npm middleware — for example, from a Python service, a Rust worker, or a Solana program.

curl -X POST https://kyvernlabs.com/api/pulse/ingest \
  -H "Content-Type: application/json" \
  -H "X-API-Key: kv_live_your_key_here" \
  -d '{
    "endpoint": "/api/your-service",
    "amount_usd": 0.01,
    "payer_address": "0x...",
    "tx_hash": "0x...",
    "network": "eip155:8453",
    "asset": "USDC",
    "status": "success"
  }'

What Pulse tracks per transaction

Endpoint path

Which API was called

Payment amount

USD value of x402 payment

Payer address

Agent wallet that paid

Response latency

Time to process the request

Tx hash

Blockchain proof, links to explorer

Network

Auto-detected from x402 headers