pub struct SignerClient { /* private fields */ }Expand description
TCP signer client.
Implementations§
Source§impl SignerClient
impl SignerClient
Sourcepub fn connect(addr: &str) -> Result<Self>
pub fn connect(addr: &str) -> Result<Self>
Connect to coordinator at addr (e.g., “127.0.0.1:18432”).
Sourcepub fn connect_url(url: &str) -> Result<Self>
pub fn connect_url(url: &str) -> Result<Self>
Connect over any registry transport URL — plain
(tcp://host:port) or encrypted (noise://host:port, with
optional key=/pinned= parameters). Link the transport
crate (e.g. confium-net-noise) into the binary to enable
its scheme.
Sourcepub fn register(&mut self, signer_id: &str, quorum_id: &str) -> Result<()>
pub fn register(&mut self, signer_id: &str, quorum_id: &str) -> Result<()>
Register this signer with the coordinator.
Sourcepub fn create_session(
&mut self,
quorum_id: &str,
scheme: &str,
message: &[u8],
threshold: u32,
num_parties: u32,
) -> Result<String>
pub fn create_session( &mut self, quorum_id: &str, scheme: &str, message: &[u8], threshold: u32, num_parties: u32, ) -> Result<String>
Create a new signing session on the coordinator.
Sourcepub fn submit_commitment(
&mut self,
session_id: &str,
signer_id: &str,
commitment_bytes: &[u8],
) -> Result<()>
pub fn submit_commitment( &mut self, session_id: &str, signer_id: &str, commitment_bytes: &[u8], ) -> Result<()>
Submit a commitment for a session.
Submit a share for a session. Returns the aggregated signature if this was the T-th share (threshold met).
Sourcepub fn get_status(&mut self, session_id: &str) -> Result<String>
pub fn get_status(&mut self, session_id: &str) -> Result<String>
Query session status.
Sourcepub fn stream_mut(&mut self) -> &mut Box<dyn SessionIo>
pub fn stream_mut(&mut self) -> &mut Box<dyn SessionIo>
Mutable access to the underlying session stream (TCP directly or a registry transport). Used by the signer daemon for low-level protocol message handling.
Sourcepub fn recv(&mut self) -> Result<ProtocolMessage>
pub fn recv(&mut self) -> Result<ProtocolMessage>
Receive the next protocol message on the session stream.
Sourcepub fn send(&mut self, msg: &ProtocolMessage) -> Result<()>
pub fn send(&mut self, msg: &ProtocolMessage) -> Result<()>
Send a protocol message on the session stream.