Get desktop application:
View/edit binary Protocol Buffers messages
─── TOP-LEVEL MESSAGE FIELDS ────────────────────────────────────────── Fields 1-5: identical to Bitswap 1.2.0 (never modified)
deprecated since 1.1.0
type=2 means PAYMENT_REQUIRED
Fields 6-9: NEW in 1.3.0 (safe unknown fields for old parsers)
server → client
client → server
server → client
server → client
─── EXISTING: Block payload (unchanged from 1.1.0) ─────────────────────
Used in:
CID prefix: version + codec varint
raw block bytes
─── EXISTING: BlockPresence (unchanged structure, extended enum) ────────
Used in:
Now can be 0, 1, or 2
─── EXTENDED: BlockPresenceType — NEW value PaymentRequired = 2 ────────
Used in:
server has the block
server genuinely does not have the block
[NEW 1.3.0] server has the block but requires payment
─── NEW 1.3.0: PaymentAuthorization — client's signed proof of payment
Used in:
CID being paid for
Client's wallet address
Must match PaymentTerms.pay_to
Must be >= PaymentTerms.amount
EIP-3009 validAfter (typically 0)
EIP-3009 validBefore
Must match PaymentTerms.nonce exactly
ECDSA signature recovery id (27 or 28)
ECDSA r component (32 bytes)
ECDSA s component (32 bytes)
Must match PaymentTerms.scheme
─── NEW 1.3.0: PaymentReceipt — server confirms payment accepted
Used in:
CID now authorized to be served
On-chain tx hash (empty in OPTIMISTIC mode)
Unix ts: this authorization is valid until this time
─── NEW 1.3.0: PaymentRejection — server rejects a PaymentAuthorization
Used in:
"INVALID_SIGNATURE" | "WRONG_AMOUNT" | "NONCE_USED" | "EXPIRED"
─── NEW 1.3.0: PaymentTerms — embedded in Message when type=PaymentRequired
Used in:
CID of the gated block
Token contract address
Server's wallet address
Amount in token's smallest unit
Chain identifier: "base-sepolia" | "base-mainnet"
Random 32 bytes — per-offer, prevents replay attacks
Unix timestamp: offer expires after this
Actual block size in bytes
Human-readable description
Payment scheme: "exact" (EIP-3009)
─── EXISTING: Wantlist (unchanged from 1.2.0) ─────────────────────────
Used in:
true = authoritative wantlist replacement
Used in:
CID bytes (CIDv1 binary)
higher = serve first; default 1
true = remove from wantlist
Block or Have
server MUST respond DONT_HAVE if missing
Used in:
default: client wants the full block
client only wants to know if server has it