Skip to main content
Glama
NullClear — Web3 Security & Tx Decoder

NullClear — Web3 Security & Tx Decoder

Official

NullClear (nullclear.dev / nullclear.com)

The Autonomous Pre-Execution Firewall for On-Chain Agents (Check → Enforce → Monitor) + Non-Custodial x402 Clearinghouse

NullClear eliminates payment risk in Agent-to-Agent (A2A) commerce. In standard HTTP 402 Payment Required flows, buyers are forced to pay before seeing whether an upstream agent hallucinates, crashes, or returns malformed data. NullClear introduces deferred non-custodial schema escrow: the buyer signs an EIP-3009 TransferWithAuthorization, the arbiter cryptographically validates the upstream agent's output against the buyer's schema contract, and only settles payment upon 100% verification. If the seller hallucinates or crashes, the authorization is voided and $0 is spent.


Architecture Overview

                      ┌──────────────────────────────────────────┐
                      │              BUYER AGENT                 │
                      │  (@nullclear/x402-arbiter client/fetch)   │
                      └─────────────────────┬────────────────────┘
                                            │
                          1. Target request │ (Intercepted 402)
                          2. EIP-3009 signed│ & Schema defined
                                            ▼
                      ┌──────────────────────────────────────────┐
                      │          NULLCLEAR ARBITER               │
                      │     (Cloudflare Worker + Hono)           │
                      │  - Sybil & Wash-Trade Engine             │
                      │  - Deterministic JSON Schema Validator   │
                      │  - EIP-712 Receipt Attestation           │
                      └─────────────┬──────────────┬─────────────┘
                                    │              │
                   3. Proxy Request │              │ 4. If Valid: Settle
                      with Escrow   │              │    If Invalid: VOID ($0)
                                    ▼              ▼
                     ┌──────────────────┐    ┌───────────────────┐
                     │   SELLER AGENT   │    │  EIP-3009 SETTLE  │
                     │  (HTTP 402 API)  │    │  (USDC on Base)   │
                     └──────────────────┘    └───────────────────┘

Related MCP server: revettr

Monorepo Packages

Package

Path

Description

@nullclear/shared

packages/shared

Core constants (Base Mainnet 8453, Sepolia 84532), ERC-8004 ABIs, x402 V2 types, EIP-3009 & KYA EIP-712 schemas.

@nullclear/worker-arbiter

packages/worker-arbiter

