Docs · Concepts

Keys and disclosure

The keys of a Mesa account, what each one opens, the read-only key, the watcher's key, and what is visible at deposit and withdrawal.

What someone can see of a Mesa account depends on which key they hold. With no key, they see what the chain shows. This page lists the keys and what each adds.

The keys

KeyOpensHeld by
Master secretEverything below except the wallet keyYou
Spend secretSpending any note of the accountYou
Read-only keyEvery note the account has held, and whether each is spentYou, and whoever you give it to
A position's keyThat one position: reading it and renewing itYou, and the watcher if you enrol the position
Wallet keyDeposits from, and withdrawals to, your Rings private balance. In the app, the signature the master secret is derived from.Your Solana wallet

The master secret is 32 bytes. In the app it is derived with HKDF from your wallet's signature of the message Mesa account v1 followed by the wallet's address. A script keeps it in a key file, or derives it the same way from a keypair's signature. The spend secret and the read seed are derived from it under separate labels, so neither can be computed from the other.

Your wallet signs the message that derives the account and the deposit that funds it. Inside Mesa, proofs made with the spend secret authorize everything, and no transaction carries the wallet's signature or address.

The read-only key

The read-only key is the read seed together with the public half of the spend secret.

It derives the viewing key and the nullifier key of every holder the account uses. With it, a person can:

  • find and decrypt every balance, share, action and position note of the account;
  • tell which of them are spent;
  • rebuild the account's full history: each deposit, order, fill, loan, repayment and withdrawal, with amounts and times.

It cannot spend. Every circuit that moves value on the owner's behalf requires the spend secret, and the read-only key holds only that secret's public half.

You export it from /portfolio with Export read-only key, as a base58 string, and anyone can open an account from one there. An accountant preparing your books or an auditor checking your positions gets the whole account, exact to the unit, without being able to move any of it. Export and use a read-only key covers both sides.

A position's key

Each position has its own holder keys, derived from the read seed with the position's number. What you hand the watcher is those keys with the position's contents. That discloses the one position and nothing else: the watcher that holds it can read the position's collateral and debt and renew it, and cannot see your balances, your orders or your other positions.

Enrolment is POST /v1/watcher/enrolments with the position's key. The API never returns key material, and removing an enrolment, which is authorized by the same key, makes the watcher drop it.

Where keys are kept

ClientMaster secret
The appNot stored. Derived from your wallet's signature each time you connect.
A scriptIn a key file

Proofs are generated where the keys are, so the spend secret never leaves your browser or your process. The API and the relayer receive proofs and ciphertexts.

What is visible at deposit and withdrawal

A deposit into Mesa and a withdrawal from it each name one public address: the wallet that deposits, or the Rings address that receives. The asset and amount are encrypted in both.

Moving between a public Solana balance and a Rings private balance is a Privacy Rings transaction, and it shows the address, the asset and the amount. So the path of public funds into and out of the private side is on the public ledger, tied to an ordinary Solana address that any service can screen the way it screens addresses today.

What the public can verify without any key

  • Every clearing price, against the opened orders and vault reserves of its batch.
  • Every pool's and vault's totals, and that they moved by exactly what each batch netted.
  • That value is conserved: every circuit proves inputs equal outputs per asset, so the notes Mesa owns always sum to what was deposited less what was withdrawn.
  • That every position that has not lapsed proved its health within the last heartbeat.