Encodes a message following aztec-nr's standard message encoding. This message can later be decoded with
decode_message to retrieve the original values.
The msg_type is an identifier that groups types of messages that are all processed the same way, e.g. private
notes or events. Possible values are defined in aztec::messages::msg_type.
The msg_metadata and msg_content are the values stored in the message, whose meaning depends on the
msg_type. The only special thing about msg_metadata that separates it from msg_content is that it is a u64
instead of a full Field (due to details of how messages are encoded), allowing applications that can fit values
into this smaller variable to achieve higher data efficiency.
Encodes a message following aztec-nr's standard message encoding. This message can later be decoded with
decode_messageto retrieve the original values.msg_typeis an identifier that groups types of messages that are all processed the same way, e.g. private notes or events. Possible values are defined inaztec::messages::msg_type.msg_metadataandmsg_contentare the values stored in the message, whose meaning depends on themsg_type. The only special thing aboutmsg_metadatathat separates it frommsg_contentis that it is a u64 instead of a full Field (due to details of how messages are encoded), allowing applications that can fit values into this smaller variable to achieve higher data efficiency.