Vanta SDK Whitepaper

Architecture

System Overview

Vanta SDK consists of modular components that work together to enable HTTP 402 payments. The architecture is designed for flexibility, security, and performance.

Core Components

Payment Challenge Generator

Generates cryptographically secure, time-limited challenges containing payment requirements. Each challenge is unique and bound to a specific resource and HTTP method.

On-Chain Verifier

Queries blockchain RPCs to verify payment transactions. Checks existence, amount, recipient, challenge ID in data, and confirmation depth.

Token Issuer

Optional component that issues JWT access tokens after payment verification. Reduces on-chain verification overhead for subsequent requests.

Storage Layer

Manages challenge state, quota tracking, and rate limit counters. Supports in-memory (dev), Redis (production), and custom adapters.

Protocol Flow

  1. Challenge: Server generates challenge with unique ID, price, recipient, network, expiry
  2. Payment: Client sends ETH to recipient with challenge ID in tx.data
  3. Proof: Client sends txHash + signature in Authorization header
  4. Verification: Server queries RPC, validates all fields, marks challenge used
  5. Access: Server returns resource + optional token + receipt

Supported Networks

Base (recommended for micropayments), Ethereum, Optimism, Arbitrum, Polygon.