[][src]Trait bdk::wallet::signer::Signer

pub trait Signer: Debug + Send + Sync {
    pub fn sign(
        &self,
        psbt: &mut PartiallySignedTransaction,
        input_index: Option<usize>,
        secp: &Secp256k1<All>
    ) -> Result<(), SignerError>;
pub fn sign_whole_tx(&self) -> bool; pub fn descriptor_secret_key(&self) -> Option<DescriptorSecretKey> { ... } }

Trait for signers

This trait can be implemented to provide customized signers to the wallet. For an example see this module's documentation.

Required methods

pub fn sign(
    &self,
    psbt: &mut PartiallySignedTransaction,
    input_index: Option<usize>,
    secp: &Secp256k1<All>
) -> Result<(), SignerError>
[src]

Sign a PSBT

The input_index argument is only provided if the wallet doesn't declare to sign the whole transaction in one go (see Signer::sign_whole_tx). Otherwise its value is None and can be ignored.

pub fn sign_whole_tx(&self) -> bool[src]

Return whether or not the signer signs the whole transaction in one go instead of every input individually

Loading content...

Provided methods

pub fn descriptor_secret_key(&self) -> Option<DescriptorSecretKey>[src]

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).

Loading content...

Implementations on Foreign Types

impl Signer for DescriptorXKey<ExtendedPrivKey>[src]

impl Signer for PrivateKey[src]

Loading content...

Implementors

Loading content...