pub struct Output {Show 20 fields
pub redeem_script: Option<Script>,
pub witness_script: Option<Script>,
pub bip32_derivation: BTreeMap<PublicKey, KeySource>,
pub tap_internal_key: Option<XOnlyPublicKey>,
pub tap_tree: Option<TapTree>,
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, KeySource)>,
pub amount: Option<u64>,
pub amount_comm: Option<PedersenCommitment>,
pub script_pubkey: Script,
pub asset: Option<AssetId>,
pub asset_comm: Option<Generator>,
pub value_rangeproof: Option<Box<RangeProof>>,
pub asset_surjection_proof: Option<Box<SurjectionProof>>,
pub blinding_key: Option<PublicKey>,
pub ecdh_pubkey: Option<PublicKey>,
pub blinder_index: Option<u32>,
pub blind_value_proof: Option<Box<RangeProof>>,
pub blind_asset_proof: Option<Box<SurjectionProof>>,
pub proprietary: BTreeMap<ProprietaryKey, Vec<u8>>,
pub unknown: BTreeMap<Key, Vec<u8>>,
}
Expand description
A key-value map for an output of the corresponding index in the unsigned transaction.
Fields§
§redeem_script: Option<Script>
The redeem script for this output.
witness_script: Option<Script>
The witness script for this output.
bip32_derivation: BTreeMap<PublicKey, KeySource>
A map from public keys needed to spend this output to their corresponding master key fingerprints and derivation paths.
tap_internal_key: Option<XOnlyPublicKey>
The internal pubkey
tap_tree: Option<TapTree>
Taproot Output tree
tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, KeySource)>
Map of tap root x only keys to origin info and leaf hashes contained in it
amount: Option<u64>
(PSET) The explicit amount of the output
amount_comm: Option<PedersenCommitment>
(PSET) The out amount commitment
script_pubkey: Script
(PSET) The script pubkey of the output
asset: Option<AssetId>
The output explicit asset
asset_comm: Option<Generator>
The output explicit asset
value_rangeproof: Option<Box<RangeProof>>
Output value rangeproof
asset_surjection_proof: Option<Box<SurjectionProof>>
Output Asset surjection proof
blinding_key: Option<PublicKey>
Blinding pubkey which is used in receiving address
ecdh_pubkey: Option<PublicKey>
The ephermal pk sampled by sender
blinder_index: Option<u32>
The index of the input whose owner should blind this output
blind_value_proof: Option<Box<RangeProof>>
The blind value rangeproof
blind_asset_proof: Option<Box<SurjectionProof>>
The blind asset surjection proof
proprietary: BTreeMap<ProprietaryKey, Vec<u8>>
Pset Other fields
unknown: BTreeMap<Key, Vec<u8>>
Unknown key-value pairs for this output.
Implementations§
Source§impl Output
impl Output
Sourcepub fn new_explicit(
script: Script,
amount: u64,
asset: AssetId,
blinding_key: Option<PublicKey>,
) -> Self
pub fn new_explicit( script: Script, amount: u64, asset: AssetId, blinding_key: Option<PublicKey>, ) -> Self
Create a new explicit pset output
Sourcepub fn from_txout(txout: TxOut) -> Self
pub fn from_txout(txout: TxOut) -> Self
Create a output from txout
If the txout it TxOut::is_partially_blinded
, then nonce of the txout
is treated as ecdh pubkey, otherwise the nonce of the txout is assumed to
be receiver blinding key.
This is to be used when the txout is not blinded. This sets
the blinding key from the txout nonce
Sourcepub fn is_marked_for_blinding(&self) -> bool
pub fn is_marked_for_blinding(&self) -> bool
IsBlinded
from elements core
This indicates whether the output is marked for blinding
Sourcepub fn is_partially_blinded(&self) -> bool
pub fn is_partially_blinded(&self) -> bool
IsPartiallyBlinded
from elements core
Sourcepub fn is_fully_blinded(&self) -> bool
pub fn is_fully_blinded(&self) -> bool
IsFullyBlinded
from elements core