pub struct ProprietaryKey<Subtype = u8>{
pub prefix: Vec<u8>,
pub subtype: Subtype,
pub key: Vec<u8>,
}Expand description
Proprietary keys (i.e. keys starting with 0xFC byte) with their internal structure according to BIP 174.
Fields§
§prefix: Vec<u8>Proprietary type prefix used for grouping together keys under some application and avoid namespace collision
subtype: SubtypeCustom proprietary subtype
key: Vec<u8>Additional key bytes (like serialized public key data etc)
Implementations§
Trait Implementations§
Source§impl<Subtype> Clone for ProprietaryKey<Subtype>
impl<Subtype> Clone for ProprietaryKey<Subtype>
Source§fn clone(&self) -> ProprietaryKey<Subtype>
fn clone(&self) -> ProprietaryKey<Subtype>
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<Subtype> Debug for ProprietaryKey<Subtype>
impl<Subtype> Debug for ProprietaryKey<Subtype>
Source§impl<Subtype> Decodable for ProprietaryKey<Subtype>
impl<Subtype> Decodable for ProprietaryKey<Subtype>
Source§fn consensus_decode<R>(r: &mut R) -> Result<ProprietaryKey<Subtype>, Error>
fn consensus_decode<R>(r: &mut R) -> Result<ProprietaryKey<Subtype>, Error>
Decode an object with a well-defined format. Read more
Source§impl<'de, Subtype> Deserialize<'de> for ProprietaryKey<Subtype>
impl<'de, Subtype> Deserialize<'de> for ProprietaryKey<Subtype>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProprietaryKey<Subtype>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProprietaryKey<Subtype>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Subtype> Encodable for ProprietaryKey<Subtype>
impl<Subtype> Encodable for ProprietaryKey<Subtype>
Source§impl<Subtype> Hash for ProprietaryKey<Subtype>
impl<Subtype> Hash for ProprietaryKey<Subtype>
Source§impl<Subtype> Ord for ProprietaryKey<Subtype>
impl<Subtype> Ord for ProprietaryKey<Subtype>
Source§fn cmp(&self, other: &ProprietaryKey<Subtype>) -> Ordering
fn cmp(&self, other: &ProprietaryKey<Subtype>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Subtype> PartialEq for ProprietaryKey<Subtype>
impl<Subtype> PartialEq for ProprietaryKey<Subtype>
Source§impl<Subtype> PartialOrd for ProprietaryKey<Subtype>
impl<Subtype> PartialOrd for ProprietaryKey<Subtype>
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 RgbPropKeyExt for ProprietaryKey
impl RgbPropKeyExt for ProprietaryKey
Source§fn mpc_message(protocol_id: ProtocolId) -> ProprietaryKey
fn mpc_message(protocol_id: ProtocolId) -> ProprietaryKey
Constructs
PSBT_OUT_MPC_MESSAGE proprietary key.Source§fn mpc_entropy() -> ProprietaryKey
fn mpc_entropy() -> ProprietaryKey
Constructs
PSBT_OUT_MPC_ENTROPY proprietary key.Source§fn mpc_min_tree_depth() -> ProprietaryKey
fn mpc_min_tree_depth() -> ProprietaryKey
Constructs
PSBT_OUT_MPC_MIN_TREE_DEPTH proprietary key.Source§fn mpc_commitment() -> ProprietaryKey
fn mpc_commitment() -> ProprietaryKey
Constructs
PSBT_OUT_MPC_COMMITMENT proprietary key.Source§fn mpc_proof() -> ProprietaryKey
fn mpc_proof() -> ProprietaryKey
Constructs
PSBT_OUT_MPC_PROOF proprietary key.Source§fn opret_host() -> ProprietaryKey
fn opret_host() -> ProprietaryKey
Constructs
PSBT_OUT_OPRET_HOST proprietary key.Source§fn tapret_host() -> ProprietaryKey
fn tapret_host() -> ProprietaryKey
Constructs
PSBT_OUT_TAPRET_HOST proprietary key.Source§fn opret_commitment() -> ProprietaryKey
fn opret_commitment() -> ProprietaryKey
Constructs
PSBT_OUT_OPRET_COMMITMENT proprietary key.Source§fn tapret_commitment() -> ProprietaryKey
fn tapret_commitment() -> ProprietaryKey
Constructs
PSBT_OUT_TAPRET_COMMITMENT proprietary key.Source§fn tapret_proof() -> ProprietaryKey
fn tapret_proof() -> ProprietaryKey
Constructs
PSBT_OUT_TAPRET_PROOF proprietary key.Source§fn rgb_transition(opid: OpId) -> ProprietaryKey
fn rgb_transition(opid: OpId) -> ProprietaryKey
Constructs
PSBT_GLOBAL_RGB_TRANSITION proprietary key.Source§fn rgb_close_method() -> ProprietaryKey
fn rgb_close_method() -> ProprietaryKey
Constructs
PSBT_GLOBAL_RGB_CLOSE_METHOD proprietary key.Source§fn rgb_consumed_by(contract_id: ContractId) -> ProprietaryKey
fn rgb_consumed_by(contract_id: ContractId) -> ProprietaryKey
Constructs
PSBT_GLOBAL_RGB_CONSUMED_BY proprietary key.Source§fn rgb_tapret_host_on_change() -> ProprietaryKey
fn rgb_tapret_host_on_change() -> ProprietaryKey
Constructs
PSBT_GLOBAL_RGB_TAP_HOST_CHANGE proprietary key.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<Subtype> Serialize for ProprietaryKey<Subtype>
impl<Subtype> Serialize for ProprietaryKey<Subtype>
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
Source§impl<Subtype> TryFrom<Key> for ProprietaryKey<Subtype>
impl<Subtype> TryFrom<Key> for ProprietaryKey<Subtype>
Source§fn try_from(
key: Key,
) -> Result<ProprietaryKey<Subtype>, <ProprietaryKey<Subtype> as TryFrom<Key>>::Error>
fn try_from( key: Key, ) -> Result<ProprietaryKey<Subtype>, <ProprietaryKey<Subtype> as TryFrom<Key>>::Error>
Constructs a ProprietaryKey from a Key.
§Errors
Returns Error::InvalidProprietaryKey if key does not start with 0xFC byte.
impl<Subtype> Eq for ProprietaryKey<Subtype>
impl<Subtype> StructuralPartialEq for ProprietaryKey<Subtype>
Auto Trait Implementations§
impl<Subtype> Freeze for ProprietaryKey<Subtype>where
Subtype: Freeze,
impl<Subtype> RefUnwindSafe for ProprietaryKey<Subtype>where
Subtype: RefUnwindSafe,
impl<Subtype> Send for ProprietaryKey<Subtype>where
Subtype: Send,
impl<Subtype> Sync for ProprietaryKey<Subtype>where
Subtype: Sync,
impl<Subtype> Unpin for ProprietaryKey<Subtype>where
Subtype: Unpin,
impl<Subtype> UnwindSafe for ProprietaryKey<Subtype>where
Subtype: UnwindSafe,
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.