Skip to content

feat(explorer): add MPP voucher receipt page#865

Open
decofe wants to merge 1 commit intomainfrom
georgios/voucher-receipt
Open

feat(explorer): add MPP voucher receipt page#865
decofe wants to merge 1 commit intomainfrom
georgios/voucher-receipt

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 18, 2026

Summary

Adds a /receipt/voucher route to the block explorer that renders offchain MPP payment channel state from a signed voucher. Users can paste a voucher via URL params (channelId, cumulativeAmount, signature) to inspect the current state of a payment channel.

Motivation

For long-running MPP sessions, offchain state is invisible between channel open and close. This gives clients and servers a way to inspect the current channel state by combining on-chain data with a signed voucher — essentially a "channel inspector" embedded in the explorer.

Came from this discussion about improving visibility for MPP sessions.

Changes

  • apps/explorer/src/routes/_layout/receipt/voucher.tsx — new route that:
    • Reads channel state on-chain via getChannel on the stream channel escrow contract
    • Verifies the voucher signature via EIP-712 typed data recovery against authorizedSigner
    • Renders a receipt-style card with:
      • Channel header (status, channelId, payer, payee, token)
      • On-chain section (deposit, settled, close-requested timestamp)
      • Off-chain section (cumulative voucher amount, unsettled delta)
      • Remaining balance
      • Signature footer with copy button
    • Shows "Unverified signature" banner when recovery fails
    • noindex,nofollow,noarchive to prevent search engine indexing of voucher URLs
  • apps/explorer/src/routeTree.gen.ts — wired up new route

Usage

/receipt/voucher?channelId=0x...&cumulativeAmount=1000000&signature=0x...

Prompted by: georgios

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

Bundle Size Report

Metric Size Δ Change
Total 4.3 MB +72.9 KB (+1.7%)
Gzip 1.2 MB +20.8 KB (+1.7%)
Brotli 1.1 MB +18.3 KB (+1.7%)
Chunk changes (>1KB)
Chunk Change
assets/AbiItem.js (removed) -27.1 KB
assets/queries.js -26.1 KB
assets/queryOptions.js -11.8 KB
assets/validators.js (removed) -5.1 KB
assets/chains.js -4.8 KB
assets/Receipt.js -2.6 KB
assets/.js +1.7 KB
assets/known-event-totals.js (new) +2.0 KB
assets/ReceiptMark.js (new) +2.9 KB
assets/schemas.js +7.5 KB
assets/VirtualAddress.js (new) +12.9 KB
assets/voucher.js (new) +16.0 KB
assets/parseAbiItem.js (new) +25.0 KB
assets/wagmi.config.js +26.7 KB
assets/tip20.js (new) +52.4 KB

Compared against main branch (baseline from 4/27/2026, 4:02:54 PM)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

Cloudflare Deployments

App Environment Status Preview
explorer devnet [OK] Deployed -
explorer mainnet [OK] Deployed -
explorer testnet [OK] Deployed -
fee-payer devnet [>>] Skipped No changes
fee-payer moderato [>>] Skipped No changes
fee-payer privy [>>] Skipped No changes
og - [>>] Skipped No changes
perf - [>>] Skipped No changes
tokenlist - [>>] Skipped No changes

Adds /receipt/voucher route that renders offchain payment channel state
from a signed MPP voucher. Accepts channelId, cumulativeAmount, and
signature as URL search params.

- Reads channel state on-chain via the stream channel escrow contract
- Verifies voucher signature via EIP-712 typed data recovery
- Shows on-chain state (deposit, settled) alongside offchain state
  (cumulative amount, unsettled delta, remaining balance)
- Displays channel status (open/closing/closed) and participants
- Unverified signatures show a warning banner
- noindex/nofollow to prevent voucher URL leakage via search engines

Co-Authored-By: Georgios Konstantopoulos <17802178+gakonst@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d9db9-63d7-70bb-be99-3c3693f8db6b
@o-az o-az force-pushed the georgios/voucher-receipt branch from 901d160 to 3e8b77a Compare April 30, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants