pub type CommitNode<J> = Node<Commit<J>>;
Aliased Type§
pub struct CommitNode<J> { /* private fields */ }
Implementations§
Source§impl<J: Jet> CommitNode<J>
impl<J: Jet> CommitNode<J>
Sourcepub fn arrow(&self) -> &FinalArrow
pub fn arrow(&self) -> &FinalArrow
Accessor for the node’s arrow
Sourcepub fn finalize<C: Converter<Commit<J>, Redeem<J>>>(
&self,
converter: &mut C,
) -> Result<Arc<RedeemNode<J>>, C::Error>
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.
Sourcepub fn unfinalize_types(&self) -> Result<Arc<ConstructNode<J>>, Error>
pub fn unfinalize_types(&self) -> Result<Arc<ConstructNode<J>>, Error>
Convert a CommitNode
back to a ConstructNode
by redoing type inference
Sourcepub fn decode<I: Iterator<Item = u8>>(
bits: BitIter<I>,
) -> Result<Arc<Self>, DecodeError>
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()
.
Sourcepub fn encode<W: Write>(&self, w: &mut BitWriter<W>) -> Result<usize>
👎Deprecated since 0.5.0: use Self::encode_without_witness instead
pub fn encode<W: Write>(&self, w: &mut BitWriter<W>) -> Result<usize>
Encode a Simplicity expression to bits without any witness data
Sourcepub fn encode_to_vec(&self) -> Vec<u8> ⓘ
👎Deprecated since 0.5.0: use Self::to_vec_without_witness instead
pub fn encode_to_vec(&self) -> Vec<u8> ⓘ
Encode a Simplicity program to a vector of bytes, without any witness data.