aztec-nr - noir_aztec::messages::encoding

Function encode_message

pub fn encode_message<let N: u32>(
    msg_type: u64,
    msg_metadata: u64,
    msg_content: [Field; N],
) -> [Field; N + 1]

Encodes a message following aztec-nr's standard message encoding. This message can later be decoded with decode_message to retrieve the original values.