pub struct Anchor {
pub mmb_proof: BundleProof,
pub mpc_protocol: ProtocolId,
pub mpc_proof: MerkleProof,
pub dbc_proof: Option<TapretProof>,
pub fallback_proof: ReservedBytes<1>,
}Expand description
Anchor is a client-side witness for the bitcoin txout seals.
Anchor is a set of data required for the client-side validation of a bitcoin txout single-use seal, which can’t be recovered from the transaction and other public information itself.
Fields§
§mmb_proof: BundleProofThe proof that each witness transaction input is used only in a single bundle.
mpc_protocol: ProtocolIdThe protocol under which the client-side witness is valid.
mpc_proof: MerkleProofThe inclusion proof (using multiprotocol commitments) of a commitment under the
[mpc_protocol] into the published witness.
dbc_proof: Option<TapretProof>The deterministic bitcoin commitment proof that the witness commitment is valid.
fallback_proof: ReservedBytes<1>Reserved for the future proofs regarding fallback seals.
Implementations§
Source§impl Anchor
impl Anchor
Sourcepub fn is_fallback(&self) -> bool
pub fn is_fallback(&self) -> bool
Detect whether an anchor corresponds to a fallback proof or not.
§Nota bene
In the current version fallback proofs are not implemented, and this method always returns
false.
Sourcepub fn verify_fallback(&self) -> Result<(), AnchorError>
pub fn verify_fallback(&self) -> Result<(), AnchorError>
Verify the fallback proof.
§Nota bene
In the current version fallback proofs are not implemented, and this method always returns
Ok(()) (since if there is no fallback proof defined, it is a case of a valid situation).
Trait Implementations§
Source§impl ClientSideWitness for Anchor
impl ClientSideWitness for Anchor
Source§type Proof = Proof
type Proof = Proof
Source§type Seal = TxoSeal
type Seal = TxoSeal
Source§type Error = AnchorError
type Error = AnchorError
Self::convolve_commit operation.Source§fn convolve_commit(&self, mmb_message: Message) -> Result<Proof, Self::Error>
fn convolve_commit(&self, mmb_message: Message) -> Result<Proof, Self::Error>
Self::Proof, which is lately verified by
SealWitness::verify_seal_closing and
SealWitness::verify_seals_closing against the published part of the
witness.Source§impl<'de> Deserialize<'de> for Anchor
impl<'de> Deserialize<'de> for Anchor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Anchor
impl Ord for Anchor
Source§impl PartialOrd for Anchor
impl PartialOrd for Anchor
Source§impl StrictDecode for Anchor
impl StrictDecode for Anchor
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for Anchor
impl StrictDumb for Anchor
fn strict_dumb() -> Self
Source§impl StrictEncode for Anchor
impl StrictEncode for Anchor
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictStruct for Anchor
impl StrictStruct for Anchor
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Anchor
impl StrictType for Anchor
const STRICT_LIB_NAME: &'static str = dbc::LIB_NAME_BPCORE
fn strict_name() -> Option<TypeName>
impl Eq for Anchor
impl StrictProduct for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl Freeze for Anchor
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnwindSafe for Anchor
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
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
key and return true if they are equal.