merkle/merkle_path

Types

pub type MerklePath {
  MerklePath(nodes: List(MerklePathNode))
}

Constructors

  • MerklePath(nodes: List(MerklePathNode))
pub type MerklePathNode {
  MerklePathNode(hash: BitArray, is_left: Bool)
}

Constructors

  • MerklePathNode(hash: BitArray, is_left: Bool)

Functions

pub fn deserialize(
  buf: BitArray,
) -> Result(#(MerklePath, BitArray), String)
pub fn deserialize_all(
  buf: BitArray,
) -> Result(MerklePath, String)
pub fn empty() -> MerklePath
pub fn serialize(
  builder: BytesBuilder,
  path: MerklePath,
) -> BytesBuilder
pub fn serialize_to_bits(path: MerklePath) -> BitArray
Search Document