Trait bpstd::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.

Object Safety§

This trait is not object safe.

Implementors§