Enum dbc::tapret::Lnpbp12

source ·
pub enum Lnpbp12 {}
Expand description

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

Trait Implementations§

source§

impl CommitVerify<TapretCommitment, Lnpbp12> for TapScript

source§

fn commit(commitment: &TapretCommitment) -> Self

Tapret script consists of 29 OP_RESERVED 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) -> bool

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, Lnpbp12> for InternalPk

§

type Commitment = OutputPk

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

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, Lnpbp12> for ScriptPubkey

§

type Commitment = ScriptPubkey

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

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, Lnpbp12> for Tx

§

type Commitment = Tx

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

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, Lnpbp12> for TxOut

§

type Commitment = TxOut

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

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, Lnpbp12> for TapretProof

§

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<bool, <Source as ConvolveCommit<Msg, Self, Protocol>>::CommitError>
where Self: VerifyEq,

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

impl ConvolveCommitProof<Commitment, ScriptPubkey, Lnpbp12> for TapretProof

§

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<bool, <Source as ConvolveCommit<Msg, Self, Protocol>>::CommitError>
where Self: VerifyEq,

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

impl ConvolveCommitProof<Commitment, Tx, Lnpbp12> for TapretProof

§

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<bool, <Source as ConvolveCommit<Msg, Self, Protocol>>::CommitError>
where Self: VerifyEq,

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

impl ConvolveCommitProof<Commitment, TxOut, Lnpbp12> for TapretProof

§

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<bool, <Source as ConvolveCommit<Msg, Self, Protocol>>::CommitError>
where Self: VerifyEq,

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

impl CommitmentProtocol for Lnpbp12

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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.
§

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

§

fn vzip(self) -> V