SeatRelist

/ SeatRelist · the docs

Ticketing with fair resale built in.

Issue tickets for your event, route face-value resale through your waitlist, and verify the current holder at the gate. Pick a flow below to see who signs, who pays gas, and what the contract checks.

New here? Replay the 2 tUSD8 receipt

/ Buyer mode

Buyer wallet · offline Seller receives 2 tUSD8 · Ticket #1 moves

/ Outcome & tier

/ Why it exists

A buyer on a sold-out waitlist misses their offer the moment they go offline. On QDay Aevum, SeatRelist settles face-value resales in tUSD8 using EIP-3009 standby permits and EIP-712 gate check-in— so the contract pays the seller and moves the ticket in one transaction, with zero custody and zero markup.

/ Contents

5 parts. Start anywhere.

Every guide, contract rule, REST endpoint, MCP tool, recorded receipt, and organizer runbook lives on this page—searchable below and copyable as clean Markdown.

Jump to searchable reader
  1. 01 Guide & ticket desk 6 views Walk through every screen in the browser app: directory, checkout, waitlist, tickets, gate, and receipts.
  2. 02 Architecture & contract 5 topics Sources of truth, Solidity ticket lifecycle, EIP-712 gate permits, FIFO recovery, and standby nonces.
  3. 03 Integration API & MCP 6 topics Public state routes, unsigned calldata preparation, SIWE sessions, Streamable HTTP MCP tools, and hosting variables.
  4. 04 Testnet demo & evidence 4 topics Verified QDay Aevum deployments, block 4,420,007 standby receipt, version 2 rehearsal, and local reproduction.
  5. 05 Pilot operations 4 topics Organizer setup, venue door workflow, operator recovery CLI, cancellation funding, and CSV reconciliation.

/ One desk

Everything runs from one ticket desk. Every part has a guide.

/ How it’s built

The event contract settles tickets and payments on-chain.

Architecture specification
FIG · WHO TOUCHES WHAT — ATOMIC TICKET SETTLEMENT YOUR BROWSER OR MCP AGENT Ticket desk / MCP client /app · /mcp Attendee wallet SIWE · EIP-3009 · EIP-712 Door QR scanner Gate wallet submits permit SEATRELIST SERVICE SQLite FIFO queue Durable Object · 1k-block index Queue worker Journaled tx · Pays tQDAY gas Push & Relayer Offer alerts · v2 gas sponsor QDAY AEVUM · CHAIN 44005 EVENT CONTRACT Seller wallet +2 tUSD8 exact Ticket ledger Holder v2 · 1-use Receipt logs Public explorer CONFIRMED LOGS DRIVE QUEUE & PUSH 1 2 3 4
1Buyer signs a SIWE session and optional EIP-3009 one-ticket authorization scoped to event, category, exact face price, and deadline. 2When a holder lists a seat, the worker simulates against live state, journals its tx before broadcast, and pays tQDAY gas. 3The SeatRelist contract collects exact tUSD8, forwards 100% to the seller, and bumps ticket ownership version atomically. 4Confirmed logs update My tickets, push notifications, and gate checks—old holder permits become invalid immediately.

/ Documentation

Complete technical reference.

/ 01 · Guide & ticket desk

Using the SeatRelist ticket desk

Everything an attendee, seller, gate operator, or organizer does inside the browser app—and how to verify settled receipts with no wallet connected.

60-second replay & local Docker start

Inspect the recorded version 3 settlement without connecting a wallet at Receipts → Automatic standby purchase. Check Buyer paid, Seller received, and Ticket now held by for ticket #1 on block 4,420,007.

Docker · local ticket desk
docker build -t seatrelist:demo .
docker run --rm -p 127.0.0.1:8787:8787 seatrelist:demo

Open http://127.0.0.1:8787 to replay the saved receipt or open Lantern Sessions with Aevum Testnet tokens.

