Private wallet and key derivation
Where an owner's keys and every agent's keys come from, and why the owner can always read, recover and drain an agent.
A private wallet is the owner's balance inside a Privacy Ring. It is held by a shielded keypair that your browser derives from one signature of your Solana wallet. Each agent gets its own shielded keypair, derived from yours, so you never store or back up an agent key separately.
- Wallet signatureof the derivation message
- Owner shielded keypairsigning, nullifier, viewing keys
- Agent keypair nowner seed + index n
- AYO_AGENT_KEYthe agent holds only its own spend key
The owner's keys
When you press Make a private wallet in the app, your Solana wallet signs the derivation message that Privacy Rings defines. The signature becomes your derivation seed. From that seed the browser derives a shielded keypair with three parts:
| Key | What it does |
|---|---|
| Ed25519 signing key | Authorizes spending your Ring outputs. Rings requires the owner's signature on every transaction that spends. |
| Nullifier key | Produces the nullifier that marks an output as spent, so the same output can't be spent twice. |
| X25519 viewing key | Decrypts the outputs and transfers addressed to you. |
The first time, the app registers the public parts in the Ring User Registry, which gives you a Ring address that others can send to. The seed and the private keys stay in the browser. Signing the same message again with the same wallet gives the same keys, so connecting from another device needs no export.
Agent keys
Agent number i gets a 32-byte seed derived with HKDF-SHA256 from your derivation signature, with the salt Ayo/agent/v1 and i as a little-endian u32 for the info. That seed is an Ed25519 private key, and it does two jobs:
- Solana key. It pays the fee for the agent's own transactions (
open_tab,close_tab) and signs every voucher. Its public key is stored on chain as the agent'ssigning_key. - Shielded keypair. The Ring keypair built on the same Ed25519 key holds the agent's private balance and signs its settlement transfers. Its Ring address is stored on chain beside the signing key.
AYO_AGENT_KEY is the seed written in base58. The app shows it once, when the agent is created, and the agent process reads it from its environment. The agent holds its own seed and nothing of yours.
What the derivation gives the owner
Every agent key comes from your seed and an index, so your browser can derive any agent's keys again. With the viewing key it decrypts the agent's balance, settlements and activity records. With the shielded key it can move the agent's balance back to your private wallet, which is how Drain an agent works. An agent whose environment is lost is recovered from the same index.
An agent can spend only what you've sent it. To give it more, use Top up. To stop it, use Pause.
Service keys
A service you list gets keys the same way, from your seed and the service's own index, with the salt Ayo/service/v1 in place of Ayo/agent/v1. Its signing key signs confirm_tab and flag_unpaid and pays their fees; its Ring address is where settlements arrive. AYO_SERVICE_KEY is the service's seed in base58, shown once when you list it, and your browser derives it again to read what the service has received. Your wallet stays the service's owner and is the one that changes its listing.