Skip to content
QORECHAIN
Register

Quantum Pass

Bervis

Crypto invoicing with post-quantum signatures on every payment

Share on X

About

A crypto payment can succeed even when the invoice is wrong. If someone swaps the receiving address on an unsigned bill, the payer can approve a perfectly valid transfer to the wrong wallet. The transaction hash shows where the money went, not whether the issuer asked for it to go there. Bervis ties the issuer’s payment instructions to the payer’s transfer. The issuer signs the invoice in QoreX and shares a link. Bervis checks the amount and receiving address against that signed version before checkout. Change either detail and checkout stops. When the payer approves, QoreX signs the transfer and its invoice reference together using both a classical signature and ML-DSA-87. A payment for one bill can’t pass as proof for another, even if both ask for the same amount.

How it's made

We started with the Diana fullstack-web template from create-qorechain-dapp and built Bervis in Next.js and TypeScript. The browser uses @qorechain/qorex-types to request signatures from QoreX. Next.js API routes read the resulting transactions from Diana. - Issuing an invoice: Bervis hashes the invoice terms with SHA-256 in a fixed order, including the invoice ID, revision, title, amount and receiving address. The issuer signs a transfer of 1 uqor (0.000001 test QOR) back to their own wallet, with that hash in the memo. This records exactly which terms they approved without publishing the invoice title on chain. Changing the amount or address produces a different hash and requires a new signature. - Paying a revision: Before opening QoreX for payment, Bervis checks the invoice against the issuer’s transaction. The payer then signs a native MsgSend for the exact amount. Its memo includes both the invoice hash and the issuer’s transaction ID. Even when two bills have the same amount and recipient, a payment for one won’t verify against the other. - Verifying settlement: The hardest part was deciding when to show Paid. QoreX can return a transaction ID before Diana confirms the transfer. Bervis waits for a successful transaction and checks the amount, denomination, recipient and memo. For both the invoice and payment, it checks the classical signature evidence, the ML-DSA-87 signature, and Diana’s pqc_hybrid_verify event for the signer. If indexing is delayed, Bervis rechecks the same ID rather than sending another transfer. - Storing receipts: SQLite keeps one short-link record per issuer transaction. The server verifies the payment on Diana before attaching its ID. Reopening or sharing an older, unpaid copy of the invoice cannot erase the recorded payment. - Contract deployment: We registered the deployer’s PQC key with proof of possession and opened an EVM window to deploy BervisInvoices. For contract invoices, the contract enforces the open revision and exact amount, and reverts if the payout fails. New native invoices pay the issuer directly; they do not use the contract’s one-payment rule.

Timeline

BervisQuantum Pass

Pushed 3 commits to main

  • 51b5499 Document verified Diana transactions and judge walkthrough · eminentcodes
  • 2da562d Fix Neon storage setup for invoice short links · eminentcodes
  • 611cf69 Add live demo links and ignore local media · eminentcodes
BervisQuantum Pass

Pushed 1 commit to main

  • f0630ca Expand Bervis documentation and testnet proof guide · eminentcodes
BervisQuantum Pass

Pushed 1 commit to main

  • e54b0e7 Integrate QoreChain starter into Bervis and improve checkout · eminentcodes
BervisQuantum Pass

Pushed 1 commit to main

  • 17ab3d2 Prepare Bervis for Vercel and improve payment verification · eminentcodes
BervisQuantum Pass

Pushed 5 commits to main

  • e22bdd4 Make the QoreChain scaffold reproducible · eminentcodes
  • b3ea9e4 License Bervis under MIT · eminentcodes
  • 1a4f969 Add native QoreX invoicing, verified receipts, and short links · eminentcodes
  • 01b4427 Move the Next.js app to the repository root · eminentcodes
  • b5beb29 Publish Bervis invoicing app for QoreChain Diana · eminentcodes
BervisQuantum Pass

New project.

Comments and questions

  • No comments yet.