bpstd

Trait Signer

Source
pub trait Signer {
    type Sign<'s>: Sign
       where Self: 's;

    // Required method
    fn approve(&self, psbt: &Psbt) -> Result<Self::Sign<'_>, Rejected>;
}
Expand description

Trait which should be implemented by all signers.

Signers must ensure that transaction is checked by the user when they get Signer::approve callback. If the transaction passes the check, they must provide the caller with [Satisfier] instance, responsible for selecting specific script paths and keys for the signing.

Required Associated Types§

Source

type Sign<'s>: Sign where Self: 's

Type which does the actual signatures. See Sign trait for the details.

Required Methods§

Source

fn approve(&self, psbt: &Psbt) -> Result<Self::Sign<'_>, Rejected>

In the implementation of this method signers must ensure that transaction is checked by the user. If the transaction passes the check, they must provide the caller with [Satisfier] instance, responsible for selecting specific script paths and keys for the signing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§