package tezos-protocol-014-PtKathma
The type of the inbox for a smart-contract rollup as stored by the protocol in the context. Values that inhabit this type only act as fingerprint for inboxes.
Inbox contents is represented using Raw_context.TREE.tree
s. (See below.)
val pp : Tezos_protocol_environment_014_PtKathma.Format.formatter -> t -> unit
val encoding : t Tezos_protocol_environment_014_PtKathma.Data_encoding.t
val empty : Sc_rollup_repr.t -> Raw_level_repr.t -> t
empty level
is an inbox started at some given level
with no message at all.
val inbox_level : t -> Raw_level_repr.t
inbox_level inbox
returns the maximum level of message insertion in inbox
or its initial level.
val number_of_available_messages :
t ->
Tezos_protocol_environment_014_PtKathma.Z.t
number_of_available_messages inbox
returns the number of messages that can be consumed in inbox
.
val number_of_messages_during_commitment_period : t -> int64
number_of_messages_during_commitment_period inbox
returns the number of messages added in the inbox since the beginning of the current commitment period.
val start_new_commitment_period : t -> Raw_level_repr.t -> t
start_new_commitment_period inbox level
marks the beginning of a new commitment period at some level
.
val starting_level_of_current_commitment_period : t -> Raw_level_repr.t
starting_level_of_current_commitment_period inbox
returns the level at the beginning of a current commitment period.
val consume_n_messages :
int32 ->
t ->
t option Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
consume_n_messages n inbox
returns an inbox where n
messages have been consumed, or None
if there are strictly less than n
messages available in inbox
.