Cloudflare Worker Hono app handling deferred escrow clearing (/v1/clear), Sybil-resistant trust scores (/v1/score), KYA mandates (/v1/kya), and machine discovery honeypots (/llms.txt, /.well-known/*, /openapi.json).

@nullclear/x402-arbiter

packages/x402-arbiter

Agent SDK (v1.7.0) providing createNullClearRpcUrl, createNullClearPassClient, NullClearClient (7-chain guard, dueDiligence, cosign, buyPass), and createNullClearFetch deferred x402 escrow.

@nullclear/agentkit

packages/agentkit

Coinbase AgentKit ActionProvider (nullclearActionProvider v1.1.0), nullclear_preflight_guard, createNullClearWalletGuard, and Guarded JSON-RPC across 7 EVM/Solana chains.

@nullclear/plugin-eliza

packages/plugin-eliza

ElizaOS 7-chain firewall plugin (v1.1.0: NULLCLEAR_SCAN_TOKEN, NULLCLEAR_SCAN_BATCH, NULLCLEAR_GUARD_CALLDATA, NULLCLEAR_API_KEY + real-time context provider).

@nullclear/mcp

packages/mcp-server

Model Context Protocol server (v1.6.0, STDIO + Streamable HTTP at https://api.nullclear.dev/mcp) exposing 14 tools (nullclear_preflight_guard, 7-chain forensics, ERC-8004 reputation, KYA mandate, and x402 escrow).

@nullclear/e2e-simulator

packages/e2e-simulator

Self-contained local simulator validating honest sellers, hallucination voids, 500 crash voids, and Sybil wash-trade detection.


Protocol Guarantees

  1. Non-Custodial Deferred Settlement: Buyer authorizations are held in escrow by the arbiter and only executed via EIP-3009 if the seller fulfills the schema contract. If the seller returns invalid schema or error codes, settlement is discarded.

  2. Sybil & Wash-Trade Detection: Analyzes counterparty concentration graph. If $>60%$ of transaction volume comes from a single buyer address across $\ge 3$ transactions, a wash-trading penalty is applied and the HIGH_COUNTERPARTY_CONCENTRATION_WASH_RISK flag is raised.

  3. KYA (Know Your Agent) Corporate Liability Mandates: Cryptographically ties an on-chain agent wallet to a legally registered corporate entity with defined liability coverage and per-transaction limits.

  4. Machine Discovery & Self-Describing Agents: Complete llms.txt, /.well-known/agent.json, /.well-known/x402.json, /.well-known/mcp.json, and OpenAPI 3.1.0 specifications.


What's New in v1.7.0 (Autonomous Pre-Execution Firewall Pro Suite)

  • Self-Serve x402 Prepaid Passes (POST /v1/pass/buy, $5 / $25 / $100 USDC) & <5ms Edge KV Auth: Autonomous agents and teams can mint nc_live_... Bearer API keys with 2,000–100,000 credits via EIP-3009 USDC settlement, eliminating 1.5s per-call settlement overhead.

  • Drop-In Guarded JSON-RPC Safety Rail (POST /rpc/:chain/:apiKey): Built for Autonomous AI Agents (AgentKit, ElizaOS, Virtuals, Rig) and Safe/DAO treasuries. Swap one RPC_URL env var across 7 chains — reads pass through via edge KV (0 credits); every broadcast is pre-screened via guardTransactionPreflight with configurable failMode=closed|open and timeoutMs race budgets.

  • Cryptographic EIP-712 Policy Co-Signer (POST /v1/policy/register, /v1/policy/cosign): Evaluates programmable spend/tax/drainer policies and emits on-chain-verifiable EIP-712 PolicyApproval co-signatures only when all invariants pass.

  • 30-Day Continuous Cron Watchtower (POST /v1/monitors) & Institutional Due-Diligence (POST /v1/bazaar/due-diligence, $0.10): Scheduled diffs on proxy slots, sell taxes, LP drops, and Solana mint/freeze authorities firing signed webhooks + signed clearance certificates.

  • 7-Chain 1-Call Pre-Sign Firewall (POST /v1/guard & /v1/bazaar/guard) & Package Upgrades: Added arbitrum, optimism, polygon, bsc alongside base, eth, solana, recursive Multicall3/UniversalRouter/Safe unwrapping, EIP-712 Permit2/Seaport audits, Solana Token-2022 checks, stateful eth_simulateV1 asset diffs, and published SDK updates (@nullclear/x402-arbiter@1.7.0, @nullclear/mcp@1.6.0, @nullclear/agentkit@1.1.0, @nullclear/plugin-eliza@1.1.0).

What's New in v1.6.0

  • Dual-Facilitator Discovery (Coinbase CDP Bazaar + PayAI + 402index.io): Added Coinbase CDP EdDSA/ES256 JWT auth (?facilitator=cdp / X-NullClear-Facilitator: cdp) and 402index.io domain verification (/.well-known/402index-verify.txt), getting all 7 / 7 /v1/bazaar/* endpoints indexed live across Coinbase CDP Bazaar, 402index.io, and PayAI Discovery.

  • Multi-Chain Batch Firewall (POST /v1/bazaar/scan-batch, $0.025 USDC) & D1 Param Telemetry: Scans up to 15 unique Base, Ethereum, and Solana tokens per request (D1 cache-first lookup + bounded parallel chunking engineered for Cloudflare Workers Paid), aggregates EXECUTE_SAFE / CAUTION_HIGH_RISK / ABORT_CRITICAL_TRAP verdicts, logs sanitized target_address / target_chain / query_type in clearings, aligns /v1/bazaar/market-oracle & /v1/bazaar/audit to $0.005 USDC, and upgrades /v1/bazaar/token-security to full multi-chain forensics (Base, ETH, Solana).

  • Interactive Security Wedge (/firewall) & Agent Framework SDKs (@nullclear/x402-arbiter@1.6.0, @nullclear/agentkit@1.0.0, @nullclear/plugin-eliza@1.0.0): Plug-and-play pre-flight token & drainer-calldata firewalls for Coinbase AgentKit (nullclearActionProvider) and ElizaOS (nullclearPlugin).

What's New in v1.5.0

  • \$0.005 Micro-Tier Pricing & Standard /.well-known/x402 Resources: Aligned high-frequency Bazaar intelligence routes (/v1/bazaar/token-security, /v1/bazaar/wallet-risk, /v1/bazaar/verified-fetch) to \$0.005 USDC (5000 atomic), added KV-cached top-level "resources": [...] + machine-readable "guarantee" blocks on /.well-known/x402 and /.well-known/agent.json, served RFC 9728 /.well-known/oauth-protected-resource* and /.well-known/agent-registration.json, and prevented /llms.txt documentation false-positives in the Canary Auditor.

  • SDK & Shared v1.5.0 (@nullclear/shared, @nullclear/x402-arbiter): Added NullClearClient methods for x402 directory discovery (discoverEndpoints) and zero-key forensics (scanToken, inspectContract, decodeCalldata, simulateTx), Bazaar/Guarantee TypeScript schemas, and Base RPC failover constants.

What's New in v1.4.0

  • 13-Tool MCP Server & Streamable HTTP Endpoint (https://api.nullclear.dev/mcp): Uniform nullclear_<verb>_<noun> tool suite (nullclear_scan_token, nullclear_inspect_contract, nullclear_decode_calldata, nullclear_simulate_transaction, nullclear_read_markdown, nullclear_discover_apis, nullclear_audit_paid_token, nullclear_score_wallet, nullclear_fetch_spot_price, nullclear_fetch_guarded, nullclear_execute_escrow, nullclear_check_reputation, nullclear_verify_mandate, with full legacy name compatibility) plus live /.well-known/glama.json, /.well-known/mcp.json, and /.well-known/mcp/server-card.json metadata.

  • PayAI settlement_pending & On-Chain EIP-3009 Recovery: Polls PayAI /settle pending settlements and verifies AuthorizationUsed / transaction receipts on Base Mainnet so confirmed payments return HTTP 200 and record clearings deterministically.

  • Bazaar Discovery & Paid Forensics: Emits resource + serverExtensions.bazaar metadata during facilitator settlement for PayAI/CDP Bazaar indexing, and enables $0.005 (5000 atomic USDC) EIP-3009 paid access on forensic endpoints alongside the 100 req/day free tier.

What's New in v1.1.0

  • 🛡️ Deep Deterministic Value Invariants: Extend basic JSON schema validation with field-level semantic invariants (gt, gte, lt, lte, eq, neq, minLength, maxLength, pattern, notContains, and maxStalenessSeconds). Stale data or numeric drift triggers instant authorization voiding ($0 charged).

  • 🛑 Canonical LLM Refusal Guard: Automatically inspects text and JSON responses for common LLM refusal boilerplate ("as an ai language model", "i cannot fulfill this request", "i am unable to assist", rate limits, and server error strings), treating refusal as non-delivery.

  • 🔀 Autonomous Multi-Seller Failover Routing: Callers can provide ordered fallback candidates (fallbacks: [{ targetUrl, sellerAgentId, paymentSignatureHeader }]). If the primary seller crashes or fails validation, the Arbiter voids the primary authorization and automatically routes to the secondary candidate without roundtripping back to the client agent.

  • 🔒 Outbound Spend Firewall & Anti-Abuse Guards: Protect buyer agent wallets with per-call caps (maxPerCallAtomic) and daily rolling spend policies (maxDailyWalletAtomic). Rejects self-clearing wash-loops (buyer address === seller address) and enforces minimum on-chain settlement floors.


Quickstart

Prerequisites

  • Node.js $\ge 20$

  • pnpm $\ge 9$

Install Dependencies

pnpm install

Build All Packages

pnpm build

Typecheck

pnpm typecheck

Run Tests

pnpm test

Run Live Autonomous E2E Simulator

pnpm demo

Available Tools

13 tools
nullclear_audit_paid_tokenA
Read-onlyIdempotent
Inspect

Run NullClear's x402 Bazaar paid oracle for Base Mainnet (8453) ERC-20 tokens returning a cryptographically signed clearing receipt (10 free trial calls/day, then $0.005 USDC). Use this ONLY when you specifically require a Base Bazaar EIP-712/keccak256 settlement receipt alongside token LP and bytecode verification. For free (100/day) multi-chain Base/ETH/Solana token & proxy scanning, use nullclear_scan_token instead.

Inputs: tokenAddress (required).

nullclear_check_reputationA
Read-onlyIdempotent
Inspect

Retrieve an ERC-8004 registered agent's composite trust score (0-100), letter grade (A-F), historical clearing count, and Sybil wash-trading penalty flags by numeric agentId. Returns arbiter-signed reputation metrics and sybilFlags. Use this ONLY for registered ERC-8004 agent IDs (e.g. '124595'); for raw 0x wallet address OFAC/balance profiling use nullclear_score_wallet, and for legal corporate liability limits use nullclear_verify_mandate.

Inputs: agentId (required), chainId.

nullclear_decode_calldataA
Read-onlyIdempotent
Inspect

Decode existing hex calldata, custom Solidity revert bytes, or a mined transaction hash to explain historical failures and flag malicious approvals. Use this AFTER a transaction failed or when auditing opaque 0x calldata bytes before signing (100 free calls/day/IP). Returns decoded 4-byte function signature, argument breakdown, revert reason, and approval-drainer warnings. Do NOT use to dry-run an unsigned transaction against live chain state (use nullclear_simulate_transaction instead).

Inputs: input (required), chain.

nullclear_discover_apisA
Read-onlyIdempotent
Inspect

Search NullClear's audited x402 and ERC-8004 endpoint directory by keyword, category, minimum uptime, and maximum latency. Use this before paying external x402 sellers to find reliable APIs and retrieve their NullClear Zero-Loss Proxy URL (https://api.nullclear.dev/https://...). Returns matched endpoints with priceAtomic, uptimeScore, latencyMs, and proxy URL. Do NOT use to execute a call (pass the returned URL to nullclear_execute_escrow).

Inputs: query, category, minUptime, maxLatencyMs, +1 more.

nullclear_execute_escrowAInspect

Execute a paid x402 API request protected by NullClear deferred non-custodial EIP-3009 escrow, custom JSON Schema/value invariants, multi-seller failover routing, and outbound spend caps (10 free trials/day, then requires configured wallet key). Settles upstream payment ONLY when all schema, numeric, staleness, and refusal checks pass; otherwise voids authorization ($0 lost). Use this instead of nullclear_fetch_guarded whenever calling third-party x402 paid APIs with strict output contracts or fallback sellers.

Inputs: targetUrl (required), method, fallbacks, invariants, +7 more.

nullclear_fetch_guardedA
Read-onlyIdempotent
Inspect

Execute a zero-schema Auto-Guarded HTTP GET/POST request through NullClear's firewall against HTTP 5xx crashes, empty JSON bodies, Cloudflare/soft-paywall traps, and LLM refusal strings (10 free trials/day, then $0.005 USDC via Bazaar). Returns verified payload and executionReceipt, or voids settlement on failure. Do NOT use for plain HTML docs-to-Markdown conversion (use nullclear_read_markdown) or when custom JSON Schema/invariants/failover are needed (use nullclear_execute_escrow).

Inputs: url (required), body, method.

nullclear_fetch_spot_priceA
Read-onlyIdempotent
Inspect

Query cross-exchange spot prices (Coinbase + Binance) for major crypto pairs with deterministic positive-price invariant verification and signed attestation (10 free trials/day, then $0.01 USDC). Returns priceUsd, source, invariantCheck ('PASSED'), and execution receipt. Use this whenever a verified non-hallucinated crypto spot price feed is needed.

Inputs: pair (required).

nullclear_inspect_contractA
Read-onlyIdempotent
Inspect

Disassemble deployed EVM bytecode on Base or Ethereum to resolve EIP-1967/1822/1167 proxies and extract decoded 4-byte PUSH4 function selectors without an Etherscan key. Use this for arbitrary smart contracts (vaults, routers, pools) to inspect proxy admin/implementation slots and SELFDESTRUCT/DELEGATECALL opcodes (100 free calls/day/IP). Returns isProxy, proxyType, implementationAddress, decodedFunctions, and dangerousSelectorsFound. Do NOT use for token market liquidity/honeypot tax audits (use nullclear_scan_token).

Inputs: address (required), chain.

nullclear_read_markdownA
Read-onlyIdempotent
Inspect

Fetch and convert any public web documentation URL or HTML article into clean, stripped Markdown (<400 tokens) with a SHA-256 content hash. Use this when reading documentation, blog posts, or web pages while minimizing context-window noise (100 free calls/day/IP). Returns markdown body and provenance hash. Do NOT use for JSON REST APIs or schema-enforced x402 data endpoints needing LLM-refusal/5xx protection (use nullclear_fetch_guarded or nullclear_execute_escrow).

Inputs: url (required).

nullclear_scan_tokenA
Read-onlyIdempotent
Inspect

Perform a free multi-chain (Base, Ethereum, Solana) token security, EIP-1967 proxy resolution, honeypot, and buy/sell tax audit. Use this as the primary pre-trade check for any token or contract (100 free calls/day/IP, zero API key; then $0.005 USDC). Returns score, verdict, recommendedAgentAction, proxy implementation, tax percentages, LP USD, and provenance block number (<400 tokens). Do NOT use for low-level 4-byte selector disassembly on non-token contracts (use nullclear_inspect_contract) or when an EIP-712 Bazaar payment receipt is explicitly required on Base ERC-20 tokens (use nullclear_audit_paid_token).

Inputs: address (required), chain.

nullclear_score_walletA
Read-onlyIdempotent
Inspect

Profile a raw 0x EVM wallet address on Base Mainnet (8453) for OFAC sanctions exposure, on-chain counterparty wash-trade concentration, ETH/USDC balances, transaction count, and ERC-8004 ownership (10 free trials/day, then $0.005 USDC). Returns riskScore (0-100), riskLevel, and ERC-8004 registration status. Do NOT pass a numeric ERC-8004 agent ID here — use nullclear_check_reputation for numeric agentId trust audits.

Inputs: walletAddress (required), chainId.

nullclear_simulate_transactionA
Read-onlyIdempotent
Inspect

Execute a live eth_call and eth_estimateGas dry-run on Base or Ethereum BEFORE signing or broadcasting an unsigned transaction. Use this immediately before wallet execution when you have target to + data and need to confirm whether the call will succeed, estimate gas, and verify allowance safety (100 free calls/day/IP). Returns simulation success, gas estimate, decoded revert reason if any, and recommendedAgentAction. Do NOT use for standalone hex bytes without to or past mined tx hashes (use nullclear_decode_calldata).

Inputs: to (required), data, from, chain, +1 more.

nullclear_verify_mandateA
Read-onlyIdempotent
Inspect

Verify an autonomous agent's Know Your Agent (KYA) EIP-712 corporate liability mandate, jurisdiction, expiration status, and whether a proposed USD transaction amount complies with corporate per-transaction caps. Returns approved boolean, corporateEntity, liabilityCoverageUsd, maxTxLimitUsd, and expiration/limit flags. Use this specifically for corporate authorization checks — not for on-chain Sybil scoring (use nullclear_check_reputation).

Inputs: agentId (required), transactionAmountUsd (required), chainId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools target distinct actions/resources, and the descriptions explicitly flag near-neighbors such as scan_token vs audit_paid_token and fetch_guarded vs execute_escrow. The remaining overlap is manageable but real: token auditing and guarded HTTP execution each have two close variants that require careful reading of payment/receipt requirements.

    Naming Consistency5/5

    All tools use the same nullclear_ prefix followed by snake_case verb_noun naming (read_markdown, scan_token, inspect_contract, decode_calldata). The pattern is highly predictable and the names are descriptive.

    Tool Count5/5

    13 tools is within the ideal range and feels well-scoped for a combined Web3 security, transaction decoding, and x402 API execution surface. Each tool appears to represent a distinct operation despite the broad domain.

    Completeness4/5

    The surface covers token scanning, contract inspection, calldata decoding, transaction simulation, wallet/reputation checks, mandate verification, and x402 API discovery/execution. Minor gaps remain around monitoring/history, batch scanning, approval revocation, and standalone receipt verification, but core workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers