⚡ Zap Bitcoin Desk

Bitcoin desk for agents: the daily Bitcoin On-Chain Brief ($0.25: Mayer and Puell Multiples, price ranges, Hash Ribbons, hashrate/hashprice, difficulty, pools, fees, supply, signals, ready-to-post Markdown), fee planner ($0.01), on-chain payment verification ($0.01), address screen with OFAC sanctions + poisoning check ($0.05), Lightning Address / zap preflight ($0.01). Pay per call with x402 (USDC on Base) or MPP (USDC.e on Tempo), or buy a $1 day pass / $1.25 7-day Desk pass, also with a plain USDC transfer or on-chain BTC. No keys, no accounts.

Bitcoin Fee Planner

$0.01/call

What to pay to get a Bitcoin transaction confirmed right now, and what it costs. Live fee tiers (sat/vB), the projected next blocks, cost of your transaction shape in sats and USD at every tier with projected block / ETA, optional check of a fee rate you plan to use (fee_rate), mempool congestion, next difficulty adjustment, and plain-English advice (wait or send, consolidate or not). No parameters needed (default: 1-input 2-output P2WPKH, 141 vB). Data: mempool.space (Blockstream fallback).

GET https://zap-btc.agent-arena-base.workers.dev/v1/btc/fees

Bitcoin Payment Verification

$0.01/call

Did my customer pay? Verifies on-chain Bitcoin payments to an address for agents that sell for BTC: paid / pending / underpaid / unpaid against amount_sats, confirmations per transaction, RBF (replaceable) flag, fee rate vs the current market (stuck risk), totals, and a deliver-or-wait recommendation. Optional txid, since (unix time), min_conf (default 1). Supports P2PKH, P2SH, SegWit and Taproot mainnet addresses. Invalid or testnet address = 400, not charged. Omitted address = a public demo address. Data: mempool.space (Blockstream fallback).

GET https://zap-btc.agent-arena-base.workers.dev/v1/btc/payment-verify

Bitcoin Address Screen (OFAC + risk)

$0.05/call

Screen a Bitcoin address before you send to it or accept funds from it: checksum/format and script type, OFAC SDN sanctions match (official list of sanctioned BTC addresses), on-chain profile (tx count, received/sent, balance, UTXOs, last activity, address reuse), dust-attack signal, and an address-poisoning check against the address you expected (compare_to: flags lookalikes that share the first/last characters). Returns verdict ok / caution / block with reasons. Invalid or testnet address = 400, not charged. Omitted address = a public demo address. Data: mempool.space (Blockstream fallback), OFAC SDN list.

GET https://zap-btc.agent-arena-base.workers.dev/v1/btc/address-screen

Lightning Address & Zap Preflight

$0.01/call

Before you pay or zap a Lightning Address (name@domain): resolves LUD-16/LNURL-pay and checks it is payable, with min/max sendable in sats, comment length, payer data, HTTPS callback, NIP-57 zap support (allowsNostr + zapper npub), CORS, and the NIP-05 Nostr identity on the same domain (pubkey, npub, relays). Optional amount_sats is checked against the limits. Returns payable / not_payable with reasons. Nothing is paid and no invoice is created. Omitted address = a public demo address. Unreachable domain = 502, not charged.

GET https://zap-btc.agent-arena-base.workers.dev/v1/ln/address-check

Bitcoin On-Chain Brief (daily network + miner analytics report)

$0.25/report

A complete daily Bitcoin network and miner analytics report in one call, ready to use or post: valuation (live price, 1/7/30/90/365-day change, 90-day and 1-year range and drawdown, Mayer Multiple vs the 200-day average, Puell Multiple), miners (hashrate and 30d trend, Hash Ribbons 30/60-day crossover, hashprice USD/PH/day and trend, fee share of revenue, difficulty history and next adjustment, pool concentration and Nakamoto coefficient), block space (fee revenue per block 7d vs 30d, tx and fee per tx over the last 144 blocks), fee market (sat/vB tiers, mempool backlog, cost of a typical tx), supply (issued, % of 21M, inflation, halving countdown), Lightning capacity, up to 8 rule-based signals each with the number behind it, an overall read, a plain-English headline and a ready-to-post Markdown brief. No parameters. Data: mempool.space public API (1 year of block rewards, prices and hashrate). Not charged if the data source is down.

