Skip to main content

guardian_client/keystore/
signer.rs

1use guardian_shared::SignatureScheme;
2use miden_protocol::Word;
3
4/// Signing boundary for GUARDIAN authentication and multisig proposal workflows.
5pub trait Signer: Send + Sync {
6    /// Returns the signer's signature scheme.
7    fn scheme(&self) -> SignatureScheme;
8
9    /// Returns the signer's commitment as a Word.
10    fn commitment(&self) -> Word;
11
12    /// Returns the signer's commitment as a hex string with 0x prefix.
13    fn commitment_hex(&self) -> String;
14
15    /// Returns the signer's public key as a hex string with 0x prefix.
16    fn public_key_hex(&self) -> String;
17
18    /// Signs the provided word and returns the hex-encoded signature.
19    fn sign_word_hex(&self, message: Word) -> String;
20}