[−][src]Trait bdk::wallet::signer::Signer
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]
&self,
psbt: &mut PartiallySignedTransaction,
input_index: Option<usize>,
secp: &Secp256k1<All>
) -> 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.
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
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).
Implementations on Foreign Types
impl Signer for DescriptorXKey<ExtendedPrivKey>
[src]
pub fn sign(
&self,
psbt: &mut PartiallySignedTransaction,
input_index: Option<usize>,
secp: &Secp256k1<All>
) -> Result<(), SignerError>
[src]
&self,
psbt: &mut PartiallySignedTransaction,
input_index: Option<usize>,
secp: &Secp256k1<All>
) -> Result<(), SignerError>
pub fn sign_whole_tx(&self) -> bool
[src]
pub fn descriptor_secret_key(&self) -> Option<DescriptorSecretKey>
[src]
impl Signer for PrivateKey
[src]
pub fn sign(
&self,
psbt: &mut PartiallySignedTransaction,
input_index: Option<usize>,
secp: &Secp256k1<All>
) -> Result<(), SignerError>
[src]
&self,
psbt: &mut PartiallySignedTransaction,
input_index: Option<usize>,
secp: &Secp256k1<All>
) -> Result<(), SignerError>