Channels are directional
A channel is directional: sender -> recipient.- Channel key derivation uses sender private viewing key + recipient public viewing key.
- This directionality is intentional.
- If Alice and Bob both send privately to each other, there are two channels: Alice->Bob and Bob->Alice.
Subchannels
Within each channel, notes are organized into subchannels by token type. A subchannel is opened the first time a sender sends a particular token to a particular recipient through that channel.- Subchannel ID: derived from the channel key and a sequential index.
- Each subchannel holds an encrypted token identifier and a dense list of notes for that token.
- This structure lets the recipient discover notes per-token without scanning unrelated assets.
Why this matters
Directional channels simplify sender authorization and preserve deterministic recipient discovery.Sequential indices
Outgoing channels, subchannels, and notes are dense sequential lists. This prevents hidden gaps and enables complete scanning until first empty slot.Discovery algorithm (recipient)
- Scan channel entries for recipient.
- For each channel, scan subchannels.
- For each (channel, token), scan notes and check spent status via nullifier set.