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 -> 'b option encoding
val list : 'a encoding -> 'b list encoding
val array : 'a encoding -> 'b array encoding
val string_enum : (string * 'a) list -> 'b encoding
val merge_objs : 'a encoding -> 'b encoding -> ('c * 'd) encoding
val merge_tups : 'a encoding -> 'b encoding -> ('c * 'd) encoding
val assoc : 'a encoding -> (string * 'b) list encoding
val conv : ('a -> 'b) -> ('b -> 'a) -> 'c encoding -> 'd encoding
val mu : string -> ?title:string -> ?description:string -> ('a encoding -> 'b encoding) -> 'c encoding
val def : string -> ?title:string -> ?description:string -> 'a encoding -> 'b encoding
val req : ?title:string -> ?description:string -> string -> 'a encoding -> 'b field
val opt : ?title:string -> ?description:string -> string -> 'a encoding -> 'b option field
val dft : ?title:string -> ?description:string -> ?construct:bool -> string -> 'a encoding -> 'b -> 'c field
val case : ?title:string -> ?description:string -> 'a encoding -> ('b -> 'c option) -> ('c -> 'b) -> 'd case
val union : 'a case list -> 'b encoding
val obj1 : 'a field -> 'b encoding
val obj2 : 'a field -> 'b field -> ('c * 'd) encoding
val obj3 : 'a field -> 'b field -> 'c field -> ('d * 'e * 'f) encoding
val obj4 : 'a field -> 'b field -> 'c field -> 'd field -> ('e * 'f * 'g * 'h) encoding
val obj5 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> ('f * 'g * 'h * 'i * 'j) encoding
val obj6 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> ('g * 'h * 'i * 'j * 'k * 'l) encoding
val obj7 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> ('h * 'i * 'j * 'k * 'l * 'm * 'n) encoding
val obj8 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> 'h field -> ('i * 'j * 'k * 'l * 'm * 'n * 'o * 'p) encoding
val obj9 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> 'h field -> 'i field -> ('j * 'k * 'l * 'm * 'n * 'o * 'p * 'q * 'r) encoding
val obj10 : 'a field -> 'b field -> 'c field -> 'd field -> 'e field -> 'f field -> 'g field -> 'h field -> 'i field -> 'j field -> ('k * 'l * 'm * 'n * 'o * 'p * 'q * 'r * 's * 't) encoding
val tup1 : 'a encoding -> 'b encoding
val tup2 : 'a encoding -> 'b encoding -> ('c * 'd) encoding
val tup3 : 'a encoding -> 'b encoding -> 'c encoding -> ('d * 'e * 'f) encoding
val tup4 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> ('e * 'f * 'g * 'h) encoding
val tup5 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> ('f * 'g * 'h * 'i * 'j) encoding
val tup6 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> ('g * 'h * 'i * 'j * 'k * 'l) encoding
val tup7 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> ('h * 'i * 'j * 'k * 'l * 'm * 'n) encoding
val tup8 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> 'h encoding -> ('i * 'j * 'k * 'l * 'm * 'n * 'o * 'p) encoding
val tup9 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> 'h encoding -> 'i encoding -> ('j * 'k * 'l * 'm * 'n * 'o * 'p * 'q * 'r) encoding
val tup10 : 'a encoding -> 'b encoding -> 'c encoding -> 'd encoding -> 'e encoding -> 'f encoding -> 'g encoding -> 'h encoding -> 'i encoding -> 'j encoding -> ('k * 'l * 'm * 'n * 'o * 'p * 'q * 'r * 's * 't) 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 -> 'b -> string
val destruct : 'a encoding -> string -> ('b, [> EzEncoding.destruct_error ]) Stdlib.result
val serialize : 'a encoding -> 'b -> (Crypto.Raw.t, [ `forge_error of string | `no_case_matched of int option | `recursive_error ]) Stdlib.result
val deserialize : 'a encoding -> Crypto.Raw.t -> ('b, [ `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