pub trait VtxoSigner {
// Required method
fn witness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 VtxoClause,
control_block: &'life2 ControlBlock,
sighash: TapSighash,
) -> Pin<Box<dyn Future<Output = Option<Witness>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn can_sign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 VtxoClause,
vtxo: &'life2 Vtxo,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn find_signable_clause<'life0, 'life1, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
) -> Pin<Box<dyn Future<Output = Option<VtxoClause>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn sign_input<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
input_idx: usize,
sighash_cache: &'life2 mut SighashCache<impl 'async_trait + Borrow<Transaction> + Send + Sync>,
prevouts: &'life3 Prevouts<'_, impl 'async_trait + Borrow<TxOut> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<Witness, CannotSignVtxoError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn sign_input_with_clause<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
clause: &'life2 VtxoClause,
input_idx: usize,
sighash_cache: &'life3 mut SighashCache<impl 'async_trait + Borrow<Transaction> + Send + Sync>,
prevouts: &'life4 Prevouts<'_, impl 'async_trait + Borrow<TxOut> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<Witness, CannotSignVtxoError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
}Expand description
A trait to implement a signer for a Vtxo.
Required Methods§
Sourcefn witness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 VtxoClause,
control_block: &'life2 ControlBlock,
sighash: TapSighash,
) -> Pin<Box<dyn Future<Output = Option<Witness>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn witness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 VtxoClause,
control_block: &'life2 ControlBlock,
sighash: TapSighash,
) -> Pin<Box<dyn Future<Output = Option<Witness>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns the witness for a VtxoClause if it is signable, otherwise None.
Provided Methods§
Sourcefn can_sign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 VtxoClause,
vtxo: &'life2 Vtxo,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn can_sign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 VtxoClause,
vtxo: &'life2 Vtxo,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns true if the clause is signable, otherwise false.
Sourcefn find_signable_clause<'life0, 'life1, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
) -> Pin<Box<dyn Future<Output = Option<VtxoClause>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_signable_clause<'life0, 'life1, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
) -> Pin<Box<dyn Future<Output = Option<VtxoClause>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn sign_input<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
input_idx: usize,
sighash_cache: &'life2 mut SighashCache<impl 'async_trait + Borrow<Transaction> + Send + Sync>,
prevouts: &'life3 Prevouts<'_, impl 'async_trait + Borrow<TxOut> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<Witness, CannotSignVtxoError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn sign_input<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
input_idx: usize,
sighash_cache: &'life2 mut SighashCache<impl 'async_trait + Borrow<Transaction> + Send + Sync>,
prevouts: &'life3 Prevouts<'_, impl 'async_trait + Borrow<TxOut> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<Witness, CannotSignVtxoError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Return the full witness for a Vtxo using the first signable clause.
§Errors
Returns CannotSignVtxoError if no clause is signable.
Sourcefn sign_input_with_clause<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
clause: &'life2 VtxoClause,
input_idx: usize,
sighash_cache: &'life3 mut SighashCache<impl 'async_trait + Borrow<Transaction> + Send + Sync>,
prevouts: &'life4 Prevouts<'_, impl 'async_trait + Borrow<TxOut> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<Witness, CannotSignVtxoError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn sign_input_with_clause<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
vtxo: &'life1 Vtxo,
clause: &'life2 VtxoClause,
input_idx: usize,
sighash_cache: &'life3 mut SighashCache<impl 'async_trait + Borrow<Transaction> + Send + Sync>,
prevouts: &'life4 Prevouts<'_, impl 'async_trait + Borrow<TxOut> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<Witness, CannotSignVtxoError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Return the full witness for a Vtxo using the specified clause.
§Errors
Returns CannotSignVtxoError if the clause is not signable.
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.