Type Alias CommitNode

Source
pub type CommitNode<J> = Node<Commit<J>>;

Aliased Type§

pub struct CommitNode<J> { /* private fields */ }

Implementations§

Source§

impl<J: Jet> CommitNode<J>

Source

pub fn arrow(&self) -> &FinalArrow

Accessor for the node’s arrow

Source

pub fn amr(&self) -> Option<Amr>

Accessor for the node’s AMR, if known

Source

pub fn ihr(&self) -> Option<Ihr>

Accessor for the node’s IHR, if known

Source

pub fn finalize<C: Converter<Commit<J>, Redeem<J>>>( &self, converter: &mut C, ) -> Result<Arc<RedeemNode<J>>, C::Error>

Finalizes a DAG, by iterating through through it without sharing, attaching witnesses, and hiding branches.

This is a thin wrapper around Node::convert which fixes a few types to make it easier to use.

Source

pub fn unfinalize_types(&self) -> Result<Arc<ConstructNode<J>>, Error>

Convert a CommitNode back to a ConstructNode by redoing type inference

Source

pub fn decode<I: Iterator<Item = u8>>( bits: BitIter<I>, ) -> Result<Arc<Self>, DecodeError>

Decode a Simplicity program from bits, without witness data.

§Usage

Use this method only if the serialization does not include the witness data. This means, the program simply has no witness during commitment, or the witness is provided by other means.

If the serialization contains the witness data, then use RedeemNode::decode().

Source

pub fn encode<W: Write>(&self, w: &mut BitWriter<W>) -> Result<usize>

👎Deprecated since 0.5.0: use Self::encode_without_witness instead

Encode a Simplicity expression to bits without any witness data

Source

pub fn encode_to_vec(&self) -> Vec<u8>

👎Deprecated since 0.5.0: use Self::to_vec_without_witness instead

Encode a Simplicity program to a vector of bytes, without any witness data.