Search
Cut struct definition.
Cut
@type chain_id() :: 0..19 | String.t() | atom()
@type error() :: {:error, Keyword.t()}
@type hashes() :: map() | list()
@type height() :: non_neg_integer()
@type id() :: String.t()
@type instance() :: String.t()
@type origin() :: map() | nil
@type result() :: t() | error()
@type t() :: %Kadena.Chainweb.Cut{ hashes: hashes(), height: height(), id: id(), instance: instance(), origin: origin(), weight: weight() }
@type validation() :: {:ok, map() | chain_id()} | error()
@type weight() :: String.t()
@spec add_hash(cut :: t(), chain_id :: chain_id(), hash :: map()) :: result()
@spec remove_hash(cut :: t(), chain_id :: chain_id()) :: result()
@spec set_hashes(cut :: t(), hashes :: hashes()) :: result()
@spec set_height(cut :: t(), height :: height()) :: result()
@spec set_id(cut :: t(), id :: id()) :: result()
@spec set_instance(cut :: t(), instance :: instance()) :: result()
@spec set_origin(cut :: t(), origin :: origin()) :: result()
@spec set_weight(cut :: t(), weight :: weight()) :: result()