⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

quicknode-skill

quiknode-labs@quiknode-labs⭐ 20 stars· last commit 3mo ago· 2 open issues

Quicknode blockchain infrastructure for 80+ chains: Core RPC API, Streams, Webhooks, Blazar WSS, Solana gRPC, HyperCore gRPC, SQL Explorer, Metaplex DAS API, Blockbook, Ordinals & Runes API, Swap API, x402, MPP, Agent Subscriptions, CLI, and MCP. Use for any Quicknode product, blockchain data access, or wallet-paid agent access.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 20 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Blockchain Skills

A collection of AI agent skills for blockchain development, powered by Quicknode

Introduction

This repository contains a curated set of skills that enable AI agents to interact with blockchain networks, smart contracts, and decentralized applications. Each skill provides specialized knowledge and capabilities for specific blockchain ecosystems and protocols.

What are Skills?

Skills are structured instruction sets that AI agents can use to perform blockchain-related tasks. They provide:

  • Context - Domain-specific knowledge about protocols, APIs, and best practices
  • Capabilities - Step-by-step guidance for common operations
  • Integration - Direct access to Quicknode's RPC endpoints and APIs

When an AI agent loads a skill, it gains the ability to help you build, deploy, and interact with blockchain applications.

Available Skills

SkillDescription
quicknode-skillQuicknode blockchain infrastructure across five product categories: Infrastructure (Core RPC API, IPFS, Dedicated Clusters), Real-Time Data (Streams, Streams Backfills, Webhooks, Solana gRPC), Indexed Data (SQL Explorer, HyperCore for Hyperliquid, Metaplex DAS API, Blockbook, Ordinals & Runes API, Agent Identity ERC-8004), Trading & DeFi (Swap API), and Agent Surface (x402, MPP, Agent Subscriptions, Quicknode CLI, Quicknode MCP)

Installation

Using skills.sh

npx skills add quiknode-labs/blockchain-skills

Usage

Once installed, you can use natural language prompts to interact with Quicknode's infrastructure:

  • "Set up a stream to monitor new blocks on Ethereum"
  • "Create a filter for large USDC transfers"
  • "Get the SOL balance for this wallet address"
  • "Check the ETH balance across multiple wallets"
  • "Query recent trades on Hyperliquid for BTC"
  • "Show me whale trades above $500k notional"
  • "Get liquidation data for the last 24 hours"
  • "Quote a swap from USDC to ETH on Base"
  • "Get wallet data and UTXOs for this BTC address"
  • "List recent Solana NFT mints using Metaplex DAS"
  • "Backfill last week of Ethereum blocks into my Stream"
  • "Pay an RPC call with my wallet using x402 or MPP"
  • "Create a Quicknode account with my wallet and provision an endpoint"
  • "Provision a Stream using the Quicknode CLI"
  • "Connect Claude to my Quicknode workspace via MCP"

Quicknode Integration

This repository leverages Quicknode's infrastructure for reliable blockchain access:

Infrastructure

Connect to 80+ blockchain networks with low-latency RPC endpoints:

  • Core RPC API — Ethereum, Polygon, Arbitrum, Optimism, Base, Solana, Bitcoin, TON, and many more
  • IPFS — Decentralized file storage for NFT metadata and assets
  • Dedicated Clusters — Private node clusters for high-throughput production workloads

Real-Time Data

Real-time and historical blockchain data delivery:

  • Streams — Block, transaction, log, and receipt pipelines with custom JavaScript filters
  • Streams Backfills — On-demand historical replay into existing Streams
  • Webhooks — Address and event-based notifications over HTTP
  • Solana gRPC — Geyser plugin streaming for accounts, transactions, and slots

Indexed Data

Query and discover indexed blockchain data:

  • SQL Explorer — Direct SQL access to indexed Hyperliquid (HyperCore) data at scale
  • HyperCore for Hyperliquid — gRPC, JSON-RPC, WebSocket, and Info API for Hyperliquid L1
  • Metaplex DAS API — Solana NFT, compressed NFT, and token queries
  • Blockbook — Wallet-centric address balances, UTXOs, and transaction history
  • Ordinals & Runes API — Bitcoin inscription and Runes protocol data
  • Agent Identity (ERC-8004) — On-chain agent discovery and reputation records

Trading & DeFi

  • Swap API — Multi-DEX aggregated token swaps: Solana (Metis/Jupiter), EVM (0x, OpenOcean, Aerodrome, Velodrome, Titan)

Agent Surface

Stablecoin-paid access and tooling for autonomous agents:

  • x402 and MPP — Free tier of 1,000,000 API credits per wallet per month (covers RPC + SQL Explorer), with pay-per-request billing after the free tier resets on the 1st of each month
  • Agent Subscriptions — Create a Quicknode account and receive a full platform API key in a single payment
  • Quicknode CLI — qn CLI for managing endpoints, Streams, Webhooks, KV, SQL, usage, billing, and teams from the terminal
  • Quicknode MCP — Native Claude/OpenAI connector plus generic MCP server; manage Quicknode from Claude, ChatGPT, Codex, Cursor, or any MCP-capable AI tool
  • Quicknode SDK — Product API SDK for Admin API, Streams, Webhooks, KV, and SQL Explorer

Other Quicknode Products

Agents typically do not invoke these directly: Validator as a Service, Solana Validator, Monad Validator, ChainKit, Dedicated Clusters.

Get your Quicknode endpoint at Quicknode.com

Skill Structure

Each skill follows a consistent file organization:

skill-name/
├── SKILL.md              # Main skill definition
├── PRODUCT_CATALOG.md    # Canonical product map and sync runbook
└── references/           # API and protocol references
    └── api.md

Contributing

We welcome contributions! To add a new skill:

  1. Fork this repository
  2. Create a new directory for your skill
  3. Add a SKILL.md with the skill definition
  4. Include examples and documentation
  5. Submit a pull request

Skill Guidelines

  • Focus on a specific chain, protocol, or use case
  • Include practical examples with expected outputs
  • Reference official documentation and APIs
  • Test with real Quicknode endpoints

License

MIT License


Built with Quicknode - Get Started

// HOW IT'S BUILT

// FILES

