Skip to main content

ProtocolMessage

Enum ProtocolMessage 

Source
pub enum ProtocolMessage {
Show 17 variants Register { signer_id: SignerId, quorum_id: String, }, Registered { signer_id: SignerId, }, CreateSession { quorum_id: String, scheme: String, message: Vec<u8>, threshold: u32, num_parties: u32, }, SessionCreated { session_id: String, }, SessionPending { session_id: String, message: Vec<u8>, threshold: u32, }, Commitment { session_id: String, signer_id: SignerId, bytes: Vec<u8>, signature: Vec<u8>, }, CommitmentsReady { session_id: String, }, Share { session_id: String, signer_id: SignerId, bytes: Vec<u8>, signature: Vec<u8>, }, Signature { session_id: String, bytes: Vec<u8>, algorithm: String, contributing_signers: Vec<SignerId>, }, Ack { session_id: String, }, Error { message: String, }, GetStatus { session_id: Option<String>, }, Status { session_id: String, state: String, }, HealthCheck, HealthStatus { alive: bool, ready: bool, session_count: usize, uptime_seconds: u64, }, MetricsQuery, MetricsResponse { text: String, },
}
Expand description

Protocol message exchanged over TCP between coordinator, signers, and clients.

Variants§

§

Register

Signer registers with coordinator.

Fields

§signer_id: SignerId

Signer identity.

§quorum_id: String

Quorum this signer belongs to.

§

Registered

Coordinator acknowledges registration.

Fields

§signer_id: SignerId

Signer identity.

§

CreateSession

Client requests session creation.

Fields

§quorum_id: String

Quorum ID.

§scheme: String

Signing scheme.

§message: Vec<u8>

Message to sign.

§threshold: u32

Threshold T.

§num_parties: u32

Total parties N.

§

SessionCreated

Coordinator confirms session created.

Fields

§session_id: String

Session ID.

§

SessionPending

Coordinator notifies signers of pending session.

Fields

§session_id: String

Session ID.

§message: Vec<u8>

Message to sign.

§threshold: u32

Threshold.

§

Commitment

Signer submits commitment.

Fields

§session_id: String

Session ID.

§signer_id: SignerId

Signer identity.

§bytes: Vec<u8>

Commitment bytes.

§signature: Vec<u8>

Identity signature.

§

CommitmentsReady

Coordinator notifies that commitments are collected.

Fields

§session_id: String

Session ID.

§

Share

Signer submits share.

Fields

§session_id: String

Session ID.

§signer_id: SignerId

Signer identity.

§bytes: Vec<u8>

Share bytes.

§signature: Vec<u8>

Identity signature.

§

Signature

Coordinator returns aggregated signature.

Fields

§session_id: String

Session ID.

§bytes: Vec<u8>

Signature bytes.

§algorithm: String

Algorithm.

§contributing_signers: Vec<SignerId>

Contributing signers.

§

Ack

Acknowledgement (commitment or share accepted, no further action needed).

Fields

§session_id: String

Session ID being acknowledged.

§

Error

Error response.

Fields

§message: String

Error message.

§

GetStatus

Status query.

Fields

§session_id: Option<String>

Session ID (optional).

§

Status

Status response.

Fields

§session_id: String

Session ID.

§state: String

Current state.

§

HealthCheck

Liveness/readiness probe.

§

HealthStatus

Health status response.

Fields

§alive: bool

Server is running.

§ready: bool

Coordinator can accept sessions.

§session_count: usize

Active session count.

§uptime_seconds: u64

Server uptime in seconds.

§

MetricsQuery

Prometheus metrics query.

§

MetricsResponse

Prometheus metrics response (text exposition format).

Fields

§text: String

Prometheus text format metrics.

Trait Implementations§

Source§

impl Clone for ProtocolMessage

Source§

fn clone(&self) -> ProtocolMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProtocolMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProtocolMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ProtocolMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more