GET https://zap-btc.agent-arena-base.workers.dev/v1/btc/onchain-brief

Day pass: 24 hours, up to 1000 calls

$1.00/day

Buy once, call all day: a signed token for up to 1000 calls to the per-call tools (fee planner, payment verification, address screen, Lightning Address preflight) for 24 hours (the On-Chain Brief needs the 7-day Desk pass). Send it as Authorization: Bearer <token> or X-Zap-Pass: <token>. Built for merchant agents that poll payment status: 100 payment checks already cost $1.

GET https://zap-btc.agent-arena-base.workers.dev/v1/pass

7-day Desk pass: every route incl. the daily On-Chain Brief

$1.25/week

One $1.25 payment, 7 days: up to 3000 calls to every paid route, including the $0.25 Bitcoin On-Chain Brief (a daily report bot pays $1.75/week per call, so this is about 30% less) plus the fee planner, payment verification, address screen and Lightning preflight. Send it as Authorization: Bearer <token> or X-Zap-Pass: <token>. Also buyable without x402: plain USDC transfer on Base (/v1/pass/usdc/quote?kind=week) or on-chain BTC (/v1/pass/btc/quote?kind=week).

GET https://zap-btc.agent-arena-base.workers.dev/v1/pass/week

How to call

import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPayment(fetch, privateKeyToAccount(process.env.PRIVATE_KEY));
const fees = await (await pay("https://zap-btc.agent-arena-base.workers.dev/v1/btc/fees?type=p2tr&inputs=2")).json();                       // $0.01
const paid = await (await pay("https://zap-btc.agent-arena-base.workers.dev/v1/btc/payment-verify?address=bc1q...&amount_sats=50000")).json(); // $0.01
const brief = await (await pay("https://zap-btc.agent-arena-base.workers.dev/v1/btc/onchain-brief")).json();                                   // $0.25
console.log(fees.costs[0], paid.status, paid.recommendation, brief.headline, brief.markdown);

MPP: the same 402 also carries WWW-Authenticate: Payment with method="tempo", intent="charge" (USDC.e on Tempo, pull mode), for example npx mppx "https://zap-btc.agent-arena-base.workers.dev/v1/btc/fees".

No x402 client? Buy the 7-day Desk pass (includes the daily On-Chain Brief) or the day pass with a plain USDC transfer on Base: /v1/pass/usdc/quote?kind=week gives an exact amount; send it from any wallet, then claim with /v1/pass/usdc/claim?quote=…&tx=….

Pay in Bitcoin: /v1/pass/btc/quote?kind=week (or kind=day) gives an exact sats amount; pay on-chain to bc1qadq8ef6v3h8lzjtvh4f6c3zdcdzvm678jlmxdv, then claim with /v1/pass/btc/claim?quote=…&txid=… after 1 confirmation.

Free preview: /v1/peek. See both payment challenges without paying: curl -i "https://zap-btc.agent-arena-base.workers.dev/v1/btc/fees"

Payment policy

Input is validated before any payment is touched (invalid or testnet address = 400, not charged); failed work (data source down, unreachable Lightning domain) is never settled or broadcast. x402 (Base): a result is released only after the USDC settlement is confirmed (by the facilitator, or on-chain on Base); if settlement cannot be confirmed you get HTTP 402 and no result. MPP (Tempo): the server broadcasts your signed USDC.e transfer itself and releases the result when the receipt shows it; if the Tempo RPC gives no definite answer the result is released anyway, marked unconfirmed, so you are never charged without getting it.

Machine-readable

/api · /openapi.json · /llms.txt · /.well-known/x402 · /health