Octez_smart_rollup_node.Purposetype 'a t = | Operating : Tezos_crypto.Signature.public_key_hash t| Batching : Tezos_crypto.Signature.public_key_hash list t| Cementing : Tezos_crypto.Signature.public_key_hash t| Recovering : Tezos_crypto.Signature.public_key_hash t| Executing_outbox : Tezos_crypto.Signature.public_key_hash tPurposes for operators, indicating their role and thus the kinds of operations that they sign.
existential type for purpose.
val all : ex_purpose listList of possible purposes for operator specialization.
module Map : Tezos_base.TzPervasives.Map.S with type key = ex_purposemodule Set : Tezos_base.TzPervasives.Set.S with type elt = ex_purposetype 'a operator = | Single : Tezos_crypto.Signature.public_key_hash -> Tezos_crypto.Signature.public_key_hash
operator| Multiple : Tezos_crypto.Signature.public_key_hash list -> Tezos_crypto.Signature.public_key_hash
list
operatorOperator type. An operator is either a single key or a list of keys.
existential type for operator.
type operators = private ex_operator Map.toperators type is a map from purpose to operator. This type is private to control its creation and make sure `kind t and `kind operator are correctly related with `kind
val to_string_ex_purpose : ex_purpose -> stringto_string_ex_purpose p returns a string representation of purpose p.
val pp : Stdlib.Format.formatter -> 'a t -> unitval pp_ex_purpose : Stdlib.Format.formatter -> ex_purpose -> unitval of_string_ex_purpose : string -> ex_purpose optionof_string_ex_purpose s parses a purpose from the given string s.
val of_string_exn_ex_purpose : string -> ex_purposeof_string_exn_ex_purpose s parses a purpose from the given string s.
val no_operators : operatorsEmpty map of operators.
val operators_encoding : operators Tezos_base.TzPervasives.Data_encoding.tval make_operators :
?default_operator:Tezos_crypto.Signature.public_key_hash ->
needed_purposes:ex_purpose list ->
(ex_purpose * Tezos_crypto.Signature.public_key_hash) list ->
operators Tezos_base.TzPervasives.tzresult Lwt.tmake_operators ?default ~needed_purposes operators constructs a purpose map from a list of bindings operators, with a potential default key. If operators does not cover all purposes of needed_purposes and does not contains a default key then fails.
val replace_operators :
?default_operator:Tezos_crypto.Signature.public_key_hash ->
needed_purposes:ex_purpose list ->
(ex_purpose * Tezos_crypto.Signature.public_key_hash) list ->
operators ->
operators Tezos_base.TzPervasives.tzresult Lwt.treplace_operators ?default_operator ~needed_purposes purposed_keys operators replaces keys of operators by default_operator if it's set or by the purposed key in purposed_keys. It does nothing if default_operator is not set or purposed_keys is empty. Similar to make_operator the returns operators contains only mapping of purpose from needed_purposes.
val operation_kind : ex_purpose -> Octez_smart_rollup.Operation_kind.t listFor each purpose, it returns a list of associated operation kinds.
val of_operation_kind :
Octez_smart_rollup.Operation_kind.t list ->
ex_purpose listFor a list of operation kind, it returns a list of associated purpose.
find_operator purpose operators returns the operator for the purpose from the operators list. The 'kind type is to know if this purpose allows only one or multiple operators.
val mem_operator : Tezos_crypto.Signature.public_key_hash -> operators -> boolmem_operator operator operators checks of operator is part of any purpose in operators.
val operators_bindings : operators -> (ex_purpose * ex_operator) listfunction to bypass the private type. The opposite is not exposed so we don't risk corrupting the map with invalid 'kind1 purpose_kind -> 'kind2 operator mapping where 'kind1 <> 'kind2