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

pub trait Signer: Debug {
    fn sign(
        &self,
        psbt: &mut PartiallySignedTransaction,
        input_index: Option<usize>
    ) -> Result<(), SignerError>;
fn sign_whole_tx(&self) -> bool; 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

fn sign(
    &self,
    psbt: &mut PartiallySignedTransaction,
    input_index: Option<usize>
) -> Result<(), SignerError>

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.

fn sign_whole_tx(&self) -> bool

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

Loading content...

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

Loading content...

Implementations on Foreign Types

impl Signer for DescriptorXKey<ExtendedPrivKey>[src]

impl Signer for PrivateKey[src]

Loading content...

Implementors

Loading content...