pub struct Amr(/* private fields */);Expand description
Annotated Merkle root
A Merkle root that commits to a node’s combinator, its source and target type, its witness data (if present), and recursively its children.
Uniquely identifies a program’s structure in terms of types at redemption time.
Implementations§
Source§impl Amr
impl Amr
Sourcepub const fn from_byte_array(data: [u8; 32]) -> Self
pub const fn from_byte_array(data: [u8; 32]) -> Self
Converts the given tagged hash into a byte array
Sourcepub const fn to_byte_array(self) -> [u8; 32]
pub const fn to_byte_array(self) -> [u8; 32]
Converts the given tagged hash into a byte array
Sourcepub const fn as_byte_array(&self) -> &[u8; 32]
pub const fn as_byte_array(&self) -> &[u8; 32]
Converts the given tagged hash into a byte array
Source§impl Amr
impl Amr
Sourcepub fn iden(ty: &FinalArrow) -> Self
pub fn iden(ty: &FinalArrow) -> Self
Produce a CMR for an iden combinator
Sourcepub fn unit(ty: &FinalArrow) -> Self
pub fn unit(ty: &FinalArrow) -> Self
Produce a CMR for a unit combinator
Sourcepub fn injl(ty: &FinalArrow, child: Amr) -> Self
pub fn injl(ty: &FinalArrow, child: Amr) -> Self
Produce a CMR for an injl combinator
Sourcepub fn injr(ty: &FinalArrow, child: Amr) -> Self
pub fn injr(ty: &FinalArrow, child: Amr) -> Self
Produce a CMR for an injr combinator
Sourcepub fn take(ty: &FinalArrow, child: Amr) -> Self
pub fn take(ty: &FinalArrow, child: Amr) -> Self
Produce a CMR for a take combinator
Sourcepub fn drop(ty: &FinalArrow, child: Amr) -> Self
pub fn drop(ty: &FinalArrow, child: Amr) -> Self
Produce a CMR for a drop combinator
Sourcepub fn comp(
ty: &FinalArrow,
left_arrow: &FinalArrow,
left: Amr,
right: Amr,
) -> Self
pub fn comp( ty: &FinalArrow, left_arrow: &FinalArrow, left: Amr, right: Amr, ) -> Self
Produce a CMR for a comp combinator
Sourcepub fn case(ty: &FinalArrow, left: Amr, right: Amr) -> Self
pub fn case(ty: &FinalArrow, left: Amr, right: Amr) -> Self
Produce a CMR for a case combinator
Sourcepub fn assertl(ty: &FinalArrow, left: Amr, right: Amr) -> Self
pub fn assertl(ty: &FinalArrow, left: Amr, right: Amr) -> Self
Produce a CMR for an assertl combinator
Sourcepub fn assertr(ty: &FinalArrow, left: Amr, right: Amr) -> Self
pub fn assertr(ty: &FinalArrow, left: Amr, right: Amr) -> Self
Produce a CMR for an assertr combinator
Sourcepub fn pair(
ty: &FinalArrow,
left_arrow: &FinalArrow,
right_arrow: &FinalArrow,
left: Amr,
right: Amr,
) -> Self
pub fn pair( ty: &FinalArrow, left_arrow: &FinalArrow, right_arrow: &FinalArrow, left: Amr, right: Amr, ) -> Self
Produce a CMR for a pair combinator
Sourcepub fn disconnect(
ty: &FinalArrow,
right_arrow: &FinalArrow,
left: Amr,
right: Amr,
) -> Self
pub fn disconnect( ty: &FinalArrow, right_arrow: &FinalArrow, left: Amr, right: Amr, ) -> Self
Produce a CMR for a disconnect combinator
Sourcepub fn witness(ty: &FinalArrow, value: &Value) -> Self
pub fn witness(ty: &FinalArrow, value: &Value) -> Self
Produce a CMR for a witness combinator
Sourcepub fn fail(entropy: FailEntropy) -> Self
pub fn fail(entropy: FailEntropy) -> Self
Produce an AMR for a fail combinator
Sourcepub fn const_word(word: &Word) -> Self
pub fn const_word(word: &Word) -> Self
Compute the CMR of a constant word jet
This is equal to the IHR of the equivalent scribe, converted to a CMR in the usual way for jets.