26 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/quicknode-skill/SKILL.md48 KBe787aebc3854truncatedupstream ↗

    Showing the inlined prefix. The rest is in the upstream file.

    ---
    name: quicknode-skill
    description: "Quicknode blockchain infrastructure for 80+ chains: Core RPC API, Streams, Webhooks, Blazar WSS, Solana gRPC, HyperCore gRPC, SQL Explorer, Metaplex DAS API, Blockbook, Ordinals & Runes API, Swap API, x402, MPP, Agent Subscriptions, CLI, and MCP. Use for any Quicknode product, blockchain data access, or wallet-paid agent access."
    ---
    
    # Quicknode Blockchain Infrastructure
    
    ## Intake Questions
    - Which chain and network should Quicknode target?
    - Is this read-only or should I create infrastructure (streams, webhooks, IPFS writes)?
    - Does this require real-time streaming (Solana gRPC/Blazar WSS/HyperCore gRPC) or standard RPC?
    - What endpoint or API key should I use (default: `QUICKNODE_RPC_URL`, optional `QUICKNODE_WSS_URL` / `QUICKNODE_API_KEY`)?
    - If no API key exists, does the agent want pay-per-request access (x402, MPP) or a wallet-paid Quicknode account via [Agent Subscriptions](#agent-subscriptions)?
    - Any constraints (latency, regions, throughput, destinations)?
    
    ## Safety Defaults
    - Default to testnet/devnet when a network is not specified.
    - Prefer read-only operations and dry runs before creating resources.
    - Never ask for or accept private keys or secret keys.
    
    ## Confirm Before Write
    - Require explicit confirmation before creating or modifying Streams, Webhooks, or IPFS uploads.
    - Require explicit confirmation before creating an Agent Subscription, topping up credits, or any action that spends real funds via x402 or MPP.
    - If confirmation is missing, return the exact API payload for review.
    
    ## Quick Reference
    
    ### Infrastructure
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **Core RPC API** | High-performance blockchain access for 80+ chains | dApp backend, wallet interactions |
    | **Dedicated Clusters** | Dedicated private node clusters | High-throughput production, compliance isolation |
    | **IPFS** | Decentralized file storage | NFT metadata, asset hosting |
    
    ### Real-Time Data
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **Streams** | Real-time & historical blockchain data pipelines | Event monitoring, analytics, indexing |
    | **Streams Backfills** | On-demand historical data backfill into Streams | Gap recovery, historical re-indexing |
    | **Webhooks** | Event-driven notifications | Alerts, transaction monitoring |
    | **Solana gRPC** | Solana Geyser streaming — included on Scale/Business, add-on on Build/Accelerate | Real-time account, transaction, slot data |
    | **Blazar WSS** | Quicknode-built Solana WebSocket engine — all plans, free | Fast block, account, transaction, and slot subscriptions |
    | **HyperCore gRPC** | gRPC streaming for Hyperliquid L1 — included on all paid plans | Trades, order book diffs, events, blocks in real time |
    
    ### Indexed Data
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **SQL Explorer** | Direct SQL access to indexed blockchain data | Trading analytics, historical queries, market analysis |
    | **Agent Identity (ERC-8004)** | On-chain agent discovery and reputation records | Agent identity, capability advertising |
    | **Blockbook** | Wallet-centric blockchain data via JSON-RPC | Address balances, UTXOs, transaction history |
    | **Metaplex DAS API** | Solana Digital Asset Standard — NFTs, cNFTs, fungible tokens, MPL Core | NFT/token queries, compressed NFTs, asset search |
    | **Ordinals & Runes API** | Bitcoin inscriptions and Runes protocol data | Inscription lookup, UTXO tracking, Runes balances |
    
    ### Trading & DeFi
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **Swap API** | Multi-DEX aggregated token swaps | Solana (Jupiter/Metis), EVM (0x, OpenOcean, Aerodrome, Velodrome, Titan) |
    
    ### Endpoint Add-ons
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **Solana Priority Fee API** | Recommended priority fees for Solana transactions | Fee estimation, transaction landing |
    | **Jito Bundles** | Solana bundle submission and status APIs | MEV-aware transaction delivery |
    | **Single Flight RPC** | Request de-duplication for identical in-flight RPC calls | High-concurrency read workloads |
    | **Multi-region Transaction Broadcast** | Transaction propagation across multiple regions | Latency-sensitive submission |
    | **Risk Assessment API** | Wallet and transaction risk data | Compliance, fraud monitoring |
    | **Block Timestamp Lookup** | Timestamp-to-block lookup utilities | Time-window to block-range conversion |
    | **Multi-chain Stablecoin Balance API** | Stablecoin balances across supported chains | Treasury, payments, portfolio state |
    | **GoldRush Multichain Data APIs** | Multi-chain wallet and portfolio data | Wallet summaries, token/NFT holdings |
    
    ### Agent Surface
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **x402** | Testnet monthly cap plus mainnet pay-per-request via stablecoins | Keyless RPC access, AI agents, pay-as-you-go |
    | **MPP** | Testnet monthly cap plus mainnet pay-per-request via IETF Payment Authentication | AI agents, multi-service payments, high-volume sessions |
    | **Agent Subscriptions** | Wallet-paid Quicknode account creation, returns a `QN_*` full platform API key | Autonomous agents needing full platform access |
    | **Quicknode CLI** | `qn` CLI for endpoints, Streams, Webhooks, KV, and SQL from the terminal, plus RPC via Tooling Access or x402/MPP payments | Scripting, CI/CD, infrastructure automation, keyless paid RPC |
    | **Quicknode MCP** | Native Claude/OpenAI connector plus generic MCP server — Admin API via MCP | Manage Quicknode from Claude, ChatGPT, Codex, Cursor, or any MCP-capable AI tool |
    
    ### Platform
    
    | Product | Description | Use Case |
    |---------|-------------|----------|
    | **Admin API** | REST API for account management | Endpoint CRUD, usage monitoring, billing |
    | **Key-Value Store** | Serverless key-value and list storage (beta) | Persistent state for Streams, dynamic address lists |
    | **Quicknode SDK** | Official SDK for Quicknode product APIs, plus RPC via Tooling Access or x402/MPP payments | Admin API, Streams, Webhooks, KV, SQL Explorer, RPC calls |
    
    ---
    
    ## Core RPC API
    
    Quicknode provides low-latency RPC endpoints for 80+ blockchain networks.
    
    `qn rpc call` (CLI) and `qn.rpc.call` (SDK) reach any supported network via **Tooling Access** — a single multichain, read-only endpoint Quicknode provisions automatically with short-lived JWTs. No endpoint setup required. See [references/cli-reference.md](references/cli-reference.md) / [references/sdk-reference.md](references/sdk-reference.md). Use a dedicated endpoint below for a fixed URL, non-read-only methods, or dedicated throughput.
    
    ### Endpoint Setup
    
    ```typescript
    // EVM chains (ethers.js)
    import { JsonRpcProvider } from 'ethers';
    const provider = new JsonRpcProvider(process.env.QUICKNODE_RPC_URL!);
    
    // EVM chains (viem)
    import { createPublicClient, http } from 'viem';
    import { mainnet } from 'viem/chains';
    const client = createPublicClient({
      chain: mainnet,
      transport: http(process.env.QUICKNODE_RPC_URL!),
    });
    
    // Solana
    import { createSolanaRpc } from '@solana/kit';
    const rpc = createSolanaRpc(process.env.QUICKNODE_RPC_URL!);
    ```
    
    ### Authentication
    
    Quicknode endpoints include authentication in the URL:
    ```
    https://{ENDPOINT_NAME}.{NETWORK}.quiknode.pro/{API_KEY}/
    ```
    
    For additional security, enable JWT authentication or IP allowlisting in the Quicknode dashboard.
    
    ### Supported Networks
    
    | Category | Networks |
    |----------|----------|
    | **EVM** | Ethereum, Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, Fantom, zkSync, Scroll, Linea, Hyperliquid EVM (HyperEVM) |
    | **Non-EVM** | Solana, Bitcoin, NEAR, Stacks, Cosmos, Sei, Aptos, Sui, TON, Hyperliquid (HyperCore) |
    
    Not exhaustive. Full list: https://www.quicknode.com/chains
    
    ### Rate Limits & Plans
    
    As of 2026-02-02. Verify current limits in Quicknode docs before sizing a production system.
    
    | Plan | Requests/sec | Credits/month |
    |----
  • skills/quicknode-skill/references/addons.md4.4 KB852f51247b44upstream ↗
    # Quicknode Add-ons Reference
    
    Quicknode add-ons extend a Quicknode endpoint with specialized APIs or infrastructure behavior. Enable add-ons from the endpoint's **Add-ons** tab in the Quicknode dashboard, and browse the current catalog at https://www.quicknode.com/add-ons.
    
    This file intentionally stays concise. Several capabilities have their own reference file when an agent is likely to invoke them directly — some are standalone Quicknode products, others are enabled per endpoint:
    
    - [Metaplex DAS API](metaplex-das-reference.md)
    - [Swap API](swap-api-reference.md)
    - [Solana gRPC](solana-grpc-reference.md)
    - [Blockbook](blockbook-reference.md)
    - [Ordinals & Runes API](ordinals-runes-reference.md)
    
    ## Solana Add-ons
    
    ### Priority Fee API
    
    Use `qn_estimatePriorityFees` to estimate Solana priority fees from recent blocks and, optionally, account-specific activity.
    
    **Docs:** https://www.quicknode.com/docs/solana/qn_estimatePriorityFees
    
    **Add-on page:** https://www.quicknode.com/add-ons/solana-priority-fee
    
    ```typescript
    import { createSolanaRpc } from "@solana/kit";
    
    const rpc = createSolanaRpc(process.env.QUICKNODE_RPC_URL!);
    
    const response = await rpc.request("qn_estimatePriorityFees", {
      last_n_blocks: 100,
      account: "YourAccountPubkey...",
    }).send();
    
    console.log(response.result.per_compute_unit);
    ```
    
    ### Jito Bundles
    
    Use Jito bundle methods for MEV-aware Solana transaction submission when the add-on is enabled.
    
    **Docs:** https://www.quicknode.com/docs/solana/sendBundle
    
    **Add-on page:** https://www.quicknode.com/add-ons/lil-jit-jito-bundles-and-transactions
    
    ```typescript
    const result = await rpc.request("sendBundle", {
      transactions: [
        "Base64EncodedTx1...",
        "Base64EncodedTx2...",
      ],
    }).send();
    
    const status = await rpc.request("getBundleStatuses", {
      bundleIds: [result.bundleId],
    }).send();
    ```
    
    ## Transaction Delivery Add-ons
    
    ### Single Flight RPC
    
    Single Flight RPC deduplicates identical in-flight RPC requests so high-concurrency applications do not repeatedly send the same expensive request while the first one is still resolving.
    
    **Add-on page:** https://www.quicknode.com/add-ons/single-flight-rpc
    
    Use this when an application has request bursts for identical reads, for example many users loading the same token, NFT, or block state at once.
    
    ### Multi-region Transaction Broadcast
    
    Multi-region Transaction Broadcast improves transaction propagation by broadcasting signed transactions across multiple regions.
    
    **Add-on page:** https://www.quicknode.com/add-ons/multi-region-transaction-broadcast
    
    Use this for latency-sensitive transaction submission. For EVM endpoints, prefer Quicknode custom broadcast methods documented in the chain/RPC reference when available.
    
    ## Data and Risk Add-ons
    
    ### Risk Assessment API
    
    Risk Assessment API provides wallet or transaction risk data for compliance, monitoring, and fraud analysis workflows.
    
    **Add-on page:** https://www.quicknode.com/add-ons/risk-assessment-api
    
    Use it when the user explicitly needs risk scoring or compliance context. Do not substitute it for standard wallet balance or transaction-history APIs.
    
    ### Block Timestamp Lookup
    
    Block Timestamp Lookup maps timestamps to nearby block heights and can help agents translate human time windows into block ranges.
    
    **Add-on page:** https://www.quicknode.com/add-ons/block-timestamp-lookup
    
    For common EVM and Bitcoin timestamp-to-block workflows, also check Core RPC custom methods such as `qn_getBlockFromTimestamp` and `qn_getBlocksInTimestampRange`.
    
    ### Multi-chain Stablecoin Balance API
    
    Multi-chain Stablecoin Balance API returns stablecoin balances across supported chains for portfolio, treasury, and payments workflows.
    
    **Add-on page:** https://www.quicknode.com/add-ons/multi-chain-stablecoin-balance-api
    
    Use it when the desired output is specifically stablecoin exposure across chains.
    
    ### GoldRush Multichain Data APIs
    
    GoldRush Multichain Data APIs provide wallet and token/NFT portfolio data across many chains.
    
    **Add-on page:** https://www.quicknode.com/add-ons/covalent-wallet-api
    
    Use it for multi-chain wallet summaries, portfolio views, token balances, or transaction histories when the endpoint has the GoldRush add-on enabled.
    
    ## Documentation
    
    - **Add-ons Catalog**: https://www.quicknode.com/add-ons
    - **Solana Priority Fees**: https://www.quicknode.com/docs/solana/qn_estimatePriorityFees
    - **Jito Bundles**: https://www.quicknode.com/docs/solana/sendBundle
    - **Core RPC API Reference**: https://www.quicknode.com/docs
    
  • skills/quicknode-skill/references/admin-api-reference.md15 KB4d439ea33bfaupstream ↗
    # Quicknode Admin API Reference
    
    REST API for programmatic management of Quicknode endpoints, usage monitoring, rate limits, security, billing, and teams.
    
    ## Quick Reference
    
    | Resource | Methods | Endpoints |
    |----------|---------|-----------|
    | **Chains** | GET | `/v0/chains` |
    | **Account Info** | GET | `/v0/account/info` |
    | **API Credits** | GET | `/v0/api-credits/{chain}` |
    | **Endpoints** | GET, POST, PATCH, DELETE | `/v0/endpoints`, `/v0/endpoints/{id}` |
    | **Endpoint Status** | PATCH | `/v0/endpoints/{id}/status` |
    | **Endpoint Tags** | GET, POST | `/v0/endpoints/{id}/tags` |
    | **Metrics** | GET | `/v0/endpoints/{id}/metrics` |
    | **Rate Limits** | GET, POST, PUT | `/v0/endpoints/{id}/method-rate-limits`, `/v0/endpoints/{id}/rate-limits` |
    | **Security** | GET | `/v0/endpoints/{id}/security_options` |
    | **Tooling Access** | GET, PATCH, POST | `/v0/tooling-access`, `/v0/tooling-access/token` |
    | **Usage** | GET | `/v0/usage/rpc`, `/v0/usage/rpc/by-endpoint`, `/v0/usage/rpc/by-method`, `/v0/usage/rpc/by-chain` |
    | **Billing** | GET | `/v0/billing/invoices` |
    | **Teams** | GET | `/v0/teams` |
    | **Logs** | GET | `/v0/endpoints/{id}/logs` (Enterprise) |
    | **Prometheus** | GET | `/exporter/prometheus` (Enterprise) |
    
    ## Authentication
    
    Base URL: `https://api.quicknode.com/v0`
    
    All requests require the `x-api-key` header. Generate an API key from the Quicknode dashboard under **Settings > API Keys**.
    
    ```typescript
    const QN_API_KEY = process.env.QUICKNODE_API_KEY!;
    const BASE_URL = 'https://api.quicknode.com/v0';
    
    async function adminApi<T>(
      path: string,
      options: RequestInit = {}
    ): Promise<T> {
      const res = await fetch(`${BASE_URL}${path}`, {
        ...options,
        headers: {
          'x-api-key': QN_API_KEY,
          'Content-Type': 'application/json',
          ...options.headers,
        },
      });
      if (!res.ok) {
        const body = await res.text();
        throw new Error(`Admin API ${res.status}: ${body}`);
      }
      return res.json();
    }
    ```
    
    All examples below reuse this `adminApi` helper.
    
    ## Chains
    
    List all supported blockchain networks.
    
    ```typescript
    const chains = await adminApi<{ data: Array<{
      id: string;
      name: string;
      network: string;
      chain: string;
    }> }>('/chains');
    
    chains.data.forEach(c => console.log(`${c.name} (${c.network})`));
    ```
    
    ## Account
    
    ### Account Info
    
    Retrieve account metadata, including account id, name, creation timestamp, billing version, and current subscription.
    
    ```typescript
    const account = await adminApi<{ data: {
      id: number;
      name: string;
      created_at?: string;
      billing_version?: string;
      subscription?: unknown;
    } }>('/account/info');
    
    console.log(account.data.id, account.data.name, account.data.billing_version);
    ```
    
    ### API Credits by Chain
    
    Retrieve per-method API credit costs for a chain. The `{chain}` path parameter is a chain slug such as `ethereum`; discover valid slugs with `GET /v0/chains`.
    
    ```typescript
    const credits = await adminApi<{ data: Array<{
      method: string;
      credits: number;
    }> }>('/api-credits/ethereum');
    
    credits.data.slice(0, 5).forEach(row =>
      console.log(`${row.method}: ${row.credits}`)
    );
    ```
    
    These values match the account's billing version. Do not hardcode API credit multipliers when the agent can query this endpoint or use the SDK/CLI wrappers.
    
    ## Endpoints
    
    ### List Endpoints
    
    ```typescript
    const endpoints = await adminApi<{ data: Array<{
      id: string;
      name: string;
      chain: string;
      network: string;
      http_url: string;
      wss_url: string;
      status: string;
    }> }>('/endpoints');
    
    endpoints.data.forEach(ep =>
      console.log(`${ep.name}: ${ep.chain}/${ep.network} [${ep.status}]`)
    );
    ```
    
    **Query Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `page` | number | No | Page number for pagination |
    | `per_page` | number | No | Results per page (default: 25) |
    | `tag` | string | No | Filter by tag name |
    
    ```typescript
    // Paginate with tag filter
    const filtered = await adminApi('/endpoints?tag=production&page=1&per_page=10');
    ```
    
    ### Create Endpoint
    
    ```typescript
    const newEndpoint = await adminApi('/endpoints', {
      method: 'POST',
      body: JSON.stringify({
        name: 'my-eth-mainnet',
        chain: 'ethereum',
        network: 'mainnet',
      }),
    });
    
    console.log('Created:', newEndpoint.http_url);
    ```
    
    **Body Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `name` | string | Yes | Display name for the endpoint |
    | `chain` | string | Yes | Blockchain (e.g., `ethereum`, `solana`) |
    | `network` | string | Yes | Network (e.g., `mainnet`, `sepolia`, `devnet`) |
    
    ### Get Endpoint
    
    ```typescript
    const endpoint = await adminApi(`/endpoints/${endpointId}`);
    console.log(endpoint.http_url, endpoint.status);
    ```
    
    ### Update Endpoint
    
    ```typescript
    const updated = await adminApi(`/endpoints/${endpointId}`, {
      method: 'PATCH',
      body: JSON.stringify({ name: 'renamed-endpoint' }),
    });
    ```
    
    ### Pause / Unpause Endpoint
    
    ```typescript
    // Pause
    await adminApi(`/endpoints/${endpointId}/status`, {
      method: 'PATCH',
      body: JSON.stringify({ status: 'paused' }),
    });
    
    // Unpause
    await adminApi(`/endpoints/${endpointId}/status`, {
      method: 'PATCH',
      body: JSON.stringify({ status: 'active' }),
    });
    ```
    
    ### Archive (Delete) Endpoint
    
    ```typescript
    await adminApi(`/endpoints/${endpointId}`, { method: 'DELETE' });
    ```
    
    ### Tags
    
    ```typescript
    // List tags on an endpoint
    const tags = await adminApi(`/endpoints/${endpointId}/tags`);
    
    // Add tags
    await adminApi(`/endpoints/${endpointId}/tags`, {
      method: 'POST',
      body: JSON.stringify({ tags: ['production', 'critical'] }),
    });
    ```
    
    ## Endpoint Metrics
    
    Retrieve performance metrics for an endpoint.
    
    ```typescript
    const metrics = await adminApi<{ data: {
      total_requests: number;
      success_rate: number;
      avg_latency_ms: number;
      p99_latency_ms: number;
    } }>(`/endpoints/${endpointId}/metrics?period=24h&metric=requests`);
    
    console.log('Requests (24h):', metrics.data.total_requests);
    console.log('Success rate:', metrics.data.success_rate);
    console.log('Avg latency:', metrics.data.avg_latency_ms, 'ms');
    ```
    
    **Query Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `period` | string | No | Time period (`1h`, `24h`, `7d`, `30d`) |
    | `metric` | string | No | Metric type (`requests`, `latency`, `errors`) |
    
    ## Rate Limits
    
    ### Get Method Rate Limits
    
    ```typescript
    const methodLimits = await adminApi(
      `/endpoints/${endpointId}/method-rate-limits`
    );
    console.log(methodLimits);
    ```
    
    ### Set Method Rate Limits
    
    Restrict specific RPC methods on an endpoint.
    
    ```typescript
    await adminApi(`/endpoints/${endpointId}/method-rate-limits`, {
      method: 'POST',
      body: JSON.stringify({
        method_rate_limits: [
          { method: 'eth_getLogs', rate_limit: 50 },
          { method: 'debug_traceTransaction', rate_limit: 10 },
        ],
      }),
    });
    ```
    
    **Body Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `method_rate_limits` | array | Yes | Array of `{ method, rate_limit }` objects |
    | `method_rate_limits[].method` | string | Yes | RPC method name |
    | `method_rate_limits[].rate_limit` | number | Yes | Max requests per second for this method |
    
    ### Set Global Rate Limits
    
    ```typescript
    await adminApi(`/endpoints/${endpointId}/rate-limits`, {
      method: 'PUT',
      body: JSON.stringify({
        rps: 100,   // requests per second
        rpm: 5000,  // requests per minute
        rpd: 500000 // requests per day
      }),
    });
    ```
    
    **Body Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `rps` | number | No | Requests per second |
    | `rpm` | number | No | Requests per minute |
    | `rpd` | number | No | Requests per day |
    
    ## Security Options
    
    Retrieve security configuration for an endpoint.
    
    ```typescript
    const security = await adminApi(
      `/endpoints/${endpointId}/security_options`
    );
    console.log(security);
    ```
    
    **Security Option Types:**
    
    | Option | Description |
    |--------|-------------|
    | `jwt_authentication` | JSON Web Token auth for endpoint access |
    | `ip_allowlist` | Restrict access to specific IP addresses |
    | `referrer_allowlist` | Restrict access to specific HTTP referrers |
    | `token_authentication` | Additional token-based authentication |
    
    ## Tooling Access
    
    Tooling Access is the requirement behind `qn rpc` and the SDK's `rpc` client.
    
    ### Get Tooling Access Status
    
    ```typescript
    const status = await adminApi<{
      data: {
        enabled: boolean;
        endpoint_url: string | null;
        enabled_at: string | null;
        endpoint_id: number | null;
      };
      error: string | null;
    }>('/tooling-access');
    
    console.log(status.data.enabled, status.data.endpoint_url);
    ```
    
    **Response Parameters** (under `data`):
    
    | Parameter | Type | Description |
    |-----------|------|-------------|
    | `enabled` | boolean | Whether Tooling Access is provisioned for the account |
    | `endpoint_url` | string \| null | The multichain Tooling Access endpoint URL, or `null` if not enabled |
    | `enabled_at` | string \| null | ISO 8601 timestamp of when Tooling Access was enabled, or `null` |
    | `endpoint_id` | number \| null | The underlying endpoint's id, or `null` if not enabled |
    
    ### Enable / Disable Tooling Access
    
    ```typescript
    // Enable (admin role required)
    await adminApi('/tooling-access', {
      method: 'PATCH',
      body: JSON.stringify({ enabled: true }),
    });
    
    // Disable
    await adminApi('/tooling-access', {
      method: 'PATCH',
      body: JSON.stringify({ enabled: false }),
    });
    ```
    
    **Body Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|--------------|
    | `enabled` | boolean | Yes | `true` to provision/reactivate Tooling Access (admin role required), `false` to disable it account-wide |
    
    **Response Parameters** (under `data`):
    
    | Parameter | Type | Description |
    |-----------|------|-------------|
    | `enabled` | boolean | Whether Tooling Access is now enabled |
    | `endpoint_url` | string \| null | The multichain Tooling Access endpoint URL, or `null` if disabled |
    
    Both directions are idempotent. Disabling is account-wide — it cuts off blockchain access for all Quicknode developer tooling, not just the caller. Confirm with the user before disabling.
    
    ### Mint a Tooling Access Token
    
    ```typescript
    const minted = await adminApi<{
      data: {
        endpoint_url: string;
        token: string;
        expires_at: string;
      };
      error: string | null;
    }>('/tooling-access/token', { method: 'POST' });
    
    console.log(minted.data.token, minted.data.expires_at);
    ```
    
    **Response Parameters** (under `data`):
    
    | Parameter | Type | Description |
    |-----------|------|-------------|
    | `endpoint_url` | string | The multichain Tooling Access endpoint URL the token is scoped to |
    | `token` | string | Short-lived ES256 JWT for the Tooling Access endpoint |
    | `expires_at` | string | ISO 8601 expiry timestamp for the token |
    
    ## Usage
    
    ### Total RPC Usage
    
    ```typescript
    const usage = await adminApi<{ data: {
      total_requests: number;
      total_credits: number;
    } }>('/usage/rpc?start_time=2025-01-01T00:00:00Z&end_time=2025-01-31T23:59:59Z');
    
    console.log('Total requests:', usage.data.total_requests);
    console.log('Credits used:', usage.data.total_credits);
    ```
    
    **Query Parameters (shared across all usage endpoints):**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `start_time` | string | Yes | ISO 8601 start time |
    | `end_time` | string | Yes | ISO 8601 end time |
    
    ### Usage by Endpoint
    
    ```typescript
    const byEndpoint = await adminApi(
      '/usage/rpc/by-endpoint?start_time=2025-01-01T00:00:00Z&end_time=2025-01-31T23:59:59Z'
    );
    ```
    
    ### Usage by Method
    
    ```typescript
    const byMethod = await adminApi(
      '/usage/rpc/by-method?start_time=2025-01-01T00:00:00Z&end_time=2025-01-31T23:59:59Z'
    );
    ```
    
    ### Usage by Chain
    
    ```typescript
    const byChain = await adminApi(
      '/usage/rpc/by-chain?start_time=2025-01-01T00:00:00Z&end_time=2025-01-31T23:59:59Z'
    );
    ```
    
    ## Billing
    
    Retrieve invoice history.
    
    ```typescript
    const invoices = await adminApi<{ data: Array<{
      id: string;
      amount: number;
      currency: string;
      status: string;
      period_start: string;
      period_end: string;
    }> }>('/billing/invoices');
    
    invoices.data.forEach(inv =>
      console.log(`${inv.period_start} - ${inv.period_end}: $${inv.amount / 100} [${inv.status}]`)
    );
    ```
    
    ## Teams
    
    List team members and roles.
    
    ```typescript
    const teams = await adminApi<{ data: Array<{
      id: string;
      name: string;
      members: Array<{
        email: string;
        role: string;
        status: string;
      }>;
    }> }>('/teams');
    
    teams.data.forEach(team => {
      console.log(`Team: ${team.name}`);
      team.members.forEach(m => console.log(`  ${m.email} (${m.role})`));
    });
    ```
    
    ## Logs (Enterprise)
    
    Query request logs for an endpoint. Available on Enterprise plans.
    
    ```typescript
    const logs = await adminApi<{ data: Array<{
      timestamp: string;
      method: string;
      status_code: number;
      latency_ms: number;
      ip_address: string;
    }> }>(`/endpoints/${endpointId}/logs?from=2025-01-01T00:00:00Z&to=2025-01-02T00:00:00Z&limit=100`);
    
    logs.data.forEach(log =>
      console.log(`${log.timestamp} ${log.method} ${log.status_code} ${log.latency_ms}ms`)
    );
    ```
    
    **Query Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `from` | string | Yes | ISO 8601 start time |
    | `to` | string | Yes | ISO 8601 end time |
    | `limit` | number | No | Max results (default: 100, max: 1000) |
    | `next_at` | string | No | Cursor for pagination |
    
    ## Prometheus (Enterprise)
    
    Export endpoint metrics in Prometheus format for integration with Grafana or other monitoring tools.
    
    ```
    GET https://api.quicknode.com/exporter/prometheus
    Header: x-api-key: YOUR_API_KEY
    ```
    
    Returns metrics in Prometheus exposition format, suitable for scraping.
    
    ## Best Practices
    
    1. **API key storage** — Store keys in environment variables or a secrets manager. Never hardcode in source.
    2. **Pagination** — Use `page` and `per_page` on list endpoints to avoid large responses.
    3. **Retry logic** — Implement exponential backoff for transient `5xx` errors.
    4. **Caching** — Cache chain and endpoint list responses (they change infrequently).
    5. **Tagging** — Tag endpoints by environment (`production`, `staging`, `dev`) for easy filtering.
    6. **Usage monitoring** — Poll usage endpoints periodically and alert when approaching plan limits.
    7. **Rate limit headroom** — Set method-level limits below your plan ceiling to prevent runaway consumers.
    
    ## Documentation
    
    - **Admin API Docs**: https://www.quicknode.com/docs/admin-api
    - **Admin API Docs (llms.txt)**: https://www.quicknode.com/docs/admin-api/llms.txt
    - **Quicknode Dashboard**: https://dashboard.quicknode.com/
    - **API Key Management**: https://dashboard.quicknode.com/settings/api-keys
    - **Guides**: https://www.quicknode.com/guides/tags/admin-api
    
  • skills/quicknode-skill/references/agent-identity-reference.md6.1 KBa1863975f146upstream ↗
    # Agent Identity Reference (ERC-8004)
    
    ERC-8004 Explorer indexes ERC-8004 agent registrations, feedback, validations, and reputation across supported EVM networks. The public REST API is read-only and paywalled per request with x402. Use it to search indexed agents and reputation data; use the on-chain ERC-8004 registry contracts to register or update agents.
    
    **Base URL:** `https://erc-8004.quicknode.com`
    **REST prefix:** `/v1`
    **Spec:** https://eips.ethereum.org/EIPS/eip-8004
    **API docs:** https://erc-8004.quicknode.com/docs/api/v1
    
    ## Verified Routing
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents?network=base-mainnet&page=1&per_page=3"
    ```
    
    Without a valid x402 payment header, REST endpoints return HTTP 402 `Payment Required` with an `accepts` array describing the required payment.
    
    ## x402 Payment
    
    Every REST API call requires an x402 micropayment.
    
    | Item | Value |
    |------|-------|
    | Production payment network | Base mainnet |
    | Staging payment network | Base Sepolia |
    | Currency | USDC |
    | Advertised unauthenticated cost | `maxAmountRequired: "1000"` USDC base units ($0.001) |
    | Payment header on retry | `X-PAYMENT` |
    
    Always parse the 402 response and use its `accepts[0]` payment details instead of hardcoding recipient, token, or amount. The docs state the amount is subject to change and is advertised in each 402 response.
    
    ## Rate Limits
    
    | Scope | Limit |
    |-------|-------|
    | Global per source IP | 300 requests/min |
    | `/v1/agents` per source IP | 60 requests/min |
    
    Requests beyond the cap return HTTP 429 with `Retry-After`. Clients behind the same NAT share the source-IP bucket.
    
    ## REST Endpoints
    
    All endpoints below are x402-paywalled unless otherwise noted.
    
    | Method | Path | Purpose |
    |--------|------|---------|
    | GET | `/v1/agents` | List/search indexed agents |
    | GET | `/v1/agents/:agent_id` | Fetch one indexed agent |
    | GET | `/v1/agents/:agent_id/feedback` | Fetch feedback for one agent |
    | GET | `/v1/agents/:agent_id/validations` | Fetch validations for one agent |
    | GET | `/v1/agents/:agent_id/validations/summary` | Fetch aggregate validation counts and tag breakdowns |
    | GET | `/v1/agents/:agent_id/reputation` | Fetch live reputation calculation |
    | GET | `/v1/feedback` | Fetch global feedback feed |
    | GET | `/v1/validators/:validator_address/requests` | Fetch validation requests handled by a validator |
    
    The Explorer UI, documentation pages, and static discovery files are not the paid REST API. The REST API catalog is also available as a Postman collection at `https://erc-8004.quicknode.com/docs/collections/postman.json`.
    
    ## List Agents
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents?network=base-mainnet&page=1&per_page=20"
    ```
    
    Query parameters confirmed by the Postman collection:
    
    | Parameter | Notes |
    |-----------|-------|
    | `network` | Network slug, for example `base-mainnet`, `ethereum-mainnet`, `bnb-mainnet`, `avalanche-mainnet`, `mantle-mainnet` |
    | `owner` | Filter by owner address |
    | `include_testnets` | Include testnet networks when supported |
    | `page`, `per_page` | Pagination |
    
    ## Get an Agent
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents/42?network=base-mainnet"
    ```
    
    Use `network` when the same `agent_id` may exist on multiple chains.
    
    ## Agent Feedback
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents/42/feedback?network=base-mainnet&per_page=20"
    ```
    
    Query parameters:
    
    | Parameter | Notes |
    |-----------|-------|
    | `tag1`, `tag2` | Filter by feedback tags |
    | `since`, `until` | ISO 8601 time bounds |
    | `include_revoked` | Include revoked feedback rows; default is false |
    | `network` | Required when the `agent_id` is ambiguous |
    | `page`, `per_page` | Pagination |
    
    ## Agent Validations
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents/42/validations?network=base-mainnet"
    ```
    
    Query parameters:
    
    | Parameter | Notes |
    |-----------|-------|
    | `tag` | Filter by validation tag |
    | `has_response` | Filter validations with or without response payload |
    | `since`, `until` | ISO 8601 time bounds |
    | `network` | Required when ambiguous |
    | `page`, `per_page` | Pagination |
    
    ## Validation Summary
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents/42/validations/summary?network=base-mainnet"
    ```
    
    Supported filters include `network`, `tag`, `validators`, and `include_testnets`.
    
    ## Reputation
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/agents/42/reputation?network=base-mainnet"
    ```
    
    The agent show route may include cached reputation data. Call `/v1/agents/:agent_id/reputation` directly when the freshest live reputation calculation is needed.
    
    ## Global Feedback
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/feedback?network=base-mainnet&page=1&per_page=20"
    ```
    
    Common filters include `network`, `include_revoked`, `page`, and `per_page`.
    
    ## Validator Requests
    
    ```bash
    curl -i "https://erc-8004.quicknode.com/v1/validators/0x0000000000000000000000000000000000000000/requests?network=base-mainnet"
    ```
    
    Common filters include `network`, `tag`, and `has_response`.
    
    ## Register or Update an Agent
    
    The REST API does not expose a verified `POST /v1/agents` registration endpoint. Register agents on-chain by calling the ERC-8004 Identity Registry contract. The registration transaction mints an ERC-721 agent token and emits:
    
    ```text
    Registered(uint256 indexed agentId, string agentURI, address indexed owner)
    ```
    
    The Explorer indexes that event. After confirmation, the agent page appears at:
    
    ```text
    https://erc-8004.quicknode.com/agents/<network-slug>/<tokenId>
    ```
    
    Use the official registration tutorial and contracts page for current contract addresses, ABIs, metadata schema, and viem examples:
    
    - https://erc-8004.quicknode.com/tutorials/register-agent
    - https://erc-8004.quicknode.com/docs/contracts
    
    ## Documentation
    
    - **REST API v1**: https://erc-8004.quicknode.com/docs/api/v1
    - **Agents API**: https://erc-8004.quicknode.com/docs/api/v1/agents
    - **x402 payment flow**: https://erc-8004.quicknode.com/docs/api/v1/x402
    - **Postman collection**: https://erc-8004.quicknode.com/docs/collections/postman.json
    - **Contracts and ABIs**: https://erc-8004.quicknode.com/docs/contracts
    - **EIP-8004 Spec**: https://eips.ethereum.org/EIPS/eip-8004
    
  • skills/quicknode-skill/references/agent-subscriptions-reference.md5.9 KBab1fbd3fb72dupstream ↗
    # Agent Subscriptions Reference
    
    Programmatic Quicknode account creation for autonomous agents. A single authenticated POST returns a `QN_*` full platform API key — no dashboard, email confirmation, or human operator required.
    
    **Docs:** https://www.quicknode.com/docs/build-with-ai/agent-subscriptions
    
    ## Endpoints
    
    | Method | Path | Auth | Rate Limit | Purpose |
    |--------|------|------|------------|---------|
    | POST | `/api/v1/agent/subscriptions` | Payment header (x402 or MPP) | 20/min, 5/hour by IP + email | Create account + subscription |
    | POST | `/api/v1/agent/top_up` | API key + payment header | 30/min by API key | Add credits to existing subscription |
    | GET | `/api/v1/agent/balance` | API key | 60/min by API key | Read current credit balance |
    
    All requests target `https://www.quicknode.com`.
    
    ## Discover Plans (Send Without Payment First)
    
    Send the request without a payment header. The server returns HTTP 402 with the available plans, prices, and payment details in the body.
    
    ```bash
    curl -X POST https://www.quicknode.com/api/v1/agent/subscriptions \
      -H "Content-Type: application/json" \
      -d '{}'
    ```
    
    Parse the 402 body to get `plan_name` options, per-plan prices, accepted `paymentNetwork` values, asset contract addresses, and the `payTo` recipient address. Then retry with a payment header and the chosen plan.
    
    ## Create a Subscription (x402)
    
    ```typescript
    import { createQuicknodeX402Client } from '@quicknode/x402'
    
    const client = await createQuicknodeX402Client({
      baseUrl: 'https://www.quicknode.com',
      network: 'eip155:8453',  // Base Mainnet
      evmPrivateKey: process.env.PRIVATE_KEY as `0x${string}`,
    })
    
    const res = await client.fetch(
      'https://www.quicknode.com/api/v1/agent/subscriptions',
      {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          plan_name: 'b6_build',          // b6_build | b6_accelerate | b6_scale | b6_business
          interval: 'monthly',            // monthly | yearly
          email: '[email protected]',
          password: process.env.ACCOUNT_PASSWORD,
          password_confirmation: process.env.ACCOUNT_PASSWORD,
          full_name: 'Autonomous Agent',
          name: 'Agent Account',
          billing_address: {
            line1: '123 Main St',
            city: 'New York',
            postal_code: '10001',
            country: 'US',
          },
        }),
      },
    )
    
    const { api_key } = await res.json()
    // api_key → "QN_..." — store this; it's the QUICKNODE_API_KEY for all subsequent calls
    ```
    
    ## Create a Subscription (MPP)
    
    ```typescript
    import { Mppx, tempo } from 'mppx/client'
    import { privateKeyToAccount } from 'viem/accounts'
    
    const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)
    Mppx.create({ methods: [tempo({ account })] })
    
    const res = await fetch('https://www.quicknode.com/api/v1/agent/subscriptions', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        plan_name: 'b6_build',
        interval: 'monthly',
        email: '[email protected]',
        password: process.env.ACCOUNT_PASSWORD,
        password_confirmation: process.env.ACCOUNT_PASSWORD,
        full_name: 'Autonomous Agent',
        name: 'Agent Account',
        billing_address: {
          line1: '123 Main St',
          city: 'New York',
          postal_code: '10001',
          country: 'US',
        },
      }),
    })
    
    const { api_key } = await res.json()
    ```
    
    ## Top Up Credits
    
    ```typescript
    const res = await client.fetch(
      'https://www.quicknode.com/api/v1/agent/top_up',
      {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'x-api-key': process.env.QUICKNODE_API_KEY!,
        },
        body: JSON.stringify({
          amount: 10.0,  // top-up amount in USD
        }),
      },
    )
    const { balance_cents } = await res.json()
    ```
    
    ## Check Credit Balance
    
    ```typescript
    const res = await fetch('https://www.quicknode.com/api/v1/agent/balance', {
      headers: { 'x-api-key': process.env.QUICKNODE_API_KEY! },
    })
    const { balance_cents } = await res.json()
    // balance_cents — current balance in cents
    ```
    
    ## Plan IDs
    
    | Plan ID | Dashboard Name |
    |---------|---------------|
    | `b6_build` | Build |
    | `b6_accelerate` | Accelerate |
    | `b6_scale` | Scale |
    | `b6_business` | Business |
    
    See https://www.quicknode.com/pricing for current plan pricing and credit allocations.
    
    ## Guard Rails
    
    - **Real funds** — Subscriptions settle in real stablecoins on a mainnet payment network. Always confirm plan, interval, and payment network with the user before sending.
    - **Duplicate email** — Re-using an existing email returns an error. Retry with the same `email` and `password` to resume; never create a duplicate account.
    - **Payment retry safety** — If validation fails after a payment header is generated, retry with the same signed payment header byte-for-byte. Do not sign a fresh payment for the same attempted operation unless the server requires a new challenge.
    - **No free trials** — All subscriptions are production-grade from the first request.
    - **Synchronous** — Account and subscription are created in a single request. No async job to poll.
    - **Password requirements** — 8–64 characters, at least one lowercase, one uppercase, one number, one special character. Never fabricate credentials.
    - **Name requirements** — `full_name` and account `name` must each be 4–40 characters. The password must not equal the email.
    
    ## How It Pairs with x402 / MPP
    
    - Use **x402 or MPP** for short-lived, stateless RPC access. No account needed.
    - Use **Agent Subscriptions** when the agent needs the full platform: Streams, Webhooks, Key-Value Store, multiple endpoints, security rules, or billing control.
    - The returned `api_key` is identical to `QUICKNODE_API_KEY` used in all other Quicknode API calls.
    
    ## Documentation
    
    - **Agent Subscriptions**: https://www.quicknode.com/docs/build-with-ai/agent-subscriptions
    - **Build with AI Overview**: https://www.quicknode.com/docs/build-with-ai
    - **x402 Reference**: [x402-reference.md](x402-reference.md)
    - **MPP Reference**: [mpp-reference.md](mpp-reference.md)
    
  • skills/quicknode-skill/references/blockbook-reference.md4.6 KB8b64185e56c8upstream ↗
    # Blockbook Reference
    
    Wallet-centric blockchain data via the Blockbook add-on on your Quicknode endpoint. Provides address balances, UTXO sets, transaction history, and balance history — available via JSON-RPC or REST. Particularly useful for UTXO-based chains (Bitcoin, Dogecoin, Litecoin, etc.) where standard RPC methods lack wallet-level indexing.
    
    **Marketing:** https://www.quicknode.com/blockbook
    **Docs:** https://www.quicknode.com/docs/bitcoin/blockbook/overview
    
    ## Prerequisites
    
    Activate the **Blockbook** add-on for each chain you need in the Quicknode dashboard. Each chain is a separate add-on. Blockbook methods are available on your existing endpoint URL once active.
    
    ## Supported Chains
    
    | Chain | Add-on |
    |-------|--------|
    | Bitcoin (BTC) | BTC Blockbook |
    | Ethereum (ETH) | ETH Blockbook |
    | Bitcoin Cash (BCH) | BCH Blockbook |
    | Dogecoin (DOGE) | Dogecoin Blockbook |
    | Litecoin (LTC) | Litecoin Blockbook |
    | Zcash (ZEC) | Zcash Blockbook |
    
    ## Methods Overview
    
    | Method | Description |
    |--------|-------------|
    | `bb_getAddress` | Address balance, total received/sent, and transaction list |
    | `bb_getXPUB` | XPUB-level balance and transaction history |
    | `bb_getUTXOs` | Unspent transaction outputs (UTXOs) for an address or XPUB |
    | `bb_getBalanceHistory` | Historical balance for an address over time |
    | `bb_getTx` | Transaction details by txid |
    | `bb_getTxSpecific` | Backend-native transaction details by txid |
    | `bb_getBlock` | Block data including transactions |
    | `bb_getBlockHash` | Block hash by block height |
    | `bb_getEstimateFee` | Fee estimation for a target confirmation window |
    | `bb_getTickers` / `bb_getTickersList` | Fiat ticker data |
    | `bb_sendTransaction` | Broadcast a signed raw transaction |
    
    Both JSON-RPC and Blockbook REST interfaces are available on the same endpoint. The REST base path is `/addon/3/api/v2/` on a Bitcoin endpoint with the add-on enabled.
    
    ## Get Address Balance and History
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'bb_getAddress',
        params: [
          'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
          {
            details: 'txs', // basic | txids | txs
            size: 10,
            page: 1,
          },
        ],
      }),
    });
    
    const { result } = await response.json();
    // result.address — the queried address
    // result.balance — confirmed balance in satoshis
    // result.unconfirmedBalance — unconfirmed balance in satoshis
    // result.totalReceived — total received in satoshis
    // result.totalSent — total sent in satoshis
    // result.txs — total transaction count
    // result.transactions — array of transaction objects (when details='txs')
    ```
    
    ## Get UTXOs
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'bb_getUTXOs',
        params: [
          'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
          { confirmed: true }, // true = confirmed UTXOs only
        ],
      }),
    });
    
    const { result } = await response.json();
    // result — array of UTXO objects:
    // [{ txid, vout, value, height, confirmations, coinbase? }]
    ```
    
    **Example UTXO:**
    ```json
    {
      "txid": "7f3a1c2b...",
      "vout": 0,
      "value": "500000",
      "height": 820000,
      "confirmations": 6
    }
    ```
    
    ## Get Balance History
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'bb_getBalanceHistory',
        params: [
          'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
          { groupBy: 86400 }, // seconds per bucket (86400 = daily)
        ],
      }),
    });
    
    const { result } = await response.json();
    // result — array of { time, txs, received, sent, sentToSelf, rates }
    ```
    
    ## REST Access
    
    ```bash
    curl -X GET \
      "https://YOUR_QUICKNODE_ENDPOINT.com/addon/3/api/v2/address/bc1p72h09wplu60qdxyr8q3ftgdhga7jxnjhdz08qs4u9we9q3lzmqmqa4yzj6?details=txids"
    ```
    
    ## Troubleshooting
    
    | Error | Cause | Fix |
    |-------|-------|-----|
    | Method not found | Add-on not enabled | Activate Blockbook for this chain on your endpoint in the dashboard |
    | Invalid address | Incorrect address format | Verify address format matches the chain (e.g., bech32 for BTC) |
    | Empty result | Address has no activity | Confirm the address is on the correct network |
    
    ## Documentation
    
    - **Blockbook Overview**: https://www.quicknode.com/docs/bitcoin/blockbook/overview
    - **Marketing**: https://www.quicknode.com/blockbook
    
  • skills/quicknode-skill/references/cli-reference.md21 KB363db2ed01ebupstream ↗
    # Quicknode CLI Reference
    
    The `qn` CLI manages Quicknode product APIs from a terminal, script, CI job, or agent shell. Use it for endpoints, Streams, Webhooks, Key-Value Store, SQL Explorer, teams, usage, billing, metrics, security workflows, and making JSON-RPC calls to any supported network via Tooling Access, with no endpoint setup required.
    
    It also has a keyless paid lane: `qn wallet` plus `qn rpc call --x402`/`--mpp` pay for RPC calls with stablecoins, with no Quicknode account, API key, login, Tooling Access, or provisioned endpoint. See [Paid RPC (x402 and MPP)](#paid-rpc-x402-and-mpp).
    
    **Docs:** https://www.quicknode.com/docs/cli
    
    ## Installation
    
    ### Homebrew (macOS / Linux)
    
    ```bash
    brew install quicknode/tap/qn
    qn --version
    ```
    
    ## Authentication
    
    Create an API key in the Quicknode dashboard, then log in and verify access:
    
    ```bash
    qn auth login
    qn auth whoami
    ```
    
    In CLI v0.4.0 and later, `qn auth whoami` validates the API key and returns account metadata such as account id, account name, plan, plan status, and plan interval.
    
    For non-interactive environments, pass a key directly or write a config file outside the repository:
    
    ```bash
    qn auth login --api-key <KEY>
    qn --api-key <KEY> endpoint list --format json
    ```
    
    Credential precedence:
    
    1. `--api-key <KEY>`
    2. `--config-file <PATH>`
    3. `~/.config/qn/config.toml`
    
    The CLI does not read API keys directly from environment variables. In CI, read the environment secret in the shell and pass it through `--api-key`, or write a temporary config file and pass `--config-file`.
    
    ## Agent Context
    
    Use `qn agent context` to print a self-contained CLI usage guide for AI agents. It does not require authentication and makes no network request.
    
    ```bash
    qn agent context
    qn agent context -o json
    ```
    
    ## Output Formats
    
    Set output with `--format` or `-o`.
    
    | Format | Use |
    |--------|-----|
    | `table` | Human-readable terminal output |
    | `json` | Scripts, tests, and `jq` pipelines |
    | `yaml` | Readable structured output |
    | `md` | Markdown tables for issues and docs |
    | `toon` | Compact LLM-oriented structured output |
    
    Examples:
    
    ```bash
    qn endpoint list --format json
    qn usage summary --from 7d -o yaml
    qn endpoint list --wide
    ```
    
    ## Command Groups
    
    ### Auth
    
    ```bash
    qn auth login
    qn auth login --api-key <KEY>
    qn auth whoami
    qn auth status
    qn auth logout
    ```
    
    Use `qn auth whoami --format json` when an agent needs structured account data:
    
    ```json
    {
      "source": "config file",
      "key": "****abcd",
      "validated": true,
      "account_id": 123456,
      "account_name": "Example Account",
      "plan": "Accelerate (active, monthly)",
      "plan_status": "active",
      "plan_interval": "monthly"
    }
    ```
    
    ### RPC (Tooling Access)
    
    Requires CLI v0.5.0+. `qn rpc` calls your account's Tooling Access endpoint — a single multichain, read-only endpoint Quicknode provisions automatically, with short-lived JWTs minted and refreshed automatically. No manual endpoint setup required.
    
    ```bash
    qn auth login
    qn rpc call eth_getBlockByNumber '["latest", false]' --network base-mainnet
    ```
    
    Params: positional (JSON array), by name (JSON object), from a file, or from stdin.
    
    ```bash
    qn rpc call eth_blockNumber
    qn rpc call eth_getBalance '["0xabc...", "latest"]'
    qn rpc call getSlot --network solana-mainnet
    qn rpc call eth_call --params-file params.json
    echo '[...]' | qn rpc call eth_call -
    cat params.json | qn rpc call eth_call -f -
    ```
    
    `--network <KEY>` selects a network on the multichain endpoint (e.g. `base-mainnet`, `solana-mainnet`, `polygon`, `btc`). Omit it for the default network. `qn rpc list-networks` (alias `ls`) lists available keys — no RPC call made.
    
    ```bash
    qn rpc list-networks
    qn rpc list-networks -o json
    ```
    
    `--endpoint-url <URL>` sends the call to a self-authenticating URL instead of the Tooling Access endpoint, overriding `[rpc] endpoint_url` in `~/.config/qn/config.toml`. Mutually exclusive with `--network`.
    
    First-run `qn rpc call` prompts `[y/N]` to enable Tooling Access if it isn't provisioned yet. Pass `-y`/`--yes` to auto-confirm non-interactively.
    
    ```bash
    qn rpc call eth_blockNumber --network base-mainnet -y
    ```
    
    ### Paid RPC (x402 and MPP)
    
    Requires CLI v0.6.0+. `qn rpc call` can pay for a call with stablecoins through the x402 or MPP gateway instead of using the account's API key. This lane requires no Quicknode account, API key, login, Tooling Access, or provisioned endpoint — only a funded local wallet.
    
    | Payment path | Command or flag | Best for |
    |--------------|-----------------|----------|
    | x402 per request | `qn rpc call --x402` | One-off EVM or Solana payments |
    | MPP per request | `qn rpc call --mpp` | One-off payments on Tempo |
    | x402 credit drawdown | `qn rpc x402` + `--x402-drawdown` | Prepay once, then spend credits over many calls |
    | MPP payment channel | `qn rpc mpp` + `--mpp-session` | Deposit once, then authorize calls with off-chain vouchers |
    
    These commands move real funds. Get explicit user confirmation first, use a dedicated minimally funded wallet, and set `--max-amount` on every signing action. Paid calls cannot use `--endpoint-url`.
    
    #### Payment Wallets
    
    `qn wallet` manages the local key store for the paid lane. No API key or login required.
    
    ```bash
    qn wallet generate --vm evm --name payer
    qn wallet generate --vm svm --name sol-payer
    qn wallet list
    qn wallet show payer
    qn wallet rm payer
    ```
    
    `--vm evm` generates a secp256k1 wallet for x402 on EVM and for MPP on Tempo. `--vm svm` generates an ed25519 wallet for x402 on Solana. `--force` overwrites an existing wallet of the same name.
    
    `generate` prints the address (with a QR to fund it on a terminal) and writes the raw key at `0600` under `<config-dir>/qn/wallets/`. Quicknode does not hold, back up, or recover it. `list` and `show` never print the key. `rm` is gated and irreversible — the stored key is the only copy.
    
    The CLI never accepts a private key as a flag value, environment variable, or inline config value. To pay with an existing key, put it in a file and pass `--payment-key-file <PATH>` (or `-` to read stdin). Key precedence is `--payment-key-file` > `--payment-wallet` > `key_file` > `wallet` under `[rpc.payment]`.
    
    #### Discover Networks And Payment Options
    
    Both gateways expose discovery commands that need no API key (aliases: `networks`, `payments`).
    
    ```bash
    qn rpc x402 supported-networks
    qn rpc x402 supported-payments
    qn rpc mpp supported-networks
    qn rpc mpp supported-payments
    ```
    
    Use a slug from `supported-networks` as `--network`. Use a row from `supported-payments` — it returns the payment network, asset symbol, and token address — as `--payment-network` and `--payment-asset`. Query these instead of hardcoding a network or asset list.
    
    The query network and the payment network are independent. `--network ethereum-mainnet` with `--payment-network base-sepolia` pays on Base Sepolia for an Ethereum Mainnet read.
    
    #### Pay Per Request
    
    `--x402` signs a stablecoin payment per call on an EVM or Solana payment network:
    
    ```bash
    qn rpc call eth_getBlockByNumber '["latest", false]' \
      --network ethereum-mainnet \
      --x402 \
      --payment-wallet payer \
      --payment-network base-sepolia \
      --payment-asset USDC \
      --max-amount 1000
    ```
    
    `--mpp` settles on Tempo using the same EVM key format. `--receipt` wraps stdout as `{"result": ..., "payment_receipt": ...}`:
    
    ```bash
    qn rpc call eth_getBlockByNumber '["latest", false]' \
      --network ethereum-mainnet \
      --mpp \
      --receipt \
      --payment-wallet payer \
      --payment-network tempo-testnet \
      --payment-asset pathUSD \
      --max-amount 1000
    ```
    
    The receipt carries the payment method, status, timestamp, and the settlement transaction hash in `reference`. It is non-null only on MPP; x402 returns `null`. Payment happens either way — `--receipt` only changes the output shape.
    
    `--x402` and `--mpp` are mutually exclusive, and both require `--network` (the query chain, as the gateway's path slug). `--payment-asset` accepts a symbol like `USDC`, an EVM contract address, or a Solana mint.
    
    `--max-amount` is a per-call spend ceiling in integer base units of the asset (`10000` = 0.01 USDC), not the amount sent. It has no built-in default. Offers above the ceiling are never signed; among those at or under it, the cheapest is paid.
    
    For x402 on Solana, use an `svm` wallet with an offered Solana payment network and asset. Pass `--svm-rpc-url` at any real volume — the public Solana RPC the CLI otherwise falls back to rate-limits aggressively.
    
    #### x402 Credit Drawdown
    
    Drawdown authenticates the wallet once, buys prepaid credits, and spends one credit per successful response — no per-call signing.
    
    ```bash
    qn rpc x402 drip \
      --payment-wallet payer \
      --payment-network base-sepolia
    
    qn rpc x402 buy-credits \
      --network ethereum-mainnet \
      --payment-wallet payer \
      --payment-network base-sepolia \
      --payment-asset USDC \
      --max-amount 10000000
    
    qn rpc x402 balance \
      --payment-wallet payer \
      --payment-network base-sepolia
    
    qn rpc call eth_blockNumber \
      --network ethereum-mainnet \
      --x402-drawdown \
      --payment-wallet payer
    ```
    
    `drip` requests testnet credits from the Base Sepolia faucet, once per account; fund Solana wallets out of band. `drip` and `balance` (alias `credits`) authenticate the wallet but sign no payment, so they need only the wallet and payment network. `buy-credits` signs the purchase, requires the full payment flags, and is gated — pass `-y` in a script.
    
    `qn rpc call --x402-drawdown` needs only the query network and the wallet; it takes no asset or spend ceiling, and the pay network defaults to the query network. Credits are not scoped to the network they were bought against and can pay for calls to any supported query network. The authenticated gateway session is cached at `0600` and refreshed automatically. Running out of credits surfaces an exit-2 error pointing back at `buy-credits`.
    
    #### MPP Payment Channel
    
    A channel deposits into a Tempo escrow once, then authorizes calls with cumulative off-chain EIP-712 vouchers.
    
    ```bash
    qn rpc mpp open \
      --deposit 1000000 \
      --payment-wallet payer \
      --payment-network tempo-testnet \
      --payment-asset pathUSD \
      --max-amount 1000000
    
    qn rpc call eth_blockNumber \
      --network ethereum-mainnet \
      --mpp-session \
      --payment-wallet payer \
      --payment-network tempo-testnet \
      --payment-asset pathUSD
    
    qn rpc mpp status \
      --payment-wallet payer \
      --payment-network tempo-testnet \
      --payment-asset pathUSD
    
    qn rpc mpp top-up \
      --deposit 500000 \
      --payment-wallet payer \
      --payment-network tempo-testnet \
      --payment-asset pathUSD \
      --max-amount 500000
    
    qn rpc mpp close \
      --payment-wallet payer \
      --payment-network tempo-testnet \
      --payment-asset pathUSD
    ```
    
    The lifecycle commands identify the channel by `--payment-network` and `--payment-asset` and take no query `--network`. `open`, `top-up`, and `close` sign on-chain actions, so they are gated and take `--max-amount`. `close` settles on-chain and refunds the unused deposit.
    
    `status` reads the local record only. `status --verify` asks the gateway instead and spends one request unit from the channel. The channel record lives at `<config-dir>/qn/channels.toml`; the gateway has no read-only channel endpoint, so a lost record means opening a new channel.
    
    `--mpp-session` needs an open channel plus the query `--network`. One channel can fund calls to any supported query network.
    
    #### Payment Defaults In Config
    
    Store reusable payment values under `[rpc.payment]` in `~/.config/qn/config.toml`:
    
    ```toml
    [rpc.payment]
    wallet = "payer"
    payment_network = "base-sepolia"
    payment_asset = "USDC"
    max_amount = "10000"
    ```
    
    `key_file` and `svm_rpc_url` are also accepted. Config supplies values but never activates a payment mode — every call still needs `--x402`, `--mpp`, `--x402-drawdown`, or `--mpp-session`.
    
    #### Retry And Exit-Code Safety
    
    Paid calls never auto-retry; `--retries` does not apply to them. On a per-request paid call, exit 2 means the gateway refused and nothing settled, while **exit 3 means the outcome is unknown and the wallet may already have been charged**. On exit 3, check the wallet before re-running — never blind-retry a paid call.
    
    A drawdown call is single-attempt and draws one credit only on success; the one exception is a transparent re-auth when the cached session token expired, which draws nothing. A session call signs one cumulative voucher and is single-attempt.
    
    ### Tooling Access
    
    ```bash
    qn tooling-access status
    qn tooling-access enable
    qn tooling-access disable
    ```
    
    `status` shows whether Tooling Access is enabled and the endpoint URL. `enable` provisions the endpoint (idempotent, admin role required). `disable` is idempotent and account-wide — it cuts off blockchain access for all Quicknode developer tooling, not just the current session. Confirm with the user before running it.
    
    ### Endpoints
    
    ```bash
    qn endpoint list --limit 20
    qn endpoint show <endpoint-id>
    qn endpoint urls <endpoint-id>
    qn endpoint logs <endpoint-id> --from 1h --to now --limit 50
    qn endpoint log-details <endpoint-id> <request-id>
    qn endpoint metrics <endpoint-id> --metric method_calls_over_time --period day
    ```
    
    Commands that create, update, pause, resume, archive, enable or disable multichain, or change endpoint security/rate limits mutate endpoint state.
    
    ```bash
    qn endpoint create --chain ethereum --network mainnet
    qn endpoint update <endpoint-id> --label "production-mainnet"
    qn endpoint pause <endpoint-id>
    qn endpoint resume <endpoint-id>
    qn endpoint archive <endpoint-id>
    qn endpoint enable-multichain <endpoint-id>
    qn endpoint disable-multichain <endpoint-id>
    ```
    
    ### Endpoint Tags
    
    ```bash
    qn endpoint tag list
    qn endpoint tag add <endpoint-id> production
    qn endpoint tag remove <endpoint-id> <tag-id>
    qn endpoint tag rename <tag-id> mainnet-production
    qn endpoint tag delete <tag-id>
    ```
    
    Tag add, rename, remove, and delete commands change endpoint metadata.
    
    ### Bulk Endpoint Operations
    
    ```bash
    qn endpoint bulk pause <endpoint-id-1> <endpoint-id-2>
    qn endpoint bulk resume <endpoint-id-1> <endpoint-id-2>
    qn endpoint bulk tag add --label production <endpoint-id-1> <endpoint-id-2>
    qn endpoint bulk tag remove --tag-id <tag-id> <endpoint-id-1> <endpoint-id-2>
    ```
    
    Bulk operations can change multiple endpoints in one command.
    
    ### Endpoint Security and Rate Limits
    
    ```bash
    qn endpoint security show <endpoint-id>
    qn endpoint security options <endpoint-id>
    qn endpoint security set-options <endpoint-id> --tokens enabled --ips enabled
    qn endpoint security token create <endpoint-id>
    qn endpoint security token delete <endpoint-id> <token-id>
    qn endpoint security referrer add <endpoint-id> https://example.com
    qn endpoint security referrer remove <endpoint-id> <referrer-id>
    qn endpoint security ip add <endpoint-id> 203.0.113.10
    qn endpoint security ip remove <endpoint-id> <ip-id>
    qn endpoint security jwt add <endpoint-id> --kid key-1 --name "prod jwt" --public-key-file public.pem
    qn endpoint security jwt remove <endpoint-id> <jwt-id>
    qn endpoint security domain-mask add <endpoint-id> rpc.example.com
    qn endpoint security domain-mask remove <endpoint-id> <domain-mask-id>
    qn endpoint security request-filter create <endpoint-id> --method eth_getBalance
    qn endpoint security request-filter update <endpoint-id> <request-filter-id> --methods eth_getBalance,eth_call
    qn endpoint security request-filter remove <endpoint-id> <request-filter-id>
    qn endpoint security ip-header set <endpoint-id> X-Forwarded-For
    qn endpoint security ip-header remove <endpoint-id>
    
    qn endpoint rate-limit get <endpoint-id>
    qn endpoint rate-limit set <endpoint-id> --rps 100 --rpm 5000
    qn endpoint rate-limit delete-override <endpoint-id> <override-id>
    qn endpoint rate-limit method-list <endpoint-id>
    qn endpoint rate-limit method-create <endpoint-id> --interval minute --method eth_getLogs --rate 120
    qn endpoint rate-limit method-update <endpoint-id> <method-rate-limit-id> --status disabled
    qn endpoint rate-limit method-delete <endpoint-id> <method-rate-limit-id>
    ```
    
    Security removals, disabling protection toggles, and rate-limit deletes are destructive or protection-lowering operations. Inspect `qn endpoint security show <endpoint-id>` and `qn endpoint rate-limit get <endpoint-id>` first.
    
    ### Team Management
    
    Read team state with a Viewer or Admin API key:
    
    ```bash
    qn team list
    qn team show <team-id>
    qn team endpoints <team-id>
    ```
    
    Team create, delete, endpoint association, and member management commands mutate account access. Use an Admin API key and get explicit confirmation before running them.
    
    ```bash
    qn team create --name "Protocol Ops"
    qn team set-endpoints <team-id> <endpoint-id-1> <endpoint-id-2>
    qn team delete <team-id>
    ```
    
    `qn team set-endpoints` replaces the full endpoint association set for the team. Pass every endpoint that should remain associated; omitting an existing endpoint removes it from that team.
    
    Manage team members with `qn team member`:
    
    ```bash
    qn team member invite <team-id> --email [email protected] --full-name "Alice Example" --role viewer
    qn team member resend <team-id> <user-id>
    qn team member remove <team-id> <user-id>
    qn team member remove <team-id> <user-id> --destroy-user
    ```
    
    Invite roles are `admin`, `viewer`, and `billing`. `--full-name` is required when inviting a new user. `--destroy-user` deletes the user account instead of only removing team membership; treat it as destructive.
    
    ### Streams
    
    ```bash
    qn stream list --limit 20
    qn stream show <stream-id>
    qn stream enabled-count
    qn stream test-filter \
      --network ethereum-mainnet \
      --dataset block \
      --block 17811625 \
      --filter-file filter.js
    ```
    
    Create and lifecycle commands change Stream state and may prompt:
    
    ```bash
    qn stream create \
      --name blocks \
      --network ethereum-mainnet \
      --dataset block \
      --start 17811625 \
      --end=-1 \
      --region usa-east \
      --webhook https://example.com/webhook
    
    qn stream pause <stream-id>
    qn stream activate <stream-id>
    qn stream update <stream-id> --name "renamed-stream" --notification-email [email protected]
    qn stream delete <stream-id>
    ```
    
    ### Webhooks
    
    ```bash
    qn webhook list --limit 20
    qn webhook show <webhook-id>
    qn webhook enabled-count
    qn webhook create \
      --name "wallet alerts" \
      --network ethereum-mainnet \
      --url https://example.com/webhook \
      --compression none \
      --template evm-wallet \
      --wallet 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
    ```
    
    Webhook lifecycle and update commands:
    
    ```bash
    qn webhook update <webhook-id> --name "wallet alerts v2" --url https://example.com/new-webhook --compression none
    qn webhook update-template <webhook-id> --template evm-contract-events --contract 0xContract --event-hash 0xEventHash
    qn webhook pause <webhook-id>
    qn webhook activate <webhook-id>
    qn webhook delete <webhook-id>
    ```
    
    `qn webhook update` changes name, notification email, destination, security token, or compression without changing the filter template. `qn webhook update-template` changes template arguments and accepts the same template/list flags as `create`.
    
    ### Key-Value Store
    
    Sets store one value per key:
    
    ```bash
    qn kv set put mykey myvalue
    qn kv set get mykey
    qn kv set list
    qn kv set delete mykey
    qn kv set bulk --add threshold=750000 --delete old_threshold
    ```
    
    Lists store ordered values under one key:
    
    ```bash
    qn kv list list
    qn kv list create allowlist 0xabc 0xdef
    qn kv list append allowlist 0x123
    qn kv list contains allowlist 0xabc
    qn kv list get allowlist
    qn kv list remove-item allowlist 0x123
    qn kv list update allowlist --add 0x456 --remove 0xabc
    qn kv list delete allowlist
    ```
    
    ### SQL Explorer
    
    ```bash
    qn sql query "SELECT * FROM hyperliquid_trades LIMIT 10" --cluster-id hyperliquid-core-mainnet
    qn sql schema hyperliquid-core-mainnet
    qn sql query "SELECT * FROM hyperliquid_trades LIMIT 100" --cluster-id hyperliquid-core-mainnet --format json
    qn sql query --file query.sql --cluster-id hyperliquid-core-mainnet
    qn sql query --file - --cluster-id hyperliquid-core-mainnet
    ```
    
    ### Account Operations
    
    ```bash
    qn usage summary --from 7d
    qn usage by-endpoint --from 7d
    qn usage by-method --from 7d
    qn usage by-chain --from 7d
    qn usage by-tag --from 7d
    qn metrics account --period day --metric credits_over_time
    qn metrics endpoint <endpoint-id> --period day --metric response_status_breakdown
    qn chain list
    qn chain credits ethereum
    qn billing invoices
    qn billing payments
    qn completions zsh
    ```
    
    `qn chain credits <chain>` returns the per-method API credit costs for that chain, using the same chain slugs returned by `qn chain list`. Use it when an agent needs account-aware credit costs instead of hardcoding method multipliers.
    
    ## Confirmation Behavior
    
    Commands that delete, archive, pause, revoke, spend funds, or otherwise change resources prompt before acting. In non-interactive environments, keep examples read-only by default or pass the documented prompt bypass only after explicit user confirmation. This includes the first-run Tooling Access auto-enable prompt on `qn rpc call`, `qn tooling-access disable`, `qn wallet rm`, `qn rpc x402 buy-credits`, and `qn rpc mpp open`/`top-up`/`close`; pass `-y`/`--yes` to proceed non-interactively.
    
    In a non-TTY, a gated command without `--yes` exits 5 before any request is sent, so nothing changes. `--no-input` forces fail-fast non-interactive behavior everywhere.
    
    ## Documentation
    
    - **CLI Docs**: https://www.quicknode.com/docs/cli
    - **CLI Examples**: https://www.quicknode.com/docs/cli/examples
    - **RPC Micropayments**: https://www.quicknode.com/docs/cli/micropayments
    
  • skills/quicknode-skill/references/hypercore-hyperliquid-reference.md18 KBacb17d2e9705upstream ↗
    # HyperCore & Hyperliquid Reference
    
    Quicknode provides infrastructure for the Hyperliquid L1 chain through HyperCore, delivering gRPC, JSON-RPC, WebSocket, and Info API access to exchange and trading data, plus HyperEVM RPC for smart contract execution.
    
    ## Overview
    
    | Property | Value |
    |----------|-------|
    | **Chain** | Hyperliquid L1 |
    | **Consensus** | HyperBFT (based on HotStuff) |
    | **Native Token** | HYPE |
    | **Mainnet Chain ID** | 999 |
    | **Testnet Chain ID** | 998 |
    | **Block Rate** | ~12 blocks/sec |
    | **Status** | Public Beta |
    | **gRPC Compression** | zstd (~70% bandwidth reduction) |
    | **Architecture** | HyperCore (exchange/trading) + HyperEVM (smart contracts) |
    
    ## Network Configuration
    
    | Network | Endpoint Pattern | Chain ID |
    |---------|-----------------|----------|
    | **Mainnet** | `https://[name].hype-mainnet.quiknode.pro/[token]/` | 999 (0x3E7) |
    | **Testnet** | `https://[name].hype-testnet.quiknode.pro/[token]/` | 998 |
    
    Testnet is pruned to the last 250 blocks.
    
    ## HyperCore Access Methods
    
    | Method | Path / Port | Protocol | Description |
    |--------|-------------|----------|-------------|
    | **Info** | `/info` | HTTP POST | 50+ specialized methods for market data, positions, orders |
    | **JSON-RPC** | `/hypercore` | HTTP POST | Block queries: `hl_getLatestBlocks`, `hl_getBlock`, `hl_getBatchBlocks` |
    | **WebSocket** | `/hypercore/ws` | WebSocket | Real-time subscriptions: `hl_subscribe`, `hl_unsubscribe` |
    | **gRPC** | Port 10000 | gRPC (HTTP/2) | Lowest latency streaming: `Ping`, `StreamBlocks`, `StreamData` |
    
    ## Authentication
    
    ### URL Token (default)
    
    ```
    https://your-endpoint.hype-mainnet.quiknode.pro/your-auth-token/
    ```
    
    ### Header-Based
    
    ```bash
    curl -H "x-token: your-auth-token" \
      https://your-endpoint.hype-mainnet.quiknode.pro/evm
    ```
    
    ### gRPC Authentication
    
    ```javascript
    const grpc = require("@grpc/grpc-js");
    
    const metadata = new grpc.Metadata();
    metadata.add("x-token", "your-auth-token");
    // Pass metadata to all gRPC calls
    ```
    
    Endpoint for gRPC: `your-endpoint.hype-mainnet.quiknode.pro:10000` (TLS required).
    
    ## Info Endpoint
    
    The Info API provides 50+ methods for querying Hyperliquid exchange data. All requests are `POST` to `/info` with a `type` field.
    
    > **Note:** Some Info methods (e.g., `allMids`, `l2Book`, `meta`) are also available via Hyperliquid's public endpoints without a Quicknode subscription. Check https://www.quicknode.com/docs/hyperliquid/llms.txt for details on which methods require a Quicknode endpoint vs. public access.
    
    ### Base URL
    
    ```
    https://[endpoint].hype-mainnet.quiknode.pro/[token]/info
    ```
    
    ### Quick Example
    
    ```typescript
    const response = await fetch(
      `${process.env.QUICKNODE_RPC_URL}info`,
      {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({ type: "allMids" }),
      }
    );
    const midPrices = await response.json();
    // { "BTC": "92385.0", "ETH": "3167.4", ... }
    ```
    
    ### Key Methods
    
    | Method (`type`) | Parameters | Description |
    |-----------------|------------|-------------|
    | `allMids` | — | Real-time mid-market prices for all pairs |
    | `l2Book` | `coin` | Level 2 order book (up to 20 levels per side) |
    | `recentTrades` | `coin` | Recent executed trades |
    | `candleSnapshot` | `coin`, `interval`, `startTime`, `endTime` | OHLCV candlestick data |
    | `meta` | — | Exchange metadata: trading pairs, leverage limits |
    | `metaAndAssetCtxs` | — | Market data with funding, OI, oracle prices |
    | `spotMeta` | — | Spot market metadata |
    | `spotMetaAndAssetCtxs` | — | Spot metadata with prices |
    | `clearinghouseState` | `user` | Account positions, margin, P&L |
    | `spotClearinghouseState` | `user` | Spot token balances |
    | `openOrders` | `user` | All open orders for a user |
    | `frontendOpenOrders` | `user` | Open orders (frontend format) |
    | `historicalOrders` | `user` | Up to 2,000 recent historical orders |
    | `orderStatus` | `user`, `oid` | Status of a specific order |
    | `userFills` | `user` | Up to 2,000 recent trade executions |
    | `userFillsByTime` | `user`, `startTime` | Fills within a time range |
    | `fundingHistory` | `coin`, `startTime` | Historical funding rates |
    | `predictedFundings` | — | Forecasted funding rates |
    | `activeAssetData` | `user`, `coin` | Active trading data for user/asset |
    | `portfolio` | `user` | Account value and P&L history |
    | `vaultDetails` | `vaultAddress` | Vault analytics |
    | `exchangeStatus` | — | Exchange status and maintenance info |
    
    ## JSON-RPC Methods
    
    POST requests to `/hypercore`.
    
    ### hl_getLatestBlocks
    
    ```typescript
    const response = await fetch(
      `${process.env.QUICKNODE_RPC_URL}hypercore`,
      {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          jsonrpc: "2.0",
          method: "hl_getLatestBlocks",
          params: { stream: "trades", count: 10 },
          id: 1,
        }),
      }
    );
    const { result } = await response.json();
    // result.blocks: [{ local_time, block_time, block_number, events }]
    ```
    
    ### hl_getBlock
    
    ```typescript
    const response = await fetch(
      `${process.env.QUICKNODE_RPC_URL}hypercore`,
      {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          jsonrpc: "2.0",
          method: "hl_getBlock",
          params: ["trades", 817824084],
          id: 1,
        }),
      }
    );
    ```
    
    ### hl_getBatchBlocks
    
    ```typescript
    const response = await fetch(
      `${process.env.QUICKNODE_RPC_URL}hypercore`,
      {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          jsonrpc: "2.0",
          method: "hl_getBatchBlocks",
          params: { stream: "trades", from: 817824078, to: 817824090 },
          id: 1,
        }),
      }
    );
    ```
    
    ### hl_getLatestBlockNumber
    
    ```typescript
    const response = await fetch(
      `${process.env.QUICKNODE_RPC_URL}hypercore`,
      {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          jsonrpc: "2.0",
          method: "hl_getLatestBlockNumber",
          params: ["events"],
          id: 1,
        }),
      }
    );
    ```
    
    ## WebSocket
    
    Connect to `/hypercore/ws` for real-time subscriptions.
    
    ### Subscribe
    
    ```typescript
    import WebSocket from "ws";
    
    const ws = new WebSocket(
      `${process.env.QUICKNODE_WSS_URL}hypercore/ws`
    );
    
    ws.on("open", () => {
      // Subscribe to trades
      ws.send(
        JSON.stringify({
          jsonrpc: "2.0",
          method: "hl_subscribe",
          params: { streamType: "trades" },
          id: 1,
        })
      );
    });
    
    ws.on("message", (data) => {
      const message = JSON.parse(data.toString());
      if (message.params) {
        console.log("Trade event:", message.params);
      }
    });
    
    // Unsubscribe
    ws.send(
      JSON.stringify({
        jsonrpc: "2.0",
        method: "hl_unsubscribe",
        params: { streamType: "trades" },
        id: 2,
      })
    );
    ```
    
    ## gRPC Streaming
    
    Port 10000 provides the lowest-latency access to HyperCore data via three RPC methods.
    
    ### Connection Setup
    
    ```typescript
    const grpc = require("@grpc/grpc-js");
    const protoLoader = require("@grpc/proto-loader");
    
    const ENDPOINT = "your-endpoint.hype-mainnet.quiknode.pro:10000";
    const TOKEN = "your-auth-token";
    
    const packageDefinition = protoLoader.loadSync("streaming.proto", {
      keepCase: true,
      longs: String,
      enums: String,
      defaults: true,
      oneofs: true,
    });
    
    const proto = grpc.loadPackageDefinition(packageDefinition);
    const channelCredentials = grpc.credentials.createSsl();
    const client = new proto.streaming.Streaming(ENDPOINT, channelCredentials, {
      "grpc.max_receive_message_length": 100 * 1024 * 1024, // 100MB
    });
    
    const metadata = new grpc.Metadata();
    metadata.add("x-token", TOKEN);
    ```
    
    ### gRPC Methods
    
    | Method | Type | Description |
    |--------|------|-------------|
    | `Ping` | Unary | Connection health check |
    | `StreamBlocks` | Server streaming | Stream blocks from a timestamp |
    | `StreamData` | Bidirectional streaming | Subscribe to filtered data streams |
    
    ### Ping
    
    ```typescript
    client.Ping({ count: 1 }, metadata, (error, response) => {
      if (error) console.error("Ping failed:", error);
      else console.log("Ping response:", response);
    });
    ```
    
    ### StreamData (Bidirectional)
    
    ```typescript
    const stream = client.StreamData(metadata);
    
    // Subscribe to trades for specific coins
    stream.write({
      subscribe: {
        stream_type: "TRADES",
        coins: ["BTC", "ETH"],
      },
    });
    
    // Send keepalive pings every 30 seconds
    const pingInterval = setInterval(() => {
      stream.write({ ping: { timestamp: Date.now() } });
    }, 30000);
    
    stream.on("data", (response) => {
      if (response.data) {
        const block = JSON.parse(response.data.data);
        console.log("Block:", response.data.block_number, block);
      }
      if (response.pong) {
        console.log("Pong:", response.pong.timestamp);
      }
    });
    
    stream.on("error", (error) => {
      console.error("Stream error:", error);
      clearInterval(pingInterval);
    });
    
    stream.on("end", () => {
      clearInterval(pingInterval);
    });
    ```
    
    ## gRPC Stream Types
    
    | Stream Type | Volume | Available Via |
    |-------------|--------|---------------|
    | **TRADES** | High | gRPC, JSON-RPC, WebSocket |
    | **ORDERS** | Very High | gRPC, JSON-RPC, WebSocket |
    | **BOOK_UPDATES** | Very High | gRPC, JSON-RPC, WebSocket |
    | **TWAP** | Low | gRPC, JSON-RPC, WebSocket |
    | **EVENTS** | High | gRPC, JSON-RPC, WebSocket |
    | **BLOCKS** | Extreme | gRPC only |
    | **WRITER_ACTIONS** | Low | gRPC, JSON-RPC, WebSocket |
    
    ### Stream Data Details
    
    - **TRADES**: Execution data — coin, price, size, side, fees, liquidation info
    - **ORDERS**: Order lifecycle — 18+ status types (open, filled, canceled, rejected variants)
    - **BOOK_UPDATES**: Level-2 order book diffs — individual order adds/removes
    - **TWAP**: Time-weighted average price order updates — activated, finished, terminated
    - **EVENTS**: Ledger updates, funding payments, deposits, withdrawals, delegations
    - **BLOCKS**: Raw HyperCore blocks with all 34 action types (gRPC only)
    - **WRITER_ACTIONS**: System-level spot token transfers (HyperCore to HyperEVM)
    
    ## gRPC Filtering
    
    Filter streams by coin, user, side, and other fields depending on stream type.
    
    ### Filter Fields by Stream
    
    | Stream | Available Filters |
    |--------|-------------------|
    | **TRADES** | `coin`, `user`, `side`, `liquidation`, `builder` |
    | **ORDERS** | `coin`, `user`, `status`, `builder` |
    | **BOOK_UPDATES** | `coin`, `side` |
    | **TWAP** | `coin`, `user`, `status` |
    | **EVENTS** | `user`, `type` |
    | **WRITER_ACTIONS** | `user`, `action.type`, `action.token` |
    
    ### Filter Logic
    
    - **AND across fields** — When multiple filter fields are specified (e.g., `coin` and `side`), all conditions must match (AND logic).
    - **OR within values** — When a field has multiple values (e.g., `coin: { values: ["BTC", "ETH"] }`), any value can match (OR logic).
    - **Special value `"*"`** — Matches any event where the field exists (non-null).
    - **Special value `"null"`** — Matches events where the field is explicitly null.
    - **Recursive matching** — Filters match recursively into nested JSON structures, so top-level field filters also apply to nested objects.
    
    ### Filter Limits
    
    | Limit | Maximum |
    |-------|---------|
    | Values per `user` / `address` filter | 100 |
    | Values per `coin` filter | 50 |
    | Values per `type` / `status` filter | 20 |
    | Total filter values across all fields | 500 |
    | Named filters per stream | 10 |
    
    ### Filtering Examples
    
    ```typescript
    const stream = client.StreamData(metadata);
    
    // Subscribe to BTC and ETH buy trades only
    stream.write({
      subscribe: {
        stream_type: "TRADES",
        filters: {
          coin: { values: ["BTC", "ETH"] },
          side: { values: ["B"] },
        },
      },
    });
    
    // Subscribe to order status changes for a specific user
    stream.write({
      subscribe: {
        stream_type: "ORDERS",
        filters: {
          user: { values: ["0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036"] },
          status: { values: ["filled", "canceled"] },
        },
      },
    });
    
    // Subscribe to all events where the user field exists
    stream.write({
      subscribe: {
        stream_type: "EVENTS",
        filters: {
          user: { values: ["*"] },
        },
      },
    });
    
    // Subscribe to liquidation trades only
    stream.write({
      subscribe: {
        stream_type: "TRADES",
        filters: {
          liquidation: { values: ["*"] },
        },
      },
    });
    ```
    
    ## HIP-4 Prediction Markets
    
    HIP-4 is the Hyperliquid standard for on-chain prediction markets. Key implementation notes as of mid-2026:
    
    - **Collateral currency**: USDC (not USDH — prior guides using USDH are outdated)
    - **Read API**: Prediction market metadata is exposed by Hyperliquid's Info API via `type: "outcomeMeta"`. On Quicknode, use your Hyperliquid endpoint Info path (`/info`) to query outcome market metadata.
    - **Exchange API**: Quicknode's Hyperliquid Exchange API builder endpoints use `api.hyperliquidapi.com` for zero-custody action construction and submission workflows.
    
    ```typescript
    // HIP-4 outcome market metadata via Hyperliquid Info API
    const response = await fetch("https://[endpoint].hype-mainnet.quiknode.pro/[token]/info", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ type: "outcomeMeta" }),
    });
    ```
    
    For trading data related to prediction markets (fills, orders, funding), use SQL Explorer or the HyperCore gRPC streams.
    
    ## Orderbook Dataset & StreamData Filtering
    
    Hyperliquid orderbook data is available in SQL Explorer as a dedicated dataset alongside trades, orders, and fills. For real-time orderbook updates, use the `BOOK_UPDATES` stream via gRPC.
    
    The `StreamData` gRPC method supports filtering on `BOOK_UPDATES` by `coin` and `side`:
    
    ```typescript
    // Filter book updates to BTC asks only
    stream.write({
      subscribe: {
        stream_type: "BOOK_UPDATES",
        filters: {
          coin: { values: ["BTC"] },
          side: { values: ["A"] }, // "A" = asks, "B" = bids
        },
      },
    });
    ```
    
    See the [gRPC Filtering](#grpc-filtering) section for the full filter field reference per stream type.
    
    ## HyperEVM
    
    HyperEVM provides EVM-compatible smart contract execution on Hyperliquid. Two RPC paths are available:
    
    | Path | Protocol | Archive | Debug/Trace | Use Case |
    |------|----------|---------|-------------|----------|
    | `/evm` | HTTP | Partial | No | Standard blockchain operations |
    | `/nanoreth` | HTTP + WebSocket | Extended | Yes (`debug_*`, `trace_*`) | Advanced debugging, tracing, subscriptions |
    
    ### Standard EVM Example (`/evm`)
    
    ```typescript
    import { JsonRpcProvider } from "ethers";
    
    const provider = new JsonRpcProvider(
      `${process.env.QUICKNODE_RPC_URL}evm`
    );
    
    const blockNumber = await provider.getBlockNumber();
    const balance = await provider.getBalance("0x...");
    ```
    
    ### Debug/Trace Example (`/nanoreth`)
    
    ```typescript
    import { JsonRpcProvider } from "ethers";
    
    const provider = new JsonRpcProvider(
      `${process.env.QUICKNODE_RPC_URL}nanoreth`
    );
    
    // Standard methods work on nanoreth too
    const blockNumber = await provider.getBlockNumber();
    
    // Debug and trace methods only available on /nanoreth
    const trace = await provider.send("debug_traceTransaction", [
      "0xTransactionHash...",
      { tracer: "callTracer" },
    ]);
    ```
    
    ### WebSocket Subscriptions (`/nanoreth`)
    
    ```typescript
    import { WebSocketProvider } from "ethers";
    
    const wsProvider = new WebSocketProvider(
      `${process.env.QUICKNODE_WSS_URL}nanoreth`
    );
    
    wsProvider.on("block", (blockNumber) => {
      console.log("New block:", blockNumber);
    });
    ```
    
    ### Hyperliquid-Specific EVM Methods
    
    | Method | Description |
    |--------|-------------|
    | `eth_getSystemTxsByBlockNumber` | Internal system transactions (HyperCore-to-HyperEVM) |
    | `eth_getSystemTxsByBlockHash` | System transactions by block hash |
    | `eth_usingBigBlocks` | Check if address uses big blocks |
    | `eth_bigBlockGasPrice` | Gas price for big blocks |
    
    ## Best Practices
    
    1. **Use gRPC for lowest latency** — Port 10000 gRPC streaming provides sub-millisecond data delivery, ideal for trading applications.
    2. **Enable zstd compression** — Reduces bandwidth by ~70%, critical for high-volume streams like ORDERS and BOOK_UPDATES.
    3. **Use `/nanoreth` for debugging** — Extended archive and trace/debug methods are only available on `/nanoreth`, not `/evm`.
    4. **Handle ~12 blocks/sec throughput** — Hyperliquid produces blocks rapidly. Ensure your consumer can process events at this rate.
    5. **Send gRPC keepalive pings** — Send pings every 30 seconds to maintain the connection.
    6. **Note public beta status** — HyperCore on Quicknode is in public beta. APIs and behavior may change.
    
    ## Troubleshooting
    
    | Issue | Cause | Solution |
    |-------|-------|----------|
    | gRPC connection refused on port 10000 | Wrong endpoint or port | Use `endpoint.hype-mainnet.quiknode.pro:10000` with TLS |
    | Auth failed on gRPC | Missing or wrong `x-token` metadata | Add `metadata.add('x-token', TOKEN)` to all gRPC calls |
    | No data from `/info` | Wrong path or missing `type` field | POST to `/info` with `{"type": "methodName"}` |
    | WebSocket disconnects | No ping/pong or server maintenance | Implement reconnection logic with backoff |
    | `/evm` missing debug methods | Debug methods not available on `/evm` | Switch to `/nanoreth` for `debug_*` and `trace_*` methods |
    | Testnet data missing | Testnet pruned to last 250 blocks | Use mainnet for historical data; testnet is for testing only |
    | High bandwidth usage | Unfiltered high-volume streams | Apply coin/user/side filters and enable zstd compression |
    
    ## Documentation
    
    - **Hyperliquid Overview**: https://www.quicknode.com/docs/hyperliquid
    - **Hyperliquid Overview (llms.txt)**: : https://www.quicknode.com/docs/hyperliquid/llms.txt
    - **Hyperliquid gRPC API**: https://www.quicknode.com/docs/hyperliquid/grpc-api
    - **HyperCore Filtering**: https://www.quicknode.com/docs/hyperliquid/filtering
    - **Hyperliquid llms.txt**: https://www.quicknode.com/docs/hyperliquid/llms.txt
    - **HyperCore Info Methods**: https://www.quicknode.com/docs/hyperliquid (Info endpoint section)
    - **HyperEVM**: https://www.quicknode.com/docs/hyperliquid (HyperEVM section)
    - **Guides**: https://www.quicknode.com/guides/tags/hyperliquid
    
  • skills/quicknode-skill/references/ipfs-reference.md9.1 KBbf44a134717bupstream ↗
    # Quicknode IPFS Reference
    
    Quicknode provides IPFS (InterPlanetary File System) storage for decentralized file hosting, ideal for NFT metadata, images, and other blockchain-related assets.
    
    ## Overview
    
    | Feature | Description |
    |---------|-------------|
    | **Storage** | Persistent IPFS pinning |
    | **Gateway** | Dedicated IPFS gateway for fast retrieval |
    | **API** | REST API for uploads and management |
    | **Formats** | Any file type (images, JSON, video, etc.) |
    
    ## Upload Files
    
    ### Single File Upload
    
    ```javascript
    const FormData = require('form-data');
    const fs = require('fs');
    
    async function uploadFile(filePath) {
      const form = new FormData();
      form.append('file', fs.createReadStream(filePath));
    
      const response = await fetch('https://api.quicknode.com/ipfs/rest/v1/s3/put-object', {
        method: 'POST',
        headers: {
          'x-api-key': process.env.QUICKNODE_API_KEY
        },
        body: form
      });
    
      const result = await response.json();
      console.log(`CID: ${result.pin.cid}`);
      console.log(`Gateway URL: https://YOUR_GATEWAY.quicknode-ipfs.com/ipfs/${result.pin.cid}`);
    
      return result;
    }
    
    await uploadFile('./image.png');
    ```
    
    ### Upload JSON Data
    
    ```javascript
    async function uploadJSON(data) {
      const response = await fetch('https://api.quicknode.com/ipfs/rest/v1/s3/put-object', {
        method: 'POST',
        headers: {
          'x-api-key': process.env.QUICKNODE_API_KEY,
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(data)
      });
    
      const result = await response.json();
      return result.pin.cid;
    }
    
    const metadata = {
      name: "My NFT",
      description: "An awesome NFT",
      image: "ipfs://QmImageCid..."
    };
    
    const cid = await uploadJSON(metadata);
    ```
    
    ### Upload from Buffer
    
    ```javascript
    async function uploadBuffer(buffer, filename) {
      const form = new FormData();
      form.append('file', buffer, { filename });
    
      const response = await fetch('https://api.quicknode.com/ipfs/rest/v1/s3/put-object', {
        method: 'POST',
        headers: {
          'x-api-key': process.env.QUICKNODE_API_KEY
        },
        body: form
      });
    
      return await response.json();
    }
    ```
    
    ## Directory Upload
    
    Upload entire directories while preserving structure.
    
    ```javascript
    const FormData = require('form-data');
    const fs = require('fs');
    const path = require('path');
    
    async function uploadDirectory(dirPath) {
      const form = new FormData();
      const files = fs.readdirSync(dirPath);
    
      for (const file of files) {
        const filePath = path.join(dirPath, file);
        form.append('file', fs.createReadStream(filePath), {
          filepath: file // Preserves filename in IPFS
        });
      }
    
      const response = await fetch('https://api.quicknode.com/ipfs/rest/v1/s3/put-object', {
        method: 'POST',
        headers: {
          'x-api-key': process.env.QUICKNODE_API_KEY
        },
        body: form
      });
    
      return await response.json();
    }
    
    // Upload NFT collection assets
    await uploadDirectory('./nft-images/');
    ```
    
    ## Pin by CID
    
    Pin existing IPFS content to Quicknode's infrastructure.
    
    ```javascript
    async function pinByCID(cid, name) {
      const response = await fetch('https://api.quicknode.com/ipfs/rest/v1/pinning/pinByHash', {
        method: 'POST',
        headers: {
          'x-api-key': process.env.QUICKNODE_API_KEY,
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          cid: cid,
          name: name || `Pinned: ${cid}`
        })
      });
    
      return await response.json();
    }
    
    // Pin existing content
    await pinByCID('QmExistingCID...', 'My Pinned Content');
    ```
    
    ## Retrieve Content
    
    ### Via Gateway
    
    ```javascript
    const GATEWAY_URL = 'https://YOUR_GATEWAY.quicknode-ipfs.com';
    
    // Fetch JSON metadata
    async function fetchMetadata(cid) {
      const response = await fetch(`${GATEWAY_URL}/ipfs/${cid}`);
      return await response.json();
    }
    
    // Fetch image as buffer
    async function fetchImage(cid) {
      const response = await fetch(`${GATEWAY_URL}/ipfs/${cid}`);
      return await response.buffer();
    }
    ```
    
    ### Gateway URL Formats
    
    ```
    # Direct CID access
    https://YOUR_GATEWAY.quicknode-ipfs.com/ipfs/{cid}
    
    # Path within directory
    https://YOUR_GATEWAY.quicknode-ipfs.com/ipfs/{directoryCid}/image.png
    
    # IPNS resolution
    https://YOUR_GATEWAY.quicknode-ipfs.com/ipns/{name}
    ```
    
    ## List Pinned Content
    
    ```javascript
    async function listPins(pageNumber = 1, perPage = 100) {
      const response = await fetch(
        `https://api.quicknode.com/ipfs/rest/v1/pinning/pins?pageNumber=${pageNumber}&perPage=${perPage}`,
        {
          headers: {
            'x-api-key': process.env.QUICKNODE_API_KEY
          }
        }
      );
    
      return await response.json();
    }
    
    const pins = await listPins();
    console.log(`Total pinned: ${pins.totalItems}`);
    pins.data.forEach(pin => {
      console.log(`${pin.cid} - ${pin.name}`);
    });
    ```
    
    ## Unpin Content
    
    ```javascript
    async function unpin(requestId) {
      const response = await fetch(
        `https://api.quicknode.com/ipfs/rest/v1/pinning/pins/${requestId}`,
        {
          method: 'DELETE',
          headers: {
            'x-api-key': process.env.QUICKNODE_API_KEY
          }
        }
      );
    
      return response.status === 200;
    }
    
    // Use the requestId from the pin response, not the CID
    await unpin('12345678-abcd-...');
    ```
    
    ## NFT Metadata Examples
    
    ### Standard NFT Metadata
    
    ```javascript
    const nftMetadata = {
      name: "Cool Cat #1234",
      description: "A very cool cat from the Cool Cats collection",
      image: "ipfs://QmImageCID...",
      external_url: "https://coolcats.com/cat/1234",
      attributes: [
        {
          trait_type: "Background",
          value: "Blue"
        },
        {
          trait_type: "Fur",
          value: "Orange"
        },
        {
          trait_type: "Eyes",
          value: "Laser"
        },
        {
          trait_type: "Rarity Score",
          value: 85,
          display_type: "number"
        }
      ]
    };
    
    const metadataCID = await uploadJSON(nftMetadata);
    console.log(`Token URI: ipfs://${metadataCID}`);
    ```
    
    ### Collection-Level Metadata
    
    ```javascript
    const collectionMetadata = {
      name: "Cool Cats",
      description: "10,000 randomly generated Cool Cats",
      image: "ipfs://QmCollectionImageCID...",
      external_link: "https://coolcats.com",
      seller_fee_basis_points: 500, // 5%
      fee_recipient: "0xYourAddress..."
    };
    
    await uploadJSON(collectionMetadata);
    ```
    
    ### Batch Upload NFT Collection
    
    ```javascript
    async function uploadNFTCollection(basePath, count) {
      const results = [];
    
      for (let i = 1; i <= count; i++) {
        // Upload image
        const imagePath = `${basePath}/images/${i}.png`;
        const imageResult = await uploadFile(imagePath);
        const imageCID = imageResult.pin.cid;
    
        // Create and upload metadata
        const metadata = {
          name: `My NFT #${i}`,
          description: `NFT number ${i} from my collection`,
          image: `ipfs://${imageCID}`,
          attributes: [
            { trait_type: "Number", value: i }
          ]
        };
    
        const metadataCID = await uploadJSON(metadata);
    
        results.push({
          tokenId: i,
          imageCID,
          metadataCID,
          tokenURI: `ipfs://${metadataCID}`
        });
    
        console.log(`Uploaded NFT #${i}`);
      }
    
      return results;
    }
    ```
    
    ## Dedicated Gateway Configuration
    
    ### Custom Domain
    
    1. Navigate to Quicknode Dashboard → IPFS → Gateways
    2. Create dedicated gateway
    3. Configure custom domain (optional)
    4. Set up DNS CNAME record
    
    ### Gateway Features
    
    | Feature | Description |
    |---------|-------------|
    | **Caching** | Edge caching for fast delivery |
    | **Rate Limits** | Configurable per gateway |
    | **Analytics** | Request metrics and bandwidth |
    | **Access Control** | IP allowlisting, authentication |
    
    ## Storage Plans
    
    > **Note:** Storage plans and limits may change. Verify current pricing and limits at https://www.quicknode.com/pricing or in the QuickNode dashboard.
    
    | Plan | Storage | Bandwidth | Pins |
    |------|---------|-----------|------|
    | Free | 1 GB | 5 GB/mo | 500 |
    | Starter | 10 GB | 50 GB/mo | 5,000 |
    | Growth | 100 GB | 500 GB/mo | 50,000 |
    | Business | Custom | Custom | Custom |
    
    ## Best Practices
    
    1. **Use CIDs in contracts** - Store `ipfs://CID` format in smart contracts
    2. **Upload images first** - Get image CID before creating metadata
    3. **Verify uploads** - Always verify content is accessible via gateway
    4. **Batch operations** - Upload multiple files concurrently when possible
    5. **Pin important content** - Ensure critical content is pinned to multiple services
    6. **Use directory uploads** - For collections, upload as directory for cleaner structure
    
    ## Error Handling
    
    ```javascript
    async function safeUpload(filePath) {
      try {
        const result = await uploadFile(filePath);
    
        // Verify upload
        const verifyResponse = await fetch(
          `https://YOUR_GATEWAY.quicknode-ipfs.com/ipfs/${result.pin.cid}`,
          { method: 'HEAD' }
        );
    
        if (!verifyResponse.ok) {
          throw new Error('Upload verification failed');
        }
    
        return result;
      } catch (error) {
        console.error('Upload failed:', error.message);
        throw error;
      }
    }
    ```
    
    ## Common Issues
    
    | Issue | Cause | Solution |
    |-------|-------|----------|
    | Slow uploads | Large files | Compress before upload |
    | 404 on gateway | Not yet propagated | Wait or use direct pin |
    | Rate limited | Too many requests | Implement backoff |
    | Content not found | Unpinned | Re-pin content |
    
    ## Documentation
    
    - **IPFS Overview**: https://www.quicknode.com/docs/ipfs
    - **IPFS Overview (llms.txt)**: https://www.quicknode.com/docs/ipfs/llms.txt
    - **Guides**: https://www.quicknode.com/guides/tags/ipfs
    
  • skills/quicknode-skill/references/kv-reference.md4.2 KB52fde596370aupstream ↗
    # Key-Value Store Reference (Beta)
    
    Quicknode KV Store is a serverless storage service for lists and key-value sets. It is primarily used from inside Streams filter functions via the `qnLib` helper library but is also accessible via REST API and the `qn kv` CLI commands.
    
    **Docs:** https://www.quicknode.com/docs/key-value-store
    
    ## Access Methods
    
    | Method | When to Use |
    |--------|-------------|
    | `qnLib` (inside Streams) | Read/write KV from a Streams filter function |
    | REST API | Read/write KV from any external application |
    | CLI (`qn kv`) | Inspect and manage KV from the terminal |
    
    ## qnLib — Stream Integration
    
    `qnLib` is available inside Streams filter functions without any import. All calls are asynchronous and should be awaited from an `async function main(...)` filter.
    
    ### List Operations
    
    Manage ordered lists of string items (e.g., a watchlist of wallet addresses).
    
    ```javascript
    // Create or overwrite a list
    await qnLib.qnUpsertList('my-watchlist', {
      add_items: ['0xAddr1', '0xAddr2'],
    });
    
    // Add a single item
    await qnLib.qnAddListItem('my-watchlist', '0xAddr3');
    
    // Remove a single item
    await qnLib.qnRemoveListItem('my-watchlist', '0xAddr1');
    
    // Check membership (returns array of booleans, one per address)
    const results = await qnLib.qnContainsListItems('my-watchlist', ['0xAddr2', '0xAddr3']);
    // results → [true, true]
    
    // Delete the entire list
    await qnLib.qnDeleteList('my-watchlist');
    ```
    
    ### Set Operations
    
    Manage key-value pairs (string keys, string values).
    
    ```javascript
    // Create a key-value set entry
    await qnLib.qnAddSet('threshold', '500000');
    
    // Read a value by key
    const threshold = await qnLib.qnGetSet('threshold');
    // threshold → "500000"
    
    // Bulk create or update multiple pairs
    await qnLib.qnBulkSets({
      add_sets: {
        threshold: '500000',
        alertEmail: '[email protected]',
      },
      delete_sets: [],
    });
    
    // List all set keys
    const setKeys = await qnLib.qnListAllSets();
    
    // Delete a single set entry
    await qnLib.qnDeleteSet('threshold');
    ```
    
    ## REST API
    
    All REST requests use `https://api.quicknode.com/kv/rest/v1/` and authenticate via the `x-api-key` header.
    
    ### Read a value
    
    ```typescript
    const response = await fetch(
      'https://api.quicknode.com/kv/rest/v1/sets/threshold',
      { headers: { 'x-api-key': process.env.QUICKNODE_API_KEY! } }
    );
    const { value } = await response.json();
    ```
    
    ### Write a value
    
    ```typescript
    const response = await fetch('https://api.quicknode.com/kv/rest/v1/sets', {
      method: 'POST',
      headers: {
        'x-api-key': process.env.QUICKNODE_API_KEY!,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        key: 'threshold',
        value: '750000',
      }),
    });
    ```
    
    ### List all set keys
    
    ```typescript
    const response = await fetch(
      'https://api.quicknode.com/kv/rest/v1/sets',
      { headers: { 'x-api-key': process.env.QUICKNODE_API_KEY! } }
    );
    const { keys } = await response.json();
    ```
    
    ### List operations
    
    ```typescript
    // Create a list
    await fetch('https://api.quicknode.com/kv/rest/v1/lists', {
      method: 'POST',
      headers: {
        'x-api-key': process.env.QUICKNODE_API_KEY!,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        key: 'allowlist',
        items: ['0xabc', '0xdef'],
      }),
    });
    
    // Check one item from outside a Stream filter
    const response = await fetch(
      'https://api.quicknode.com/kv/rest/v1/lists/allowlist/contains/0xabc',
      { headers: { 'x-api-key': process.env.QUICKNODE_API_KEY! } }
    );
    const { contains } = await response.json();
    ```
    
    ## CLI — `qn kv`
    
    ```bash
    # Get a value
    qn kv set get threshold
    
    # Set a value
    qn kv set put threshold 750000
    
    # List all set keys
    qn kv set ls
    
    # Delete a key
    qn kv set delete threshold
    
    # Manage lists
    qn kv list create allowlist 0xabc 0xdef
    qn kv list append allowlist 0x123
    qn kv list contains allowlist 0xabc
    qn kv list get allowlist
    qn kv list delete allowlist
    ```
    
    ## Limits
    
    | Limit | Value |
    |-------|-------|
    | Max value size | 64 KB |
    | Max list size | 10,000 items |
    | Max key length | 256 bytes |
    
    Limits are subject to change — check https://www.quicknode.com/docs/key-value-store for current values.
    
    ## Documentation
    
    - **Key-Value Store Docs**: https://www.quicknode.com/docs/key-value-store
    - **Quicknode CLI**: https://www.quicknode.com/docs/cli
    - **Streams Integration**: https://www.quicknode.com/docs/streams
    
  • skills/quicknode-skill/references/mcp-reference.md6.3 KBe2d28d2b3200upstream ↗
    # Quicknode MCP Reference
    
    The Quicknode MCP server exposes Quicknode Admin API capabilities to AI assistants and coding tools via the Model Context Protocol (MCP). Quicknode is available as a native connector in Claude, ChatGPT, and Codex, and it can also be configured in generic MCP clients that support Streamable HTTP.
    
    
    **Docs:** https://www.quicknode.com/docs/build-with-ai/quicknode-mcp
    
    ## Overview
    
    | Property | Value |
    |----------|-------|
    | **Protocol** | Model Context Protocol (MCP) |
    | **Transport** | HTTP (Streamable HTTP) |
    | **Auth** | OAuth 2.1 for interactive setup; bearer API key for CI/non-interactive setup |
    | **Directory** | Native Claude connector; native OpenAI app/plugin surface for ChatGPT and Codex |
    | **Capabilities** | Endpoint management, usage monitoring, rate limits, security rules, billing |
    
    ## Client Setup
    
    ### Claude (Web, Desktop, and Claude Code)
    
    Quicknode is listed in Claude's built-in Anthropic connector directory.
    
    **Claude Web / Desktop:**
    1. Open Claude settings → **Customize** → **Connectors**
    2. Find **Quicknode** in the directory listing
    3. Click **Connect**
    4. Log in to Quicknode in the browser window, select **Admin** or **Viewer**, and approve access
    
    **Claude Code (CLI):**
    
    ```bash
    claude mcp add --transport http quicknode https://mcp.quicknode.com/mcp
    ```
    
    By default, Claude Code installs in local scope for the current project. Use `--scope project` to share via project MCP config, or `--scope user` to make it available across your projects:
    
    ```bash
    claude mcp add --transport http --scope user quicknode https://mcp.quicknode.com/mcp
    ```
    
    ### OpenAI (ChatGPT / Codex)
    
    Install Quicknode directly from the ChatGPT Apps catalog or via `/plugin` in Codex when available. The interactive flow opens a Quicknode OAuth browser window where the user selects **Admin** or **Viewer** before approving access.
    
    ### Cursor / VS Code / Windsurf / Zed / Generic MCP Clients
    
    For any MCP-compatible client that supports HTTP transport, configure:
    
    ```text
    https://mcp.quicknode.com/mcp
    ```
    
    If a client does not support native OAuth or HTTP transport, use `mcp-remote` as a bridge:
    
    ```json
    {
      "mcpServers": {
        "quicknode": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://mcp.quicknode.com/mcp"]
        }
      }
    }
    ```
    
    ## Authentication and Roles
    
    Interactive setup uses OAuth 2.1. The user logs in to Quicknode, chooses the account to connect, then selects an API key role:
    
    | Role | Access |
    |------|--------|
    | **Viewer** | Read-only access to endpoints, metrics, logs, usage, billing, and chains |
    | **Admin** | Viewer access plus create/delete endpoints, security changes, and rate-limit updates |
    
    Use **Viewer** for inspection-only workflows. Use **Admin** only when the assistant needs to make Quicknode account changes.
    
    ## Non-Interactive / CI Setup
    
    For CI, remote machines, or clients where browser OAuth is unavailable, pass a Quicknode API key as a bearer token. The key's Quicknode role controls MCP permissions.
    
    ### Claude Code
    
    ```bash
    claude mcp add quicknode --transport http https://mcp.quicknode.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
    ```
    
    ### Codex
    
    ```bash
    codex mcp add quicknode \
      --url https://mcp.quicknode.com/mcp \
      --bearer-token-env-var QUICKNODE_API_KEY
    ```
    
    ### Generic HTTP MCP Config
    
    ```json
    {
      "mcpServers": {
        "quicknode": {
          "url": "https://mcp.quicknode.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
    ```
    
    ## Tool Surface
    
    The Quicknode MCP server exposes tools covering the Admin API surface:
    
    ### Endpoint Management
    
    | Tool | Description |
    |------|-------------|
    | `list-endpoints` | List all RPC endpoints in your account |
    | `get-endpoint` | Retrieve details for a specific endpoint |
    | `create-endpoint` | Create a new RPC endpoint |
    | `delete-endpoint` | Delete an endpoint |
    | `update-endpoint-rate-limits` | Configure global request rate limits for an endpoint |
    
    ### Per-Method Rate Limits
    
    | Tool | Description |
    |------|-------------|
    | `list-endpoint-method-rate-limits` | List per-method rate limits for an endpoint |
    | `create-endpoint-method-rate-limit` | Set a rate limit for a specific RPC method |
    | `update-endpoint-method-rate-limit` | Update an existing method-level rate limit |
    | `delete-endpoint-method-rate-limit` | Remove a method rate limit |
    
    ### Security
    
    | Tool | Description |
    |------|-------------|
    | `list-endpoint-security` | List all security rules for an endpoint |
    | `create-security-rule` | Add a security rule (allowlist, JWT auth, etc.) |
    | `update-endpoint-security-options` | Update endpoint-level security settings |
    | `delete-security-rule` | Remove a security rule |
    
    ### Usage & Monitoring
    
    | Tool | Description |
    |------|-------------|
    | `get-endpoint-metrics` | Retrieve performance metrics for an endpoint |
    | `list-endpoint-logs` | List request logs for an endpoint |
    | `get-endpoint-log-details` | Get details for a specific log entry |
    | `get-rpc-usage` | View RPC usage statistics across your account |
    
    ### Account & Billing
    
    | Tool | Description |
    |------|-------------|
    | `list-chains` | List all supported blockchain networks |
    | `get-billing` | Retrieve billing information |
    
    ## MCP Resources
    
    Quicknode MCP also exposes endpoint details as MCP resources in clients that support resource browsing. Reference `@quicknode` in the client UI to attach endpoint context such as `quicknode://endpoints/<endpoint-id>` without first calling a tool.
    
    ## Example Prompts
    
    - "List all my Quicknode endpoints"
    - "Create a new Ethereum mainnet endpoint"
    - "What's my RPC usage for this month?"
    - "Add an IP allowlist rule to my endpoint"
    - "Show me the per-method rate limits on my endpoint"
    - "Connect my Quicknode workspace to Claude via MCP"
    
    ## When to Use MCP vs. CLI vs. SDK vs. Admin API
    
    | Interface | Best For |
    |-----------|----------|
    | **MCP** | Conversational management inside Claude, Cursor, or other AI tools |
    | **CLI (`qn`)** | Shell scripts, CI/CD pipelines, direct terminal workflows |
    | **SDK** | Application or agent code that coordinates Quicknode product APIs |
    | **Admin API** | Programmatic infrastructure-as-code from application code |
    
    ## Documentation
    
    - **MCP Docs**: https://www.quicknode.com/docs/build-with-ai/quicknode-mcp
    - **Build with AI Overview**: https://www.quicknode.com/docs/build-with-ai
    - **SDK Docs**: https://www.quicknode.com/docs/sdk
    
  • skills/quicknode-skill/references/metaplex-das-reference.md13 KBa81cf92134b2upstream ↗
    # Metaplex DAS API Reference
    
    > Formerly documented in this skill as `solana-das-api-reference.md` — links to that file still resolve; this file is the canonical reference going forward.
    
    The Metaplex Digital Asset Standard (DAS) API is a comprehensive service for querying Solana digital assets efficiently. Available as the **Metaplex DAS API** product on a Quicknode Solana endpoint.
    
    **Marketing:** https://www.quicknode.com/metaplex-das-api
    **Docs:** https://www.quicknode.com/docs/solana/solana-das-api
    
    ## Prerequisites
    
    Enable **Metaplex DAS API** on your Quicknode Solana endpoint from the Quicknode dashboard. Product page: https://www.quicknode.com/metaplex-das-api
    
    ## Supported Asset Types
    
    - **Standard NFTs** — traditional Solana NFTs
    - **Compressed NFTs (cNFTs)** — Merkle tree-based, cost-efficient NFTs
    - **Fungible Tokens** — SPL tokens
    - **MPL Core Assets** — single-account design NFTs
    - **Token 2022 Assets** — tokens using the Token Extensions program
    
    ## Methods Overview
    
    | Method | Description |
    |--------|-------------|
    | `getAsset` | Get metadata for a single asset |
    | `getAssets` | Get metadata for multiple assets in one call |
    | `getAssetProof` | Get Merkle proof for a compressed asset |
    | `getAssetProofs` | Get Merkle proofs for multiple compressed assets |
    | `getAssetsByAuthority` | List assets controlled by an authority |
    | `getAssetsByCreator` | List assets by creator address |
    | `getAssetsByGroup` | List assets by group (e.g., collection) |
    | `getAssetsByOwner` | List assets owned by a wallet |
    | `getAssetSignatures` | Get transaction signatures for compressed assets |
    | `getTokenAccounts` | List token accounts by mint or owner |
    | `getNftEditions` | Get edition details of a master NFT |
    | `searchAssets` | Search assets with flexible filters |
    
    ## getAsset
    
    Retrieve metadata for a single asset by its mint address.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAsset',
        params: {
          id: '9ARngHhVaCtH5JFieRdSS5Y8cdZk2TMF4tfGSWFB9iSK',
          options: {
            showFungible: true,
            showCollectionMetadata: true
          }
        }
      })
    });
    const { result } = await response.json();
    // result.content — metadata (name, description, image, attributes)
    // result.ownership — owner, delegate, frozen status
    // result.compression — tree, leaf, proof info (if compressed)
    // result.royalty — royalty model, basis points, creators
    // result.creators — array of creator addresses with verified status
    // result.supply — edition/print supply info
    ```
    
    **Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `id` | string | Yes | The asset mint address |
    | `options.showFungible` | boolean | No | Include fungible token info |
    | `options.showCollectionMetadata` | boolean | No | Include collection metadata |
    | `options.showUnverifiedCollections` | boolean | No | Include unverified collections |
    
    ## getAssets
    
    Fetch metadata for multiple assets in a single request.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssets',
        params: {
          ids: [
            '9ARngHhVaCtH5JFieRdSS5Y8cdZk2TMF4tfGSWFB9iSK',
            'BwJHge5FmE5RBkmWPoKzCWwxZFXsnqCMKHiiibXPJias'
          ]
        }
      })
    });
    const { result } = await response.json();
    // result.items — array of asset metadata objects
    ```
    
    ## getAssetProof
    
    Get the Merkle proof for a compressed asset. Required for transferring or modifying compressed NFTs on-chain.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetProof',
        params: {
          id: 'D85MZkvir9yQZFDHt8U2ZmS7D3LXKdiSjvw2MBdscJJa'
        }
      })
    });
    const { result } = await response.json();
    // result.root — Merkle tree root hash
    // result.proof — array of proof nodes
    // result.node_index — index in the tree
    // result.leaf — leaf hash
    // result.tree_id — Merkle tree address
    ```
    
    ## getAssetProofs
    
    Retrieve Merkle proofs for multiple compressed assets in one call.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetProofs',
        params: {
          ids: [
            'D85MZkvir9yQZFDHt8U2ZmS7D3LXKdiSjvw2MBdscJJa',
            'AnotherCompressedAssetMint...'
          ]
        }
      })
    });
    const { result } = await response.json();
    // result — object keyed by asset ID, each containing root, proof, node_index, leaf, tree_id
    ```
    
    ## getAssetsByOwner
    
    List all digital assets owned by a wallet address.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetsByOwner',
        params: {
          ownerAddress: 'E645TckHQnDcavVv92Etc6xSWQaq8zzPtPRGBheviRAk',
          limit: 10,
          sortBy: { sortBy: 'recent_action', sortDirection: 'desc' },
          options: {
            showFungible: true,
            showCollectionMetadata: true
          }
        }
      })
    });
    const { result } = await response.json();
    // result.total — total assets owned
    // result.items — array of asset metadata objects
    // result.cursor — use in next request for pagination
    ```
    
    **Parameters:**
    
    | Parameter | Type | Required | Description |
    |-----------|------|----------|-------------|
    | `ownerAddress` | string | Yes | Wallet address |
    | `limit` | integer | No | Max results per page |
    | `page` | integer | No | Page number (page-based pagination) |
    | `cursor` | string | No | Cursor from previous response (cursor-based pagination) |
    | `before` / `after` | string | No | Range-based pagination |
    | `sortBy` | object | No | `{ sortBy: "created" \| "recent_action" \| "id" \| "none", sortDirection: "asc" \| "desc" }` |
    | `options.showFungible` | boolean | No | Include fungible tokens |
    | `options.showCollectionMetadata` | boolean | No | Include collection metadata |
    
    ## getAssetsByCreator
    
    List assets created by a specific address.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetsByCreator',
        params: {
          creatorAddress: '3pMvTLUA9NzZQd4gi725p89mvND1wRNQM3C8XEv1hTdA',
          limit: 10
        }
      })
    });
    const { result } = await response.json();
    // result.total, result.items, result.cursor
    ```
    
    ## getAssetsByGroup
    
    List assets by group identifier (e.g., collection address).
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetsByGroup',
        params: {
          groupKey: 'collection',
          groupValue: 'CollectionMintAddress...',
          limit: 10
        }
      })
    });
    const { result } = await response.json();
    // result.total, result.items, result.cursor
    ```
    
    ## getAssetsByAuthority
    
    List assets controlled by a specific authority.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetsByAuthority',
        params: {
          authorityAddress: 'AuthorityPubkey...',
          limit: 10
        }
      })
    });
    const { result } = await response.json();
    // result.total, result.items, result.cursor
    ```
    
    ## getAssetSignatures
    
    Get transaction signatures associated with a compressed asset.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetSignatures',
        params: {
          id: 'CompressedAssetMint...',
          limit: 10
        }
      })
    });
    const { result } = await response.json();
    // result.items — array of transaction signature objects
    ```
    
    ## getTokenAccounts
    
    List token accounts and balances by mint address or owner address. Useful for finding all holders of a token or all tokens held by a wallet.
    
    ```javascript
    // By mint address — find holders of a token
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getTokenAccounts',
        params: {
          mintAddress: 'So11111111111111111111111111111111111111112',
          limit: 10
        }
      })
    });
    const { result } = await response.json();
    // result.total — total token accounts
    // result.token_accounts — array of accounts with:
    //   address, mint, owner, amount, delegated_amount, frozen
    ```
    
    ```javascript
    // By owner address — find all tokens held by a wallet
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getTokenAccounts',
        params: {
          ownerAddress: 'WalletPubkey...',
          limit: 10
        }
      })
    });
    ```
    
    ## getNftEditions
    
    Retrieve edition details for a master NFT, including all printed editions.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getNftEditions',
        params: {
          mintAddress: 'MasterEditionMint...',
          limit: 10
        }
      })
    });
    const { result } = await response.json();
    // result.items — array of edition details
    ```
    
    ## searchAssets
    
    Search for assets using flexible filter criteria. The most powerful query method in the DAS API.
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'searchAssets',
        params: {
          ownerAddress: 'WalletPubkey...',
          compressed: true,
          limit: 10,
          sortBy: { sortBy: 'recent_action', sortDirection: 'desc' }
        }
      })
    });
    const { result } = await response.json();
    // result.total, result.items, result.cursor
    ```
    
    **Key Search Parameters:**
    
    | Parameter | Type | Description |
    |-----------|------|-------------|
    | `ownerAddress` | string | Filter by asset owner |
    | `creatorAddress` | string | Filter by creator |
    | `grouping` | array | Filter by group (e.g., `[["collection", "address"]]`) |
    | `compressed` | boolean | Filter by compression status |
    | `frozen` | boolean | Filter by frozen status |
    | `burnt` | boolean | Filter by burn status |
    | `interface` | string | Filter by asset interface type |
    
    ## Pagination
    
    Three modes available:
    
    ```javascript
    // Page-based
    { page: 1, limit: 100 }
    
    // Cursor-based (recommended for large datasets)
    { cursor: 'previousResponse.result.cursor', limit: 100 }
    
    // Range-based
    { before: 'assetId', after: 'assetId', limit: 100 }
    ```
    
    ## Common Use Cases
    
    ### Get all compressed NFTs owned by a wallet
    
    ```javascript
    const response = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'searchAssets',
        params: {
          ownerAddress: 'WalletPubkey...',
          compressed: true,
          limit: 100
        }
      })
    });
    ```
    
    ### Transfer a compressed NFT (get proof first)
    
    ```javascript
    // 1. Get the asset proof
    const { result: proof } = await fetch(process.env.QUICKNODE_RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0', id: 1, method: 'getAssetProof',
        params: { id: 'CompressedNftMint...' }
      })
    }).then(r => r.json());
    
    // 2. Use proof.root, proof.proof, proof.node_index with
    //    @metaplex-foundation/mpl-bubblegum to construct the transfer instruction
    ```
    
    ## Documentation
    
    - **DAS API Overview**: https://www.quicknode.com/docs/solana/solana-das-api
    - **getAsset**: https://www.quicknode.com/docs/solana/getAsset
    - **getAssets**: https://www.quicknode.com/docs/solana/getAssets
    - **getAssetProof**: https://www.quicknode.com/docs/solana/getAssetProof
    - **getAssetProofs**: https://www.quicknode.com/docs/solana/getAssetProofs
    - **getAssetsByAuthority**: https://www.quicknode.com/docs/solana/getAssetsByAuthority
    - **getAssetsByCreator**: https://www.quicknode.com/docs/solana/getAssetsByCreator
    - **getAssetsByGroup**: https://www.quicknode.com/docs/solana/getAssetsByGroup
    - **getAssetsByOwner**: https://www.quicknode.com/docs/solana/getAssetsByOwner
    - **getAssetSignatures**: https://www.quicknode.com/docs/solana/getAssetSignatures
    - **getTokenAccounts**: https://www.quicknode.com/docs/solana/getTokenAccounts
    - **getNftEditions**: https://www.quicknode.com/docs/solana/getNftEditions
    - **searchAssets**: https://www.quicknode.com/docs/solana/searchAssets
    - **Marketing**: https://www.quicknode.com/metaplex-das-api
    
  • skills/quicknode-skill/references/mpp-reference.md12 KB252147bd5a5eupstream ↗
    # MPP Reference
    
    MPP (Machine Payments Protocol) enables pay-per-request RPC access via stablecoin micropayments using IETF Payment Authentication headers. No API key required.
    
    ## Overview
    
    | Property | Value |
    |----------|-------|
    | **Protocol** | IETF Payment Authentication (WWW-Authenticate / Authorization / Payment-Receipt) |
    | **Payment Methods** | Varies by network. See [Payment Networks](#payment-networks) |
    | **Authentication** | None required (payment headers handle auth) |
    | **Chains** | 140+ (same as Quicknode RPC network) |
    | **Base URL** | `https://mpp.quicknode.com` |
    | **Use Cases** | AI agents, pay-as-you-go, simple integrations, high-volume sessions |
    
    ## How It Works
    
    1. **Send request** — POST to `/:network/*` (charge) or `/session/:network/*` (session)
    2. **Receive challenge** — Server returns 402 with `WWW-Authenticate: Payment` header
    3. **Sign payment** — Client signs token transfer and retries with `Authorization: Payment` header
    4. **Receive response** — Server returns result with `Payment-Receipt` header
    
    ## Intent Types
    
    | Intent | Cost | Endpoint | Best For |
    |--------|------|----------|----------|
    | **Charge** | $0.001/request (1,000 atomic units) | `POST /:network/*` | Simple integrations, low volume |
    | **Session** | $0.00001/request ($10/1M requests) | `POST /session/:network/*` | High volume, agents, metered usage |
    
    ### Charge
    
    One on-chain transaction per request. No session state, no escrow. The `mppx` SDK handles the 402 challenge and payment signing automatically.
    
    ### Session
    
    Payment channels for high-frequency access:
    1. Client deposits funds into escrow contract (~500ms initial setup)
    2. Each request sends a cumulative EIP-712 signed voucher (off-chain)
    3. Server verifies with `ecrecover` — no RPC or DB lookup
    4. Settlement is batched when the server closes the channel
    5. Unused deposit is refunded on channel close
    
    ## Key Endpoints
    
    | Endpoint | Method | Description |
    |----------|--------|-------------|
    | `/:network/*` | POST | Charge-based JSON-RPC and REST proxy |
    | `/session/:network/*` | POST | Session-based JSON-RPC and REST proxy |
    | `/sql/rest/v1/clusters` | GET | List Quicknode SQL Explorer clusters (public, 1-hour CDN cached) |
    | `/sql/rest/v1/schema` | GET | List SQL Explorer schemas across clusters (public, 1-hour CDN cached) |
    | `/sql/rest/v1/schema/:clusterId` | GET | Inspect one SQL Explorer cluster schema (public, 1-hour CDN cached) |
    | `/session/sql/rest/*` | ALL | SQL Explorer REST pass-through via MPP session; variable per-query billing |
    | `/session/v1/text2sql` | POST | Natural-language to SQL generator via MPP session; variable per-token billing |
    | `/networks` | GET | List all supported network slugs (public, rate limited) |
    | `/llms.txt` | GET | Machine-readable documentation |
    
    Replace `:network` with slugs like `tempo-mainnet`, `ethereum-mainnet`, `solana-mainnet`, etc.
    
    ## Payment Networks
    
    | Network | Chain ID | Token | Charge | Session |
    |---------|----------|-------|:---:|:---:|
    | Tempo Testnet | 42431 | PathUSD | Yes | Yes |
    | Tempo Mainnet | 4217 | PathUSD, USDC.e | Yes | Yes |
    | Solana Mainnet | — | USDC | Yes | No |
    
    The payment network is independent of the chain you query. For example, you can pay with PathUSD on Tempo and query Ethereum, Solana, or any other supported chain.
    
    ## Testnet Monthly Cap
    
    Each wallet gets a **single pool of 1,000,000 API credits per month** across Quicknode's agentic payment surfaces, including x402 and MPP. The pool resets on the 1st of each month and covers both RPC and SQL Explorer calls. RPC requests consume 1 API credit each; SQL Explorer consumes the variable number of credits the query uses. Mainnet wallets are uncapped.
    
    | Testnet Pool | Value |
    |-----------------|-------|
    | Credits per wallet | 1,000,000/month |
    | Reset | 1st of each month |
    | Scope | RPC + SQL Explorer + text2sql |
    | Shared across | Charge, Session |
    
    When the testnet cap is exhausted, the server returns HTTP 403 with `{ "error": "monthly_limit_reached" }` and no payment is taken. Switch to a mainnet-funded wallet or wait for the reset.
    
    ## Rate Limits
    
    | Route | Limit |
    |-------|-------|
    | `/networks` | 10 requests per 10 seconds per IP |
    | `/:network` | 1,000 requests per 10 seconds per IP:network pair |
    | `/session/:network` | 1,000 requests per 10 seconds per IP:session:network pair |
    
    Back off and retry on HTTP 429 `rate_limit_exceeded`.
    
    ## SQL Explorer
    
    MPP exposes Quicknode SQL Explorer through session-gated REST pass-through routes at `https://mpp.quicknode.com/session/sql/rest/*`. Paths mirror the upstream `https://api.quicknode.com/sql/rest/*` routes; for example, `POST /session/sql/rest/v1/query` executes a SQL Explorer query through an open MPP session.
    
    Free discovery endpoints require no payment credential and are cached for 1 hour:
    
    - `GET /sql/rest/v1/clusters`
    - `GET /sql/rest/v1/schema`
    - `GET /sql/rest/v1/schema/:clusterId`
    
    Paid SQL endpoints require an MPP session voucher. Billing is variable: the upstream response's `credits` field is charged against the open session channel at $0.00001 per SQL credit. The client tops up vouchers automatically when a query exceeds the currently signed amount.
    
    ## text2sql
    
    `POST /session/v1/text2sql` is a Tempo-session-gated natural-language to SQL generator. It shares the same SQL session voucher store as `/session/sql/rest/*`, so one open session can fund both SQL queries and text2sql calls.
    
    Supported modes:
    
    | Mode | Required fields | Description |
    |------|-----------------|-------------|
    | Generate | `prompt` | Generate fresh SQL from natural language |
    | Edit | `prompt`, `sql` | Modify supplied SQL according to the prompt |
    | Fix | `sql`, `validation_errors` | Repair SQL using validation errors |
    
    Limits: `prompt` <= 4000 characters, `sql` <= 10000 characters, and up to 10 validation errors at 2000 characters each. `cluster_id` defaults to the server-configured SQL cluster when omitted. Billing is variable: `(input + output) * $0.00001`, charged against the session after the response.
    
    ## Setup
    
    ### TypeScript (Tempo — Charge)
    
    ```bash
    npm install mppx viem
    ```
    
    ```typescript
    import { Mppx, tempo } from 'mppx/client'
    import { privateKeyToAccount } from 'viem/accounts'
    
    const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)
    
    // Polyfills globalThis.fetch — handles 402 challenges automatically
    Mppx.create({
      methods: [tempo({ account })],
    })
    
    // Charge intent ($0.001/req) — payment is transparent
    const response = await fetch('https://mpp.quicknode.com/tempo-mainnet', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'eth_blockNumber',
        params: [],
      }),
    })
    
    const { result } = await response.json()
    console.log('Block number:', BigInt(result))
    ```
    
    ### TypeScript (Tempo — Session)
    
    ```typescript
    import { Mppx, tempo } from 'mppx/client'
    import { privateKeyToAccount } from 'viem/accounts'
    
    const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)
    
    // Session-only — payment channels for 100x cheaper requests
    Mppx.create({
      methods: [tempo.session({ account })],
    })
    
    // First request opens channel on-chain (~500ms),
    // subsequent requests use off-chain vouchers (microseconds)
    const response = await fetch('https://mpp.quicknode.com/session/tempo-mainnet', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'eth_blockNumber',
        params: [],
      }),
    })
    
    console.log(await response.json())
    ```
    
    ### Solana
    
    ```bash
    npm install @solana/mpp mppx @solana/kit
    ```
    
    ```typescript
    import { Mppx } from 'mppx/client'
    import { solana } from '@solana/mpp/client'
    import { createKeyPairSignerFromBytes } from '@solana/kit'
    import { readFileSync } from 'fs'
    import { homedir } from 'os'
    
    const keypairFile = readFileSync(
      process.env.SOLANA_KEYPAIR_PATH ?? `${homedir()}/.config/solana/id.json`,
      'utf-8'
    )
    const signer = await createKeyPairSignerFromBytes(
      new Uint8Array(JSON.parse(keypairFile))
    )
    
    Mppx.create({ methods: [solana.charge({ signer })] })
    
    const response = await fetch('https://mpp.quicknode.com/solana-mainnet', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getSlot',
        params: [],
      }),
    })
    
    const { result } = await response.json()
    console.log('Slot:', result)
    ```
    
    ### Manual Payment Handling (No Polyfill)
    
    ```typescript
    const mppx = Mppx.create({
      polyfill: false,
      methods: [tempo()],
    })
    
    // Step 1: Initial request gets 402
    const response = await fetch('https://mpp.quicknode.com/tempo-mainnet', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'eth_blockNumber', params: [] }),
    })
    
    if (response.status === 402) {
      // Step 2: Create credential from 402 challenge
      const credential = await mppx.createCredential(response, {
        account: privateKeyToAccount('0xYOUR_PRIVATE_KEY'),
      })
    
      // Step 3: Retry with Authorization header
      const paidResponse = await fetch('https://mpp.quicknode.com/tempo-mainnet', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: credential,
        },
        body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'eth_blockNumber', params: [] }),
      })
    }
    ```
    
    ### CLI
    
    ```bash
    npm install -g mppx
    
    mppx account create
    mppx -X POST -H 'Content-Type: application/json' \
      -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}' \
      https://mpp.quicknode.com/tempo-mainnet
    ```
    
    Environment variables: `MPPX_PRIVATE_KEY`, `MPPX_ACCOUNT`
    
    ## Using MPP From The Quicknode CLI Or SDK
    
    The Quicknode CLI and SDK wrap this gateway, so an agent can pay for RPC calls without writing payment code or installing `mppx`:
    
    - CLI (v0.6.0+): `qn wallet generate --vm evm` then `qn rpc call --mpp`, or a channel via `qn rpc mpp open` and `--mpp-session`. See [cli-reference.md](cli-reference.md#paid-rpc-x402-and-mpp).
    - SDK (Node 3.8.0+, other languages 0.8.0+): set `rpc.payment` with `scheme: "mpp"`, or use `mppOpen`/`mppSessionCall`. See [sdk-reference.md](sdk-reference.md#rpc-micropayments).
    
    ## Payment Receipts
    
    ```typescript
    import { Receipt } from 'mppx'
    
    const receipt = Receipt.fromResponse(response)
    console.log(receipt.status)    // "success"
    console.log(receipt.reference) // tx hash (charge) or channelId (session)
    ```
    
    ## Error Responses
    
    | Status | Code | Meaning |
    |--------|------|---------|
    | 402 | (challenge) | Payment required; see `WWW-Authenticate: Payment` header |
    | 403 | `monthly_limit_reached` | Monthly testnet credit cap exceeded; no payment taken; switch to mainnet or wait for reset |
    | 404 | `unsupported_network` | Network slug not found |
    | 429 | `rate_limit_exceeded` | Route-specific limit exceeded; see [Rate Limits](#rate-limits) |
    | 503 | `mpp_not_configured` | MPP unavailable in this environment |
    
    ## Best Practices
    
    1. **Use session intents for high volume** — 100x cheaper than charge at scale ($0.00001 vs $0.001 per request).
    2. **Use the polyfill for simplicity** — `Mppx.create()` patches `globalThis.fetch` so all fetch calls handle 402 automatically.
    3. **Parse receipts** — Use `Receipt.fromResponse()` to verify payment status and get transaction references.
    4. **Multi-service agents** — MPP works across any MPP-enabled service, so one wallet and protocol handles Quicknode RPC, LLM providers, and other APIs.
    
    ## NPM Packages
    
    - **mppx** — Official TypeScript SDK (client, server, middleware, CLI)
    - **@solana/mpp** — Solana payment method (client, server)
    - **viem** — Ethereum/Tempo utilities (peer dependency)
    - **@solana/kit** — Solana SDK (peer dependency)
    
    ## Documentation
    
    - **MPP Platform**: https://mpp.quicknode.com
    - **MPP Documentation (llms.txt)**: https://mpp.quicknode.com/llms.txt
    - **MPP Docs**: https://mpp.dev
    - **MPP Spec (IETF)**: https://datatracker.ietf.org/doc/draft-ryan-httpauth-payment/
    - **Tempo Docs**: https://docs.tempo.xyz
    
  • skills/quicknode-skill/references/ordinals-runes-reference.md6.1 KBe1ce04cbe96dupstream ↗
    # Ordinals & Runes API Reference
    
    Bitcoin inscription and Runes protocol data via the Quicknode Ordinals & Runes API add-on. 21 methods covering inscriptions, satoshi metadata, Runes, and Bitcoin outputs — available through JSON-RPC and ORD-compatible REST on your Quicknode Bitcoin endpoint. No custom indexer required.
    
    **Marketing:** https://www.quicknode.com/ordinals-runes
    **Docs:** https://www.quicknode.com/docs/bitcoin/ord_getInscription
    
    ## Prerequisites
    
    Activate the **Ordinals & Runes API** add-on on your Quicknode Bitcoin endpoint. Methods become available on your existing endpoint URL once active.
    
    ## Methods Overview
    
    | Method | Description |
    |--------|-------------|
    | `ord_getInscription` | Metadata for a single inscription by ID |
    | `ord_getInscriptions` | Paginated list of inscriptions |
    | `ord_getInscriptionsByBlock` | All inscriptions in a specific block |
    | `ord_getChildren` | Child inscriptions of a parent inscription |
    | `ord_getSat` | Satoshi rarity, percentile, and linked inscriptions |
    | `ord_getOutput` | Bitcoin output and the inscriptions or Runes it contains |
    | `ord_getCollections` | Paginated collection listings |
    | `ord_getRune` | Rune etching details and live supply by ID or name |
    | `ord_getRunes` | Paginated Rune listings |
    | `ord_getStatus` | Ordinals indexer status |
    | `ord_getTx` | Transaction details |
    | `ord_getBlockInfo` | Recursive block info by height |
    | `ord_getBlockHash` | Block hash by height |
    | `ord_getContent` | Raw inscription content |
    | `ord_getCurrentBlockHash` | Latest indexed block hash |
    | `ord_getCurrentBlockHeight` | Latest indexed block height |
    | `ord_getCurrentBlockTime` | Latest indexed block timestamp |
    | `ord_getMetadata` | CBOR-decoded inscription metadata |
    | `ord_getInscriptionRecursive` | Recursive inscription details |
    | `ord_getSatAtIndex` | Inscription ID at an index on a sat |
    | `ord_getSatRecursive` | Paginated inscription IDs on a sat |
    
    Both JSON-RPC and REST interfaces are available on the same endpoint.
    
    ## Get Inscription Details
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'ord_getInscription',
        params: ['6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0'],
      }),
    });
    
    const { result } = await response.json();
    // result.id — inscription ID (txid + index)
    // result.number — ordinal inscription number
    // result.sat — sat number the inscription is bonded to
    // result.satpoint — current location (txid:vout:offset)
    // result.address — current holder address
    // result.content_type — MIME type of the inscription content
    // result.content_length — byte length
    // result.height — block height of the inscription transaction
    // result.fee — fee paid at inscription
    // result.charms, result.children, result.parents — relationship and classification arrays
    // result.previous, result.next — neighboring inscription IDs
    // result.rune — associated Rune, if any
    // result.value — output value in sats
    // result.timestamp — Unix timestamp of genesis block
    ```
    
    ## Get Satoshi Data
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'ord_getSat',
        params: [1452891330221420],
      }),
    });
    
    const { result } = await response.json();
    // result.number — sat number
    // result.rarity — rarity classification (e.g., "uncommon", "rare")
    // result.percentile — sat's position in total supply
    // result.inscriptions — array of inscription IDs on this sat
    // result.block — block in which this sat was mined
    // result.satpoint, result.timestamp, result.charms — current sat metadata
    ```
    
    ## Get Bitcoin Output
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'ord_getOutput',
        params: ['7f3a1c2b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a:0'],
      }),
    });
    
    const { result } = await response.json();
    // result.value — satoshi value of the output
    // result.address — output address
    // result.inscriptions — inscriptions held in this output
    // result.runes — Runes and their amounts in this output
    // result.indexed — whether this output is indexed
    // result.sat_ranges — sat ranges in the output
    // result.script_pubkey — script pubkey
    // result.spent — whether the output has been spent
    // result.transaction — transaction ID
    ```
    
    ## Get Rune Details
    
    ```typescript
    const response = await fetch(process.env.QUICKNODE_RPC_URL!, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'ord_getRune',
        params: ['840000:1'],
      }),
    });
    
    const { result } = await response.json();
    // result.id — rune ID (block:tx)
    // result.mintable — whether the Rune can still be minted
    // result.parent — parent inscription, if any
    // result.entry.spaced_rune — rune name with spacers
    // result.entry.symbol — single character symbol
    // result.entry.burned — burned amount
    // result.entry.divisibility — decimal places
    // result.entry.etching — etching transaction ID
    // result.entry.mints — number of mints
    // result.entry.premine — premine amount
    // result.entry.terms — mint terms (cap, amount, height, offset)
    ```
    
    ## Troubleshooting
    
    | Error | Cause | Fix |
    |-------|-------|-----|
    | Method not found | Add-on not enabled | Activate Ordinals & Runes API on your Bitcoin endpoint |
    | Unknown inscription | Inscription ID does not exist | Verify the full inscription ID including the `i0` suffix |
    | Rune not found | Name or ID incorrect | Use bullet separators in the name (e.g., `UNCOMMON•GOODS`) |
    
    ## Documentation
    
    - **ord_getInscription Docs**: https://www.quicknode.com/docs/bitcoin/ord_getInscription
    - **Build with Ordinals and Runes API Guide**: https://www.quicknode.com/guides/bitcoin/build-with-ordinals-and-runes-api
    - **Marketing**: https://www.quicknode.com/ordinals-runes
    
  • skills/quicknode-skill/references/rpc-reference.md24 KB8e81a132cc29upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/sdk-reference.md15 KBc984ded16593upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/solana-das-api-reference.md16 KB508cdeed1c96upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/solana-grpc-reference.md15 KB933dc6a489c4upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/sql-explorer.md83 KBd57a971ba144upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/streams-backfills-reference.md4.2 KB3a9b0a559060upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/streams-reference.md11 KB18f2bdf6334fupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/swap-api-reference.md9.0 KB18eb3da01e3bupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/webhooks-reference.md12 KBea96aff1471bupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/references/x402-reference.md13 KB7be0f2931476upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • skills/quicknode-skill/PRODUCT_CATALOG.md10 KBbb1c3b4e4b22upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/quiknode-labs-blockchain-skills-skills-quicknode-skill.md

// REPO STATS

20 stars
2 open issues
Last commit: 3mo ago