PayPerByteSETTLE · BASE 8453
LIVE
FLAGSHIP$0.05 address-rep
PRICEfrom $0.002 / call
RECEIPTX-BYTE-Attestation
TOKENnone
ForeSealPayPerByte
verify-before-act · live on npm

Every paid response, signed. Verified before your agent acts.

When an agent spends money on data, “act on unverified data” becomes “lose money on unverified data.” Foreseal closes that gap: the Gate stamps a cryptographic receipt over the exact bytes you serve, and the Kit lets the agent recompute the hash and recover the signer before it acts on a single byte. Same receipt, two sides.

Demo
6 scenarios
2 act · 4 refuse
Receipt
EIP-712
X-BYTE-Attestation
Settlement
Base
USDC · eip155:8453
Install
1 line
npx · npm i
$ npx @foreseal/demolocal · no real USDC · ~1s
Gate engaged · unpaid GET → 402 PAYMENT-REQUIRED
Paid GET → 200 + X-BYTE-Attestation
Agenuine receipt, trusted attesterACT ✓
Bone tampered byte (64000 → 99999)REFUSE ✗
Cforged receipt (attacker self-signs)REFUSE ✗
Dmissing / empty receiptREFUSE ✗
Erewritten domain (chainId 1)REFUSE ✗
Fbinary (non-UTF-8) payloadACT ✓
✓ every attack refused — only intact, trusted bytes were acted on.

Act on the green. Refuse the red. No install, no signup, no wallet — the whole loop runs locally.

How to use it — both sides

One receipt. Two sides.

A data provider mounts the Gate and stamps every paid response. An agent runs the Kit and verifies before acting. One provider on the Gate makes their data verifiable by every agent on the Kit.

The Gate — stamp the receipt

Seller

Front any x402 endpoint. Every paid response carries a verifiable receipt over the exact bytes served — tamper-evident by default, provably yours when you sign with your own key.

#npm i @foreseal/gate express
import { trustMiddleware } from "@foreseal/gate";
app.use("/quote", trustMiddleware({
upstream: "https://my-api.internal/quote",
price: { perCallUsdc: "0.05" }, payTo,
}));
200 + X-BYTE-Attestation over the exact bytes
PKG · @foreseal/gate

The Kit — verify before acting

Buyer / agent

Recompute the keccak256 hash of the bytes you received and check them against what the publisher attested. If they don't match, don't act.

#npm i @payperbyte/sdk
import { verifyPayload, HashMismatchError } from "@payperbyte/sdk";
try {
verifyPayload(receivedBytes, expectedHash);
# match → safe to act on the bytes
} catch (e) {
! if (e instanceof HashMismatchError) /* do NOT act */
}
PKG · @payperbyte/sdk
The demo

One command. Watch it decide.

The demo plays six scenarios past an agent — one genuine response and four attacks (a tampered byte, a forged signature, a missing receipt, a forked signing domain), plus a binary payload that survives verbatim. It acts on the two genuine payloads and refuses every attack, in about a second. No real USDC.

$npx @foreseal/demo
Recorded 2026-06-15 · the live run of npx @foreseal/demo.
Get started

Three packages. All on npm.

#see it run (no install, no wallet)
$npx @foreseal/demo
#buyer — verify before acting
$npm i @payperbyte/sdk
#seller — stamp the receipt
$npm i @foreseal/gate
#the 15-tool agent interface
$npx -y byte-mcp-server