BreezSigner

Trait BreezSigner 

Source
pub trait BreezSigner: Send + Sync {
Show 20 methods // Required methods fn identity_public_key(&self) -> Result<PublicKey, SdkError>; fn sign_ecdsa<'life0, 'life1, 'async_trait>( &'life0 self, message: Message, path: &'life1 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Signature, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn sign_ecdsa_recoverable<'life0, 'life1, 'async_trait>( &'life0 self, message: Message, path: &'life1 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<RecoverableSignature, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn encrypt_ecies<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message: &'life1 [u8], path: &'life2 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn decrypt_ecies<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message: &'life1 [u8], path: &'life2 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn sign_hash_schnorr<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, hash: &'life1 [u8], path: &'life2 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Signature, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn derive_public_key<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn generate_random_signing_commitment<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<FrostSigningCommitmentsWithNonces, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_public_key_for_node<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 TreeNodeId, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn generate_random_secret<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<EncryptedSecret, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn static_deposit_secret_encrypted<'life0, 'async_trait>( &'life0 self, index: u32, ) -> Pin<Box<dyn Future<Output = Result<SecretSource, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn static_deposit_secret<'life0, 'async_trait>( &'life0 self, index: u32, ) -> Pin<Box<dyn Future<Output = Result<SecretKey, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn static_deposit_signing_key<'life0, 'async_trait>( &'life0 self, index: u32, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn subtract_secrets<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, signing_key: &'life1 SecretSource, new_signing_key: &'life2 SecretSource, ) -> Pin<Box<dyn Future<Output = Result<SecretSource, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn split_secret_with_proofs<'life0, 'life1, 'async_trait>( &'life0 self, secret: &'life1 SecretToSplit, threshold: u32, num_shares: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<VerifiableSecretShare>, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn encrypt_secret_for_receiver<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, private_key: &'life1 EncryptedSecret, receiver_public_key: &'life2 PublicKey, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn public_key_from_secret<'life0, 'life1, 'async_trait>( &'life0 self, private_key: &'life1 SecretSource, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn sign_frost<'a, 'life0, 'async_trait>( &'life0 self, request: SignFrostRequest<'a>, ) -> Pin<Box<dyn Future<Output = Result<SignatureShare, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait; fn aggregate_frost<'a, 'life0, 'async_trait>( &'life0 self, request: AggregateFrostRequest<'a>, ) -> Pin<Box<dyn Future<Output = Result<Signature, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait; fn hmac_sha256<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key_path: &'life1 DerivationPath, input: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Hmac<Hash>, SdkError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait;
}

Required Methods§

Source

fn identity_public_key(&self) -> Result<PublicKey, SdkError>

Returns the identity public key.

Source

fn sign_ecdsa<'life0, 'life1, 'async_trait>( &'life0 self, message: Message, path: &'life1 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Signature, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Signs a pre-hashed message using ECDSA at the given derivation path.

The caller must create the Message from a 32-byte hash digest before calling this method.

Source

fn sign_ecdsa_recoverable<'life0, 'life1, 'async_trait>( &'life0 self, message: Message, path: &'life1 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<RecoverableSignature, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Signs a pre-hashed message using recoverable ECDSA at the given derivation path.

The caller must create the Message from a 32-byte hash digest before calling.

Source

fn encrypt_ecies<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message: &'life1 [u8], path: &'life2 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn decrypt_ecies<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message: &'life1 [u8], path: &'life2 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn sign_hash_schnorr<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, hash: &'life1 [u8], path: &'life2 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<Signature, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn derive_public_key<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 DerivationPath, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn generate_random_signing_commitment<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<FrostSigningCommitmentsWithNonces, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_public_key_for_node<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 TreeNodeId, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn generate_random_secret<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<EncryptedSecret, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn static_deposit_secret_encrypted<'life0, 'async_trait>( &'life0 self, index: u32, ) -> Pin<Box<dyn Future<Output = Result<SecretSource, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn static_deposit_secret<'life0, 'async_trait>( &'life0 self, index: u32, ) -> Pin<Box<dyn Future<Output = Result<SecretKey, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn static_deposit_signing_key<'life0, 'async_trait>( &'life0 self, index: u32, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn subtract_secrets<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, signing_key: &'life1 SecretSource, new_signing_key: &'life2 SecretSource, ) -> Pin<Box<dyn Future<Output = Result<SecretSource, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn split_secret_with_proofs<'life0, 'life1, 'async_trait>( &'life0 self, secret: &'life1 SecretToSplit, threshold: u32, num_shares: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<VerifiableSecretShare>, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn encrypt_secret_for_receiver<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, private_key: &'life1 EncryptedSecret, receiver_public_key: &'life2 PublicKey, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn public_key_from_secret<'life0, 'life1, 'async_trait>( &'life0 self, private_key: &'life1 SecretSource, ) -> Pin<Box<dyn Future<Output = Result<PublicKey, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn sign_frost<'a, 'life0, 'async_trait>( &'life0 self, request: SignFrostRequest<'a>, ) -> Pin<Box<dyn Future<Output = Result<SignatureShare, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source

fn aggregate_frost<'a, 'life0, 'async_trait>( &'life0 self, request: AggregateFrostRequest<'a>, ) -> Pin<Box<dyn Future<Output = Result<Signature, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source

fn hmac_sha256<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key_path: &'life1 DerivationPath, input: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Hmac<Hash>, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Computes HMAC-SHA256 using a key derived at the given path.

Implementors§