Ticket desk screens

  • Find events — Searches SeatRelist events by date, artist, team, or venue. Each listing opens the testnet ticket desk.
  • Tickets — Displays category capacity, wallet balances, waitlist progress, countdown timers, and optional browser push opt-in.
  • My tickets — Shows confirmed ownership and history for the active wallet. Checkout stores its purchase ID and tx hashes locally so Resume recovers reloads or dropped networks.
  • Gate — Lets a current holder sign an EIP-712 QR permit for a specific enabled gate; staff can scan via camera, upload a QR image, or paste the signed JSON.
  • Receipts — Independently verifies tUSD8 transfers, payouts, reservations, and check-ins directly against on-chain logs.
  • Organizer — Deploys and registers version 6 events, updates metadata and gate epochs, imports invited wallets, inspects worker health, cancels events, releases escrow, and exports CSV reconciliation.

One-ticket standby auto-buy (Version 3)

On a sold-out version 3 or later category with an active worker, join the waitlist and select Allow auto-buy for one ticket. Your wallet signs a single EIP-3009 authorization bound to the exact face value and deadline.

If the authorization expires, is revoked, or lacks balance when your turn arrives, the worker falls back to an ordinary manual reservation for your wallet instead of charging anything.

/ 02 · Architecture & contract

On-chain rules & queue projection

Solidity 0.8.28 (Shanghai) enforces one buyer per offer, exact face-value settlement, holder-only admission, and refunds after cancellation. Version 6 escrows primary payments and import deposits, issues locked ERC-721 tickets, and supports sponsored refunds and standby revocation. For uncancelled events, escrow can be released when check-in closes in V6 and when it opens in V5.

Components & sources of truth

The event contract is authoritative for payments, ownership and admission. V6 and the V5 FIFO build assign waitlist entry IDs and enforce FIFO for eligible buyers. Earlier builds use SQLite for queue membership and ordering.

ComponentResponsibility
Solidity event contractOne deployment per event. Stores categories, prices, capacities, treasury, windows, holders, listings, offers, gate epochs, check-ins, and refunds.
TypeScript serviceRegisters deployments, verifies SIWE sessions, stores legacy queues and standby permissions, indexes confirmed logs in 1,000-block pages, and serves reports.
Reservation workerSelects the next eligible wallet, simulates live state, journals signed transactions before broadcast, and pays gas for offers and standby fills.
Optional relayer (v2)Separate funded signer that forwards an attendee’s signed EIP-3009 authorization for an active manual offer.

Ticket lifecycle

Window ordering is strictly enforced at deployment: saleClose <= resaleClose <= checkInOpen < checkInClose.

Held Listed Reserved Held (v+1) Checked in Refunded

Contract operations

FunctionEnforced contract rules
buyPrimary(tierId, purchaseId)The buyer pays the exact category price from ERC-20 allowance. Enforces capacity and prevents duplicate tickets per wallet + purchase ID. V5 and V6 hold the payment in escrow.
buyPrimaryWithAuthorizationVersion 5 gas-free primary checkout. Any relayer submits the buyer’s EIP-3009 authorization. The nonce binds chain, event, category, buyer, purchase ID, and price, and the ticket always goes to the signer.
listForResale(ticketId)Current holder of an unused ticket lists once its category sells out and before resaleClose. Holder keeps admission until sold.
reserveOffer(...)Service-managed queues accept the buyer selected by the queue operator. Listing and last offer IDs prevent stale transactions.
reserveNextOffer and reserveNextStandbyOfferVersion 5 checks the expected entry ID against nextWaitlistBuyer(ticketId) and rejects attempts to skip an eligible buyer. WaitlistOfferAllocated links entry, buyer, ticket and offer.
acceptOffer(ticketId, offerId)Reserved buyer pays exact face price directly to seller, increments ownership version, emits TicketResold. Failed transfer reverts both.
acceptOfferWithAuthorizationVersion 2 gas-sponsored resale using an EIP-3009 nonce bound to chain, event, ticket, listing, offer, buyer, seller, and amount.
reserveStandbyOfferVersion 3 atomic standby fill. Worker attaches the buyer’s scoped EIP-3009 authorization, pays seller, and transfers the ticket in one tx.
importTicketsVersion 4+ organizer issuance before primary sales close. Replacements count toward capacity and cancellation refunds. V5 and V6 pull their face value from the organizer into escrow at import. The organizer must void the original tickets with their issuer.
checkIn(...)An enabled gate submits the holder’s EIP-712 permit. V5 and V6 accept ERC-1271 contract wallets. The desk supports variable-length signatures for login, waitlist updates and the gate permit.
cancelEvent() / claimRefund(ticketId)In V6, the organizer can cancel before the first admission and before check-in closes. Anyone can submit the claim after cancellation. Escrow pays the current holder face value once. Versions 2–5 close cancellation when check-in opens. Versions 2–4 require treasury funding.
releaseProceeds()Anyone can release proceeds on an uncancelled event once check-in closes in V6 or opens in V5. Pays the treasury the escrow minus the immutable service fee (at most 1%, primary sales only).

