Enum TapretFirst

Source
pub enum TapretFirst {}
Expand description

Marker non-instantiable enum defining LNPBP-12 taproot OP_RETURN (tapret) protocol.

Trait Implementations§

Source§

impl CommitVerify<TapretCommitment, TapretFirst> for TapScript

Source§

fn commit(commitment: &TapretCommitment) -> Self

Tapret script consists of 29 OP_NOP pushes, followed by OP_RETURN, OP_PUSHBYTES_33 and serialized commitment data (MPC commitment + nonce as a single slice).

Source§

fn verify(&self, msg: &Msg) -> Result<(), VerifyError>

Verifies commitment against the message; default implementation just repeats the commitment to the message and check it against the self.
Source§

impl ConvolveCommit<Commitment, TapretProof, TapretFirst> for InternalPk

Source§

type Commitment = OutputPk

Commitment type produced as a result of Self::convolve_commit procedure.
Source§

type CommitError = TapretKeyError

Error type that may be reported during Self::convolve_commit procedure. It may also be returned from ConvolveCommitProof::verify in case the proof data are invalid and the commitment can’t be re-created.
Source§

fn convolve_commit( &self, supplement: &TapretPathProof, msg: &Commitment, ) -> Result<(OutputPk, TapretProof), Self::CommitError>

Takes the supplement to unparse the content of this container (self) (“convolves” these two data together) and uses them to produce a final Self::Commitment to the message msg. Read more
Source§

impl ConvolveCommit<Commitment, TapretProof, TapretFirst> for ScriptPubkey

Source§

type Commitment = ScriptPubkey

Commitment type produced as a result of Self::convolve_commit procedure.
Source§

type CommitError = TapretKeyError

Error type that may be reported during Self::convolve_commit procedure. It may also be returned from ConvolveCommitProof::verify in case the proof data are invalid and the commitment can’t be re-created.
Source§

fn convolve_commit( &self, supplement: &TapretProof, msg: &Commitment, ) -> Result<(ScriptPubkey, TapretProof), Self::CommitError>

Takes the supplement to unparse the content of this container (self) (“convolves” these two data together) and uses them to produce a final Self::Commitment to the message msg. Read more
Source§

impl ConvolveCommit<Commitment, TapretProof, TapretFirst> for Tx

Source§

type Commitment = Tx

Commitment type produced as a result of Self::convolve_commit procedure.
Source§

type CommitError = TapretError

Error type that may be reported during Self::convolve_commit procedure. It may also be returned from ConvolveCommitProof::verify in case the proof data are invalid and the commitment can’t be re-created.
Source§

fn convolve_commit( &self, supplement: &TapretProof, msg: &Commitment, ) -> Result<(Tx, TapretProof), Self::CommitError>

Takes the supplement to unparse the content of this container (self) (“convolves” these two data together) and uses them to produce a final Self::Commitment to the message msg. Read more
Source§

impl ConvolveCommit<Commitment, TapretProof, TapretFirst> for TxOut

Source§

type Commitment = TxOut

Commitment type produced as a result of Self::convolve_commit procedure.
Source§

type CommitError = TapretKeyError

Error type that may be reported during Self::convolve_commit procedure. It may also be returned from ConvolveCommitProof::verify in case the proof data are invalid and the commitment can’t be re-created.
Source§

fn convolve_commit( &self, supplement: &TapretProof, msg: &Commitment, ) -> Result<(TxOut, TapretProof), Self::CommitError>

Takes the supplement to unparse the content of this container (self) (“convolves” these two data together) and uses them to produce a final Self::Commitment to the message msg. Read more
Source§

impl ConvolveCommitProof<Commitment, InternalPk, TapretFirst> for TapretProof

Source§

type Suppl = TapretPathProof

Supplement is a part of the proof data provided during commitment procedure.
Source§

fn restore_original(&self, _: &OutputPk) -> InternalPk

Restores the original source before the commitment from the supplement (the self) and commitment.
Source§

fn extract_supplement(&self) -> &Self::Suppl

Extract supplement from the proof.
Source§

fn verify( &self, msg: &Msg, commitment: &<Source as ConvolveCommit<Msg, Self, Protocol>>::Commitment, ) -> Result<(), ConvolveVerifyError>
where Self: VerifyEq,

Verifies commitment using proof (the self) against the message. Read more
Source§

impl ConvolveCommitProof<Commitment, ScriptPubkey, TapretFirst> for TapretProof

Source§

type Suppl = TapretProof

Supplement is a part of the proof data provided during commitment procedure.
Source§

fn restore_original(&self, _: &ScriptPubkey) -> ScriptPubkey

Restores the original source before the commitment from the supplement (the self) and commitment.
Source§

fn extract_supplement(&self) -> &Self::Suppl

Extract supplement from the proof.
Source§

fn verify( &self, msg: &Msg, commitment: &<Source as ConvolveCommit<Msg, Self, Protocol>>::Commitment, ) -> Result<(), ConvolveVerifyError>
where Self: VerifyEq,

Verifies commitment using proof (the self) against the message. Read more
Source§

impl ConvolveCommitProof<Commitment, Tx, TapretFirst> for TapretProof

Source§

type Suppl = TapretProof

Supplement is a part of the proof data provided during commitment procedure.
Source§

fn restore_original(&self, commitment: &Tx) -> Tx

Restores the original source before the commitment from the supplement (the self) and commitment.
Source§

fn extract_supplement(&self) -> &Self::Suppl

Extract supplement from the proof.
Source§

fn verify( &self, msg: &Msg, commitment: &<Source as ConvolveCommit<Msg, Self, Protocol>>::Commitment, ) -> Result<(), ConvolveVerifyError>
where Self: VerifyEq,

Verifies commitment using proof (the self) against the message. Read more
Source§

impl ConvolveCommitProof<Commitment, TxOut, TapretFirst> for TapretProof

Source§

type Suppl = TapretProof

Supplement is a part of the proof data provided during commitment procedure.
Source§

fn restore_original(&self, commitment: &TxOut) -> TxOut

Restores the original source before the commitment from the supplement (the self) and commitment.
Source§

fn extract_supplement(&self) -> &Self::Suppl

Extract supplement from the proof.
Source§

fn verify( &self, msg: &Msg, commitment: &<Source as ConvolveCommit<Msg, Self, Protocol>>::Commitment, ) -> Result<(), ConvolveVerifyError>
where Self: VerifyEq,

Verifies commitment using proof (the self) against the message. Read more
Source§

impl CommitmentProtocol for TapretFirst

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V