pub struct ExtractedSpOutput { /* private fields */ }Expand description
A Silent Payment output extracted from a PSBT after ECDH share aggregation.
Contains everything a wallet needs to assemble the final transaction:
- The computed P2TR script for the output
- The x-only public key embedded in the script
- The PSBT output index this corresponds to
- The recipient’s scan public key for wallet-side mapping
Implementations§
Source§impl ExtractedSpOutput
impl ExtractedSpOutput
Sourcepub fn new(
script_pubkey: ScriptBuf,
x_only_pubkey: XOnlyPublicKey,
output_index: usize,
scan_pubkey: PublicKey,
) -> ExtractedSpOutput
pub fn new( script_pubkey: ScriptBuf, x_only_pubkey: XOnlyPublicKey, output_index: usize, scan_pubkey: PublicKey, ) -> ExtractedSpOutput
Create a new extracted output with all required fields.
Sourcepub fn script_pubkey(&self) -> &ScriptBuf
pub fn script_pubkey(&self) -> &ScriptBuf
The computed P2TR script for this output.
Sourcepub fn x_only_pubkey(&self) -> XOnlyPublicKey
pub fn x_only_pubkey(&self) -> XOnlyPublicKey
The x-only public key embedded in the P2TR output.
Sourcepub fn output_index(&self) -> usize
pub fn output_index(&self) -> usize
The PSBT output index this extracted output corresponds to.
Sourcepub fn scan_pubkey(&self) -> &PublicKey
pub fn scan_pubkey(&self) -> &PublicKey
The recipient’s scan public key, for wallet-side recipient mapping.
Trait Implementations§
Source§impl Clone for ExtractedSpOutput
impl Clone for ExtractedSpOutput
Source§fn clone(&self) -> ExtractedSpOutput
fn clone(&self) -> ExtractedSpOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtractedSpOutput
impl Debug for ExtractedSpOutput
Source§impl PartialEq for ExtractedSpOutput
impl PartialEq for ExtractedSpOutput
impl Eq for ExtractedSpOutput
impl StructuralPartialEq for ExtractedSpOutput
Auto Trait Implementations§
impl Freeze for ExtractedSpOutput
impl RefUnwindSafe for ExtractedSpOutput
impl Send for ExtractedSpOutput
impl Sync for ExtractedSpOutput
impl Unpin for ExtractedSpOutput
impl UnsafeUnpin for ExtractedSpOutput
impl UnwindSafe for ExtractedSpOutput
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