Type Alias simplicity::node::ConstructNode
source · pub type ConstructNode<J> = Node<Construct<J>>;Aliased Type§
struct ConstructNode<J> { /* private fields */ }Implementations§
source§impl<J: Jet> ConstructNode<J>
impl<J: Jet> ConstructNode<J>
sourcepub fn set_arrow_to_program(&self) -> Result<(), Error>
pub fn set_arrow_to_program(&self) -> Result<(), Error>
Sets the source and target type of the node to unit
sourcepub fn finalize_types(&self) -> Result<Arc<CommitNode<J>>, Error>
pub fn finalize_types(&self) -> Result<Arc<CommitNode<J>>, Error>
Convert a ConstructNode to a CommitNode by finalizing all of the types.
Also sets the source and target type of this node to unit. This is almost
certainly what you want, since the resulting CommitNode cannot be further
composed, and needs to be 1->1 to go on-chain. But if you don’t, call
[Self::finalize_types_without_fixing] instead.
sourcepub fn finalize_types_non_program(&self) -> Result<Arc<CommitNode<J>>, Error>
pub fn finalize_types_non_program(&self) -> Result<Arc<CommitNode<J>>, Error>
Convert a ConstructNode to a CommitNode by finalizing all of the types.
Does not sets the source and target type of this node to unit.
sourcepub fn decode<I: Iterator<Item = u8>>(
bits: &mut BitIter<I>
) -> Result<Arc<Self>, Error>
pub fn decode<I: Iterator<Item = u8>>( bits: &mut BitIter<I> ) -> Result<Arc<Self>, Error>
Decode a Simplicity expression 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()].