Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

FlyGate

Agent that finds and holds your flight, only spend what you approve, enforced on-chain with post-quantum signatures

Share on X

About

Would you give an AI agent your credit card? Today an agent either asks you at every step, or holds your whole card. FlyGate is a flight-booking agent you don't have to trust. You type one sentence ("Taipei to Tokyo Dec 20, economy, refundable, under $400"), your email, and the traveler's details. No wallet, no payment. The agent then works in the background: it searches real airline offers (Duffel test mode), runs every offer through a rule gate, and holds the best match for free with a Duffel hold order. Then it emails you a review link. You open the link (even on your phone), see the exact flight, price and hold deadline, and approve it with one QoreX wallet signature. That signature opens an on-chain mandate narrowed to exactly that fare: one ticket, price cap = the fare, same route, day, cabin and refund rule, and deposits exactly that amount into the FlightEscrow contract. Only then can the agent book. The money waits in escrow. The merchant pays the held order, gets a real booking reference, and signs a ticket proof with ML-DSA-87. The contract releases the money only after verifying that proof. If payment fails, the contract refunds immediately. If you never approve, the hold simply lapses and nothing is spent. Every authorization and quote is signed with ML-DSA-87 (post-quantum), and traveler data is encrypted in your browser to the merchant with ML-KEM-1024. Even an attacker with the agent's key, or a future quantum computer that breaks ECDSA, cannot raise the cap or send money anywhere else. TX hash : https://explore.qore.network/address/0xb66F174834A082cee16e7BaCC17Cb1305361C186

How it's made

Architecture - Next.js 16 (App Router, React 19, Tailwind 4). A background job started with after() searches, gates and holds the flight; trip state is stored server-side, and the owner gets an HMAC-signed review link by email (Resend). - FlightEscrow (Solidity, Foundry), deployed on the QoreChain diana testnet: openMandate / book / confirmTicket / cancel / closeMandate. The contract checks the merchant's PQC key status (pqcKeyStatus) and verifies its ML-DSA-87 quote and ticket proofs on-chain (pqcVerify), enforces the mandate rules (fare cap, route, date, cabin, refund rule, ticket count), and locks funds until a valid ticket proof arrives. - Duffel Flights API (test mode): offer search, hold orders (type: "hold"), an order re-read before quoting, and balance payments, so the booking reference on the ticket is a real Duffel one. QoreChain kits and network features used - @qorechain/sdk (TypeScript) for every server-side transaction. Agent, merchant and deployer accounts register their ML-DSA-87 keys with proof of possession and send hybrid (secp256k1 + ML-DSA-87) signed transactions. - QoreX wallet, integrated directly through window.qorex.native.signAndBroadcast: in one atomic transaction the owner sends a MsgSend deposit plus a MsgCrossVMCall (Native → EVM) to openMandate, so the Cosmos and EVM lanes are used together. - EVM windows (MsgOpenEVMWindow, scoped) so the agent's signer can call the contract. - Solidity PQC precompiles: pqcKeyStatus and pqcVerify (ML-DSA-87 signature, 4,627 bytes). - ML-KEM-1024 (@noble/post-quantum) to encrypt passenger data in the browser to the merchant; the server decrypts it only at the moment it creates the hold. - A browser session key whose hash is bound into the on-chain mandateHash, so the server acts for an owner only on requests that present that key. What was hard - QoreX refuses signArbitrary, EVM transactions and account-authority messages from websites, so our first design (linking the agent as an authenticator with spending rules) was impossible. We moved the money into the contract instead, and measured on diana that MsgSend + MsgCrossVMCall run atomically with the owner as msg.sender (ADR-0003). - Not asking for money before the user sees the flight. We redesigned the flow around Duffel's free hold: the agent holds first, and the owner approves one exact fare (ADR-0005). - Never double-spending: every chain broadcast and Duffel payment is idempotent and never retried. If the held price rises above the approved amount, the merchant refuses before book(), and a failed payment triggers cancel() with an immediate refund. - Prices can change after a hold's price guarantee ends, so the merchant always re-reads the order from Duffel before signing the quote.

Timeline

FlyGatePost-Quantum AI Agents

Pushed 1 commit to main

  • 6c76c3f Rewrite the README, FLOW and PITCH for the hold-and-approve flow · abcd5251
FlyGatePost-Quantum AI Agents

Pushed 85 commits to main

  • 618b603 Merge pull request #38 from abcd5251/docs/english · abcd5251
  • 820d4fb Add the MIT license and AI_USAGE.md · abcd5251
  • e80dafc Merge pull request #37 from abcd5251/develop · abcd5251
  • 46ff994 Add the MIT license and AI_USAGE.md · abcd5251
  • 98520e0 Translate the docs and probe script output to English · abcd5251

and 80 more commits

FlyGatePost-Quantum AI Agents

New project.

Comments and questions

  • No comments yet.