pub struct SpPsbtExtractor { /* private fields */ }Expand description
BIP 375 Extractor role: aggregates ECDH shares and computes SP output scripts.
Created via SpPsbtSigner::into_extractor after all required ECDH shares
are present. The extract method computes
the final SP output scripts and returns the updated PSBT.
Implementations§
Source§impl SpPsbtExtractor
impl SpPsbtExtractor
Sourcepub fn extract(
self,
_secp: &Secp256k1<impl Verification>,
) -> Result<(Psbt, Vec<ExtractedSpOutput>), PsbtError>
pub fn extract( self, _secp: &Secp256k1<impl Verification>, ) -> Result<(Psbt, Vec<ExtractedSpOutput>), PsbtError>
Compute SP output scripts from aggregated ECDH shares.
For each unique scan key in SP output info fields:
- Aggregates ECDH shares (global share directly, or per-input via
combine_keys) - The aggregated share IS the BIP 352 shared secret point
- Derives output pubkeys via
compute_output_pubkey(spend_key, shared_secret, k) - Builds P2TR scripts from the output pubkeys
Returns the updated PSBT (with computed scriptPubKeys) and extracted output metadata.
Auto Trait Implementations§
impl Freeze for SpPsbtExtractor
impl RefUnwindSafe for SpPsbtExtractor
impl Send for SpPsbtExtractor
impl Sync for SpPsbtExtractor
impl Unpin for SpPsbtExtractor
impl UnsafeUnpin for SpPsbtExtractor
impl UnwindSafe for SpPsbtExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more