EIP-712 gate permits & standby nonces

Holders sign ticketId, ownershipVersion, holder, gate, gateEpoch, and deadline under domain SeatRelist v1 (legacy Aevum deployments use SeatRelay v1). Any resale bumps ownershipVersion; revoking and re-enabling a gate bumps gateEpoch, instantly invalidating prior QR codes.

For version 3 standby, the EIP-3009 nonce commits to chain ID, event, category, buyer, face price, a random orderRef, and the buyer’s purchase counter in that category. Any purchase advances the counter and invalidates overlapping authorizations signed on other devices.

Queue allocation & reorg rewind

The service indexes from deployment in pages of up to 1,000 blocks, storing events alongside each page’s block hash. On a block hash mismatch it rewinds to the latest matching checkpoint and rebuilds on-chain queue enrollment from canonical logs. Earlier event queues remain in SQLite. The worker journals signed transactions before broadcasting them.

/ 03 · Integration API & MCP

HTTP routes, calldata & agent tools

On-chain prices, ticket IDs, and offer IDs are encoded as decimal strings (6 decimals for tUSD8: 2 tUSD8 = 2000000). Chain timestamps use Unix seconds; SIWE expiry uses Unix milliseconds.

Public endpoints

RoutePurpose
GET/eventsChain config, event registry, contract versions, relayer availability, and VAPID push key.
GET/healthWorker mode, indexed block cursor, last sync timestamp, pending reservation hash, and latest diagnostic issue.
GET/transactions/{hash}Pending, successful, or reverted transaction state and confirmation count.
GET/events/{addr}/tiers/{id}Price in base units, sold, capacity, sale/resale/gate windows, chain time, and worker readiness.
GET/events/{addr}/tickets/{id}Holder, ownership version, listing ID, active offer, check-in window, and refund status.
GET/events/{addr}/receipts/{hash}Reconciled sales, payouts, refunds, standby revocations, reservations and check-ins. Includes the wallet that paid gas.
POST/events/{addr}/prepareReturns ordered unsigned transaction requests ({ to, data, label }) for the caller’s wallet to sign.
POST/events/{addr}/check-in-permitReturns EIP-712 domain, types, primaryType, and message for { ticketId, holder, gate }.

Prepare calldata actions

Send { action, wallet, ...fields } to POST /events/{address}/prepare. Actions include buy (with nonzero bytes32 purchaseId), list, withdraw, accept, check-in, revoke-standby (V3 onward), refund (V2 onward), gate-role, queue-operator, import-tickets (V4 onward), fund-cancellation (V2–4), cancel-event, and release-proceeds (V5 onward).

For gas-free primary checkout, get payment terms from POST /events/{address}/primary-authorization, then submit the signature to POST /events/{address}/relay. On V6, current holders can also send { action: "refund", ticketId } to the relay after cancellation.

