Message.Basetype unicast_header = | Unicast_header of {src : Com.pubkey;dst : Com.pubkey;ttl : Com.ttl;exp : Com.expiry;}type multicast_header = | Multicast_header of {grp : Commons.multicast_group_pubkey;ttl : Com.ttl;exp : Com.expiry;seen : Com.seen;}type t = | Unicast_message of {header : unicast_header;body : body;sign : sign;via : via option;}| Multicast_message of {header : multicast_header;body : body;sign : sign;via : via option;}val fold :
(unicast_header -> body -> sign -> via option -> 'a) ->
(multicast_header -> body -> sign -> via option -> 'a) ->
t ->
'aval fold_unwrap :
(unicast_header -> string -> string -> Com.pubkey option -> 'a) ->
(multicast_header -> string -> string -> Com.pubkey option -> 'a) ->
t ->
'aval fold_unwrap' :
(Com.pubkey -> string -> string -> Com.pubkey option -> 'a) ->
(Commons.multicast_group_pubkey ->
string ->
string ->
Com.pubkey option ->
'a) ->
t ->
'aval fold_flip_multi :
t ->
(multicast_header -> body -> sign -> via option -> 'a) ->
'aval fold_flip_multi_unwrap :
t ->
(multicast_header -> string -> string -> Com.pubkey option -> 'a) ->
'aval fold_flip_multi_unwrap' :
t ->
(Commons.multicast_group_pubkey ->
string ->
string ->
Com.pubkey option ->
'a) ->
'aval fold_header :
(Com.pubkey -> Com.pubkey -> Com.ttl -> Com.expiry -> 'a) ->
(Commons.multicast_group_pubkey -> Com.ttl -> Com.expiry -> Com.seen -> 'a) ->
t ->
'aval fold_header' :
(unicast_header -> 'a) ->
(multicast_header -> 'a) ->
t ->
'amodule Acc : sig ... endmodule T : sig ... endmodule Pp : sig ... endmodule Decode : sig ... endmodule Encode : sig ... endval is_unicast : t -> boolval is_multicast : t -> boolval sign_prepare :
[< `Multi of multicast_header | `Uni of unicast_header ] ->
string ->
stringval sign_message :
Upsycle_router__Commons.privkey ->
[< `Multi of multicast_header | `Uni of unicast_header ] ->
string ->
stringval verify_signature : Upsycle_router__Commons.pubkey -> t -> unit Lwt.tmodule Mk : sig ... endval pp : Stdlib.Format.formatter -> t -> unitval pp_short : Stdlib.Format.formatter -> t -> unitval get_uni_field : [< `Dst | `Src ] -> t -> Com.pubkeyval get_multi_field : [< `Grp ] -> t -> Commons.multicast_group_pubkeyval get_uni_src : t -> Com.pubkeyThese raise an exception on multicast messages: caller must be sure it's a unicast message
val get_uni_dst : t -> Com.pubkeyval get_multi_group : t -> Commons.multicast_group_pubkeyThese raise an exception on unicast messages: caller must be sure it's a multicast message
val get_multi_group' : t -> Upsycle_router__Commons.pubkeyval is_for : Com.pubkey -> t -> boolReturns `false` for a multicast message and therefore doesn't raise any exceptions. Works by checking the `dst` field.
val via_set : Com.pubkey -> t -> tval message_id_s :
[< `Blake2b_256 | `Blake2b_32 | `Blake2s_128 | `Blake2s_32 ] ->
t ->
stringval message_id :
[< `Blake2b_256 | `Blake2b_32 | `Blake2s_128 | `Blake2s_32 ] ->
t ->
Com.msg_id