NodeAddress

sealed class NodeAddress(source)

Type-safe representation of a mesh node address.

Replaces stringly-typed node addressing ("^all", "^local", "!hexid") with exhaustive sealed dispatch, enabling compile-time verification of address handling.

Inheritors

Types

Link copied to clipboard
data object Broadcast : NodeAddress

Broadcast to all nodes in the mesh.

Link copied to clipboard
data class ById(val id: String) : NodeAddress

Address by hex string ID (e.g. "!a1b2c3d4").

Link copied to clipboard
data class ByNum(val num: Int) : NodeAddress

Address by numeric node number (the canonical mesh-level identifier).

Link copied to clipboard
object Companion
Link copied to clipboard
data object Local : NodeAddress

The local node (used as from when the sender's ID is unknown).

Functions

Link copied to clipboard
fun toContactKey(channel: Int): ContactKey

Build a ContactKey for this address on the given channel.

Link copied to clipboard

Convert back to the legacy string representation used in DataPacket.