SIWE wallet sessions, waitlist & standby routes

  1. Call POST /auth/nonce with { address }, sign the exact SIWE challenge, then submit to POST /auth/verify to get a Bearer token.
  2. Use GET /events/{addr}/tiers/{id}/queue/me to read state and position. Versions 1–4 accept PUT to join and DELETE to withdraw. For on-chain queues in versions 5 and 6, use POST with { join } to prepare a wallet-signed update, then send its entry ID, deadline and signature on PUT or DELETE.
  3. For V3 and later, POST .../queue/me/standby with { entryId, validBefore } to fetch EIP-3009 typed data, sign in the buyer wallet, then PUT with { entryId, orderRef, validBefore, signature }. V6 buyers can revoke on-chain and keep their queue entry. Ask POST /events/{address}/standby-revocation for typed data, then send the signed revocation to the relay. V3–5 also accept DELETE to discard the order at the worker.

Agent integration via Streamable HTTP MCP

Connect any Streamable HTTP MCP client to https://www.seatrelist.xyz/mcp (or http://127.0.0.1:8787/mcp locally). Tools enforce contract prices and restrict Aevum payments to official tUSD8—arbitrary calldata and recipients are outside the schema.

MCP ToolBehavior
search_testnet_eventsFinds registered v3 categories with live on-chain price, token, observation block, and waitlist_open status.
join_waitlistEnrolls a SIWE-authenticated buyer for free within maxPrice; anonymous clients receive a sign-in review link.
prepare_standby_authorizationBuilds an unsigned EIP-3009 standby draft capped at min(chainTime + 3600, resaleClose) plus a same-origin reviewUrl for human wallet signing.
MCP · example tool call
{"tool": "search_testnet_events", "arguments": {"event": "Lantern Sessions", "maxPrice": "2"}}

Organizer endpoints

Under the organizer’s SIWE session: GET /organizer/permissions, POST /organizer/prepare-event, POST /organizer/register-event, GET /events/{addr}/admin, PUT .../admin/details, PUT/DELETE .../admin/access, POST .../admin/import, and GET .../admin/report?format=csv.

Hosting & environment variables

The hosted desk serves static files from Vercel and API/queue alarms from a Cloudflare Worker backed by one SQLite Durable Object. Local Node and Docker instances use these variables:

VariableDefault & purpose
SEATRELIST_ORIGINhttp://127.0.0.1:8787 — Exact origin bound into SIWE messages and CORS.
SEATRELIST_DBdata/seatrelist-{chainId}.sqlite — Persistent writable path for queues, sessions, and push keys.
SEATRELIST_DEPLOYMENTSdeployments/aevum.json — Registered contract manifest per chain.
SEATRELIST_OPERATOR_KEYFunded queue operator private key. Omit for read-only receipt replay.
SEATRELIST_RELAYER_KEYOptional separate funded signer for v2 gas-sponsored resale.
SEATRELIST_CONFIRMATIONS2 — Confirmation depth before indexing confirmed logs.
SEATRELIST_OFFER_SECONDS90 — Default manual offer window, clamped by contract limits.

/ 04 · Testnet demo & evidence

Recorded settlements on QDay Aevum

Chain ID 44005 · Official 6-decimal tUSD8 token · Verified source contracts and live transaction receipts.

Standby checkout on Aevum (Block 4,420,007)

The public version 3 showcase settled ticket #1 for 2 tUSD8 while the buyer’s ticket desk was closed. The Cloudflare Durable Object worker paid tQDAY gas, the seller received 2,000,000 base units directly, and ownership moved in the same transaction.

Inspect the 2 tUSD8 receipt in-app · Verify tx on Aevum Explorer ↗

Verified testnet contracts

