pub struct Output {
pub redeem_script: Option<ScriptBuf>,
pub witness_script: Option<ScriptBuf>,
pub bip32_derivation: BTreeMap<PublicKey, (Fingerprint, DerivationPath)>,
pub tap_internal_key: Option<XOnlyPublicKey>,
pub tap_tree: Option<TapTree>,
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, (Fingerprint, DerivationPath))>,
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<ScriptBuf>The redeem script for this output.
witness_script: Option<ScriptBuf>The witness script for this output.
bip32_derivation: BTreeMap<PublicKey, (Fingerprint, DerivationPath)>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>, (Fingerprint, DerivationPath))>Map of tap root x only keys to origin info and leaf hashes contained in it.
proprietary: BTreeMap<ProprietaryKey, Vec<u8>>Proprietary key-value pairs for this output.
unknown: BTreeMap<Key, Vec<u8>>Unknown key-value pairs for this output.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Output, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Output, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PsbtOutputExt for Output
impl PsbtOutputExt for Output
Source§fn update_with_descriptor_unchecked(
&mut self,
descriptor: &Descriptor<DefiniteDescriptorKey>,
) -> Result<Descriptor<PublicKey>, ConversionError>
fn update_with_descriptor_unchecked( &mut self, descriptor: &Descriptor<DefiniteDescriptorKey>, ) -> Result<Descriptor<PublicKey>, ConversionError>
Given the descriptor of a PSBT output populate the relevant metadata Read more
Source§impl RgbOutExt<ProprietaryKey> for Output
impl RgbOutExt<ProprietaryKey> for Output
fn get_internal_pk(&self) -> Option<XOnlyPublicKey>
fn is_tap_tree_empty(&self) -> bool
fn set_tap_tree(&mut self, script_commitment: &ScriptBuf)
fn bip32_derivation_terminals(&self) -> Vec<Terminal>
fn tap_bip32_derivation_terminals(&self) -> Vec<Terminal>
fn proprietary_mpc_messages<'a>( &'a self, ) -> impl Iterator<Item = (&'a [u8], &'a [u8])> + 'a
fn proprietary_insert(&mut self, key: ProprietaryKey, value: Vec<u8>)
fn proprietary_contains_key(&self, key: &ProprietaryKey) -> bool
fn proprietary_get_value(&self, key: &ProprietaryKey) -> Option<&[u8]>
fn proprietary_remove(&mut self, key: &ProprietaryKey)
fn is_opret_host(&self) -> bool
fn is_tapret_host(&self) -> bool
fn set_opret_host(&mut self) -> bool
fn set_tapret_host(&mut self) -> bool
Source§fn tapret_commitment(&self) -> Result<TapretCommitment, TapretKeyError>
fn tapret_commitment(&self) -> Result<TapretCommitment, TapretKeyError>
Returns valid tapret commitment from the
PSBT_OUT_TAPRET_COMMITMENT
key, if present. If the commitment is absent or invalid, returns
TapretKeyError::NoCommitment.Source§fn opret_commit(&mut self, commitment: Commitment) -> Result<(), OpretKeyError>
fn opret_commit(&mut self, commitment: Commitment) -> Result<(), OpretKeyError>
Assigns value of the opreturn commitment to this PSBT output, by
adding
PSBT_OUT_OPRET_COMMITMENT proprietary key containing the
32-byte commitment as its value. Also modifies the output script and removes
PSBT_OUT_OPRET_HOST key. Read moreSource§fn tapret_commit(
&mut self,
commitment: Commitment,
) -> Result<TapretProof, TapretKeyError>
fn tapret_commit( &mut self, commitment: Commitment, ) -> Result<TapretProof, TapretKeyError>
Assigns value of the tapreturn commitment to this PSBT output, by
adding
PSBT_OUT_TAPRET_COMMITMENT and PSBT_OUT_TAPRET_PROOF
proprietary keys containing the 32-byte commitment as its proof. Read morefn terminal_derivation(&self) -> Option<Terminal>
Source§fn mpc_message_map(
&self,
) -> Result<Confined<BTreeMap<ProtocolId, Message>, amplify::::collection::confinement::MediumOrdMap::{constant#0}, amplify::::collection::confinement::MediumOrdMap::{constant#1}>, MpcPsbtError>
fn mpc_message_map( &self, ) -> Result<Confined<BTreeMap<ProtocolId, Message>, amplify::::collection::confinement::MediumOrdMap::{constant#0}, amplify::::collection::confinement::MediumOrdMap::{constant#1}>, MpcPsbtError>
Returns
mpc::MessageMap constructed from the proprietary key data.Source§fn mpc_entropy(&self) -> Option<u64>
fn mpc_entropy(&self) -> Option<u64>
Returns a valid LNPBP-4 entropy value, if present. Read more
fn mpc_min_tree_depth(&self) -> Option<u8>
Source§fn set_mpc_entropy(&mut self, entropy: u64) -> Result<bool, MpcPsbtError>
fn set_mpc_entropy(&mut self, entropy: u64) -> Result<bool, MpcPsbtError>
Sets MPC entropy value. Read more
Source§fn set_mpc_message(
&mut self,
protocol_id: ProtocolId,
message: Message,
) -> Result<bool, MpcPsbtError>
fn set_mpc_message( &mut self, protocol_id: ProtocolId, message: Message, ) -> Result<bool, MpcPsbtError>
fn mpc_commit(&mut self) -> Result<(Commitment, MerkleBlock), MpcPsbtError>
fn proprietary_push( &mut self, key: P, value: Vec<u8>, ) -> Result<(), MpcPsbtError>
fn proprietary_contains(&self, key: &P) -> bool
fn proprietary_get(&self, key: &P) -> Option<&[u8]>
Source§impl RgbPsbtExt<ProprietaryKey, Output> for Psbt
impl RgbPsbtExt<ProprietaryKey, Output> for Psbt
fn get_txid(&self) -> Txid
fn modifiable_outputs(&self) -> bool
fn set_as_unmodifiable(&mut self)
fn unsigned_tx(&self) -> Transaction
fn set_opret_host(&mut self) -> bool
fn dbc_output<D>(&self) -> Option<&Output>where
D: DbcPsbtProof,
fn dbc_output_mut<D>(&mut self) -> Option<(usize, &mut Output)>where
D: DbcPsbtProof,
fn set_opret_commitment(&mut self, idx: usize)
fn set_tapret_commitment(&mut self, idx: usize)
fn proprietary_rgb_contract_consumer_keys<'a>( &'a self, ) -> impl Iterator<Item = &'a [u8]> + 'a
fn outputs_iter_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut Output>where
Output: 'a,
fn proprietary_insert(&mut self, key: ProprietaryKey, value: Vec<u8>)
fn proprietary_contains_key(&self, key: &ProprietaryKey) -> bool
fn proprietary_get_value(&self, key: &ProprietaryKey) -> Option<&[u8]>
fn dbc_commit<D>(&mut self) -> Result<(MerkleBlock, D), DbcPsbtError>where
D: DbcPsbtProof,
Self: Sized,
fn rgb_embed(&mut self, batch: Batch) -> Result<(), EmbedError>
fn rgb_commit(&mut self) -> Result<Fascia, CommitError>where
Self: Sized,
fn rgb_contract_ids(&self) -> Result<BTreeSet<ContractId>, FromSliceError>
fn rgb_contract_consumers( &self, contract_id: ContractId, ) -> Result<BTreeMap<Opout, OpId>, RgbPsbtError>
fn rgb_transition(&self, opid: OpId) -> Result<Option<Transition>, RgbPsbtError>
fn rgb_close_method(&self) -> Result<Option<Method>, RgbPsbtError>
fn rgb_tapret_host_on_change(&self) -> bool
fn set_rgb_close_method(&mut self, close_method: Method)
fn set_rgb_tapret_host_on_change(&mut self)
Source§fn set_rgb_contract_consumer(
&mut self,
contract_id: ContractId,
opout: Opout,
opid: OpId,
) -> Result<bool, RgbPsbtError>
fn set_rgb_contract_consumer( &mut self, contract_id: ContractId, opout: Opout, opid: OpId, ) -> Result<bool, RgbPsbtError>
Adds information about an RGB input allocation and the ID of the state
transition spending it. Read more
fn push_rgb_transition( &mut self, transition: Transition, ) -> Result<bool, RgbPsbtError>
fn rgb_bundles( &self, ) -> Result<BTreeMap<ContractId, TransitionBundle>, RgbPsbtError>
fn rgb_bundles_to_mpc( &mut self, ) -> Result<Confined<BTreeMap<ContractId, TransitionBundle>, 1, psrgbt::::RgbPsbtExt::rgb_bundles_to_mpc::{constant#0}>, RgbPsbtError>
fn proprietary_push( &mut self, key: P, value: Vec<u8>, ) -> Result<(), MpcPsbtError>
fn proprietary_contains(&self, key: &P) -> bool
fn proprietary_get(&self, key: &P) -> Option<&[u8]>
Source§impl Serialize for Output
impl Serialize for Output
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Output
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.