ContactKey
Type-safe wrapper for contact key strings (channel index + node address).
Contact keys are persisted as strings in the format "<channel><nodeId>" (e.g. "0^all", "1!a1b2c3d4").
A broadcast conversation whose channel is no longer configured is retired rather than deleted, and takes the form "~<token>^all" — see retiredBroadcast. A retired key has no channelOrNull, which is what makes every "which live slot is this?" site treat it as having none without needing to know the form exists.
Properties
Parsed NodeAddress for the contact.
The node address portion: everything after the channel digit (or the retired token), or the whole key when there is no prefix at all. Empty if the key is empty.
The channel index if the key carries a leading channel digit, or null for a legacy unprefixed direct-message key or a retired conversation. Callers that must distinguish "channel 0" from "no channel prefix" (e.g. PKI vs legacy DM routing) need this rather than channel.
The channel-identity token a retired conversation is parked under, or null when this key is live.