Version 2 rehearsal highlights

  • Recovered primary purchase — Wallet resumed the same purchaseId after a forced reload and issued exactly one ticket.
  • Automatic reassignment — Worker offered the listed ticket to the next wallet 3 s after the first offer expired.
  • Sponsored payout & door recovery — Relayer paid gas for 1 tUSD8 resale; old holder permit rejected on chain; gate check-in confirmed in 3.47 s after reconnect.
  • Funded cancellation — Treasury funded a 1 tUSD8 refund pool and current holder claimed through My tickets.

Reproduce & verify locally

Shell · full local test suite
pnpm install --frozen-lockfile
forge build
pnpm contracts:export
forge test
pnpm test
pnpm test:browser
pnpm service
CLI · independent receipt & report check
pnpm cli report 0x8f21B4E677Ed0d48d086750117e21930964bca04 --csv
pnpm cli receipt 0x8f21B4E677Ed0d48d086750117e21930964bca04 0x71e1eca6dec42012390f59a22382b0e0e369377f340d54d23ea6279e596c390d

/ 05 · Pilot operations

Running a real venue pilot

Checklist for event configuration, door operations during outages, operator recovery, and financial reconciliation.

Configure the event

  1. Deploy from Organizer with separate treasury, queue operator, and gate wallets. Verify sale, resale, and gate window timestamps.
  2. Fund the queue operator and gate wallets with tQDAY gas (plus a separate relayer if enabling v2 sponsored resale). Run exactly one worker per SQLite database and back up SQLite safely with its WAL.
  3. For invitation-only events, enable waitlist restriction and import wallet,reference rows using opaque attendee IDs kept in your own registry.
  4. Serve over HTTPS so mobile wallets, camera scanning, and closed-tab browser push notifications work reliably.

Replace tickets sold elsewhere

Create a version 6 event with the matching categories, face values, and capacity. Verify the holders’ wallets. Before issuing replacements, void the original tickets with Loket, Ticketmaster, or the original issuer. SeatRelist cannot verify or void external tickets. Use the SeatRelist ticket list at the gate.

Before primary sales close, open Organizer → Replace previously sold tickets and paste up to 50 wallet,category rows at a time. Use a category name or number such as #1. Confirm the originals were voided and select Issue replacement tickets. If prompted, approve the batch’s total face value from the organizer wallet, then confirm the import. Holders open My tickets to see their replacements and use standard resale and check-in.

Each replacement consumes one category seat. At import, the organizer deposits its face value into escrow. If the organizer cancels before the first admission and before check-in closes, anyone can submit the refund claim on-chain. Escrow pays the ticket’s current holder its face value once.

At the door

  • Match the selected event and gate wallet. Holders select that gate and sign a short-lived QR permit; staff can fall back to Read QR image or paste JSON if camera access fails.
  • Admit only after the app reports a confirmed on-chain check-in. During a network outage, hold entry and switch to a backup hotspot or enabled second gate (which requires its own fresh permit).
  • Revoke a lost gate wallet immediately in Organizer; re-enabling advances its role epoch so old permits cannot replay.

Worker diagnostics & manual recovery

Inspect indexed block, pending hash, nonce, and operator gas inside Organizer. Stop the running worker before executing manual CLI recovery against the same SQLite database:

CLI · queue recovery
pnpm cli queue-once <event-address>
pnpm cli queue-recover <event-address>
pnpm cli gate-role <event-address> <gate-wallet> disable

Cancellation funding & CSV reconciliation

In V6, buyers fund escrow at primary sale and organizers fund it at import. The organizer can select Cancel event before the first admission and before check-in closes. After cancellation, anyone can submit a claim on-chain, and escrow pays the current holder face value once. Current holders can request a sponsored refund in My tickets.

In V5, escrow backs refunds and cancellation closes when check-in opens. Versions 2–4 also close cancellation when check-in opens and require treasury funding.

Export the CSV after the final check-in or refund to reconcile primary sales, resale payouts, and refunds separately.

Start with the recorded 2 tUSD8 receipt, or open the ticket desk.