Ton.Cell (ton v0.5.1)

Cell data structure used in serialization and deserialization

Summary

Types

cell_kind()

@type cell_kind() ::
  :pruned | :library_reference | :merkle_proof | :merkle_update | :ordinary

t()

@type t() :: %Ton.Cell{data: Ton.Bitstring.t(), kind: cell_kind(), refs: term()}

Functions

hash(cell)

@spec hash(t()) :: binary()

new(kind \\ :ordinary, data \\ nil)

@spec new(atom(), Ton.Bitstring.t() | nil) :: t()

parse(binary_data, reference_index_size)

@spec parse(binary(), non_neg_integer()) :: {t(), binary()} | no_return()

serialize(root_cell, opts \\ [])

@spec serialize(t(), Keyword.t()) :: binary()

write_cell(cell, another_cell)

@spec write_cell(t(), t()) :: t()