Module Proto.Encoding

module Json = Json_encoding
module Bin = Binary.Encoding
type 'a encoding = {
  1. json : 'a Json.encoding;
  2. bin : 'a Bin.encoding;
}
type 'a field = {
  1. json_f : 'a Json.field;
  2. bin_f : 'a Bin.field;
}
type 'a case = {
  1. json_c : 'a Json.case;
  2. bin_c : 'a Bin.case;
}
val unit : unit encoding
val empty : unit encoding
val constant : string -> unit encoding
val int : int encoding
val int32 : int32 encoding
val int53 : int64 encoding
val bool : bool encoding
val string : string encoding
val bytes : bytes encoding
val option : 'a encoding -> 'a option encoding
val list : 'a encoding -> 'a list encoding
val array : 'a encoding -> 'a array encoding
val string_enum : (string * 'a) list -> 'a encoding
val merge_objs : 'a encoding -> 'b encoding -> ('a * 'b) encoding
val merge_tups : 'a encoding -> 'b encoding -> ('a * 'b) encoding
val assoc : 'a encoding -> (string * 'a) list encoding
val conv : ('a -> 'b) -> ('b -> 'a) -> 'b encoding -> 'a encoding
val mu : string -> ?title:string -> ?description:string -> ('a encoding -> 'a encoding) -> 'a encoding
val def : string -> ?title:string -> ?description:string -> 'a encoding -> 'a encoding
val req : ?title:string -> ?description:string -> string -> 'a encoding -> 'a field
val opt : ?title:string -> ?description:string -> string -> 'a encoding -> 'a option field
val dft : ?title:string -> ?description:string -> ?construct:bool -> string -> 'a encoding -> 'a -> 'a field
val case : ?title:string -> ?description:string -> 'a encoding -> ('b -> 'a option) -> ('a -> 'b) -> 'b case
val union : 'a case list -> 'a encoding
val obj1 : 'a field -> 'a encoding
val obj2 : 'a field -> 'b field -> ('a * 'b) encoding
val obj3 : 'a field -> 'b field -> 'c field -> ('a * 'b * 'c) encoding
val obj4 : 'a field -> 'b field -> 'c field -> 'd field -> ('a * 'b * 'c * 'd) encoding
val obj5 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> ('a * 'b * 'c * 'd * 'e) encoding
val obj6 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> ('a * 'b * 'c * 'd * 'e * 'f) encoding
val obj7 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) encoding
val obj8 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> 'h field -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h) encoding
val obj9 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> 'h field -> 'i field -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i) encoding
val obj10 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> 'h field -> 'i field -> 'j field -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j) encoding
val tup1 : 'a encoding -> 'a encoding
val tup2 : 'a encoding -> 'b encoding -> ('a * 'b) encoding
val tup3 : 'a encoding -> 'b encoding -> 'c encoding -> ('a * 'b * 'c) encoding
val tup4 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> ('a * 'b * 'c * 'd) encoding
val tup5 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> ('a * 'b * 'c * 'd * 'e) encoding
val tup6 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> ('a * 'b * 'c * 'd * 'e * 'f) encoding
val tup7 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) encoding
val tup8 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> 'h encoding -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h) encoding
val tup9 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> 'h encoding -> 'i encoding -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i) encoding
val tup10 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> 'h encoding -> 'i encoding -> 'j encoding -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j) encoding
val any : Json_repr.ezjsonm encoding
val hex_json : Crypto.H.t Json.encoding
val uint32_json : int32 Json.encoding
val uint32 : int32 encoding
val uint64_json : int64 Json.encoding
val uint64 : int64 encoding
val uzarith_json : Z.t Json.encoding
val uzarith : Z.t encoding
val zarith : Z.t encoding
val pkh : string encoding
val contract : string encoding
val pk : string encoding
val block_hash : string encoding
val signature : string encoding
val script_expr_hash : string encoding
val operations_hash : string encoding
val operation_hash : string encoding
val context_hash : string encoding
val nonce_hash : string encoding
val protocol_hash : string encoding
val chain_id : string encoding
val tx_rollup_hash : string encoding
val tx_inbox_hash : string encoding
val tx_message_result_hash : string encoding
val tx_commitment_hash : string encoding
val sc_rollup_hash : string encoding
val sc_commitment_hash : string encoding
val sc_state_hash : string encoding
val l2_address : string encoding
val construct : ?compact:bool -> 'a encoding -> 'a -> string
val destruct : 'a encoding -> string -> ('a, [> EzEncoding.destruct_error ]) Stdlib.result
val serialize : 'a encoding -> 'a -> (Crypto.Raw.t, [ `forge_error of string | `no_case_matched of int option | `recursive_error ]) Stdlib.result
val deserialize : 'a encoding -> Crypto.Raw.t -> ('a, [ `end_of_bytes of int | `int_too_long | `no_case_matched of int option | `not_a_bool of char * int | `recursive_error | `unexpected_tag of string * int ]) Stdlib.result