Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for MeshTab

Inspiration

When a storm or a blackout hits, the internet goes first. Card terminals stop, banking apps stop, and cash runs out. But people still need water, food and medicine, and small shops still need to get paid. We asked: what if a town could keep paying each other with no internet at all, and let PayPal and an AI sort everything out once anyone is back online?

What it does

MeshTab is offline community payments for blackouts, disasters and places with unreliable internet.

  1. Load with PayPal (online). Before the storm, an aid organiser pays once with PayPal (Orders v2). One checkout can fund several phones, for example $65 split into Alice $30, Dave $15 and Eve $20. The money is held in escrow, and the gateway gives each phone a signed balance certificate.
  2. Pay offline. With no internet, a phone pays by signing an Ed25519 voucher that is linked into the payer's hash chain. Vouchers hop phone to phone over the mesh. The shop checks the signature and the balance certificate offline.
  3. Catch cheaters. If someone copies a wallet and spends the same money twice ("Evil Eve"), the first phone that sees both vouchers holds a signed proof of the double-spend. The proof spreads, and every phone refuses the cheater.
  4. Settle with AI and PayPal (back online). Any phone uploads what it saw. Code checks every signature and settles from escrow. Then a Claude AI settlement agent uses the PayPal Agent Toolkit (get_order) to confirm each PayPal load, scores the risk of each payer, and explains it in plain language. Clean payments go out with PayPal Payouts. Risky ones wait for a person to approve.

Code decides what is valid. The AI only scores risk and explains. The AI can add a hold, but it can never remove one.

How we built it

  • Protocol (TypeScript): Ed25519 vouchers (@noble/ed25519), per-payer hash chains, fork (double-spend) proofs, and a deterministic settle() function. 15 unit tests, including a fixed test vector.
  • Gateway (Node.js, Express): PayPal Orders v2 (PayPal button, plus a one-call sandbox test-card flow so judges need no PayPal login), PayPal Payouts with status polling, webhook verification, a settlement policy, approval limits and rate limits.
  • AI agent: Claude Opus 5.5 (via OpenRouter, with the Anthropic TypeScript SDK tool runner). Claude has two tools: paypal_get_order from the PayPal Agent Toolkit, and record_assessment. Voucher memos never reach the model, which blocks prompt injection from payers. If the AI is not available, a rule-based fallback takes over.
  • Web app (React, Vite): the "Mesh Lab" simulates five phones in a town, with drag-to-move Bluetooth range, an internet switch, Evil Eve and the settlement panel. An AG Grid ledger console shows every voucher, payer and PayPal order.
  • Hosting: one Node process behind nginx on a small Linux VPS. Secrets live only in environment variables.

Challenges we ran into

  • An offline system cannot stop a double-spend at the moment it happens. So we designed MeshTab to limit it (a cap per voucher and an escrow cap), detect it early (gossip and fork proofs), settle from escrow, freeze the cheater, and send any shortfall to a person.
  • The PayPal Agent Toolkit has no Payouts tool. So Claude uses the Toolkit to check orders, and the gateway calls the Payouts REST API.
  • The AI got one case wrong at first. One $65 PayPal order funded three wallets, but Claude saw only two of them and put an honest payer on hold. We now send the full order split to Claude, and it clears her correctly.
  • The Toolkit kept its PayPal token forever. PayPal tokens expire after about 9 hours, so the live demo failed the next morning. We now create a fresh Toolkit for each order check.

Accomplishments that we're proud of

  • Real PayPal sandbox money moves end to end: Orders v2 capture, Agent Toolkit get_order, and Payouts reaching SUCCESS.
  • A real Claude agent that explains its decisions in plain language, and is fair to honest people: when one payer cheats, it says clearly that the receivers did nothing wrong.
  • A demo anyone can try in a browser with no login.

What we learned

  • Keep the AI in the right role. Cryptography and code decide validity; the AI adds judgement and explanations on top, and can only make the system safer.
  • Give the AI the full context. Its mistake came from missing data, not from bad reasoning.
  • Test a live service the next day too. Some bugs only appear after hours.

What's new compared with Bitchat

Bitchat (GPL-3.0) proved that phones can chat over a Bluetooth mesh with no internet. MeshTab adds money: PayPal-backed balance certificates, signed payment vouchers with hash chains, double-spend proofs, deterministic settlement, and an AI settlement agent with PayPal Payouts.

Honest note: in this demo the Bluetooth mesh is simulated in the browser. The cryptography, PayPal and AI parts are real.

What's next for MeshTab

  • A payment message type in a Bitchat Android fork, so real phones pay over real Bluetooth.
  • Each payee links their own PayPal account, and a community pool covers shortfalls.
  • A database instead of memory, PayPal webhooks for payout status, voucher expiry and daily limits.
  • Going live only after PayPal review, KYC, and legal advice for each country.

Built With

  • ag-grid
  • anthropic
  • claude
  • claude-opus-5.5
  • ed25519
  • express.js
  • ngnix
  • node.js
  • openrouter
  • paypal
  • paypal-agent-toolkit
  • paypal-js-sdk
  • paypal-orders-api
  • paypal-payouts-api
  • paypal-webhooks
  • react
  • typescript
  • vite
  • vitest
Share this project:

Updates

Submission history