Trait bdk_wallet::wallet::signer::SignerCommon

source ·
pub trait SignerCommon: Debug + Send + Sync {
    // Required method
    fn id(&self, secp: &Secp256k1<All>) -> SignerId;

    // Provided method
    fn descriptor_secret_key(&self) -> Option<DescriptorSecretKey> { ... }
Expand description

Common signer methods

Required Methods§


fn id(&self, secp: &Secp256k1<All>) -> SignerId

Return the SignerId for this signer

The SignerId can be used to lookup a signer in the Wallet’s signers map or to compare two signers.

Provided Methods§


fn descriptor_secret_key(&self) -> Option<DescriptorSecretKey>

Return the secret key for the signer

This is used internally to reconstruct the original descriptor that may contain secrets. External signers that are meant to keep key isolated should just return None here (which is the default for this method, if not overridden).



impl SignerCommon for SignerWrapper<DescriptorMultiXKey<Xpriv>>


impl SignerCommon for SignerWrapper<DescriptorXKey<Xpriv>>


impl SignerCommon for SignerWrapper<PrivateKey>