set

fun set(peer: PeerId, displayName: String, timestamp: Long, replica: ReplicaId): MemberMetadata

Set a display name for peer tagged with (timestamp, replica).

replica is used only for tie-breaking when two replicas write the same key at the same timestamp. Use the writing peer's stable ReplicaId (e.g. derived from its PeerId) so tie-breaking is deterministic and consistent across all replicas.

The caller must ensure timestamp is strictly increasing per (peer, replica) pair — reusing a tag with a different value produces non-deterministic convergence (LWWMap contract).

Returns a new MemberMetadata containing the updated entry; the receiver is unchanged.