Right now, the ProtocolParticipant constructor takes one participant identifier for itself and a separate array for the other participants, and we don't validate anything about those types in the constructors. Instead, we should use the ParticipantConfig type, which bundles the self and others into a named type and does validation on construction that there aren't duplicates, there are a valid number of others, etc.
[ ] Update the ProtocolParticipant trait to take a ParticipantConfig instead of separate id and other_participant_ids fields.
Right now, the
ProtocolParticipant
constructor takes one participant identifier for itself and a separate array for the other participants, and we don't validate anything about those types in the constructors. Instead, we should use theParticipantConfig
type, which bundles theself
andothers
into a named type and does validation on construction that there aren't duplicates, there are a valid number of others, etc.ProtocolParticipant
trait to take aParticipantConfig
instead of separateid
andother_participant_ids
fields.