> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function encode_private_note_message

Module: `noir_aztec::messages::logs::note`

```rust
pub fn encode_private_note_message<Note>(
    note: Note,
    owner: AztecAddress,
    storage_slot: Field,
    randomness: Field,
) -> [Field; <Note as protocol_types::traits::Packable>::N + 4]
where
    Note: NoteType,
    Note: Packable
```

Creates the plaintext for a private note message (i.e. one of type [`PRIVATE_NOTE_MSG_TYPE_ID`](/aztec-nr-api/v6.0.0/noir_aztec/messages/msg_type/global.PRIVATE_NOTE_MSG_TYPE_ID.md)).

This plaintext is meant to be decoded via \[`decode_private_note_message`].
