Skip to main content

Module memo

Module memo 

Source
Expand description

Structured 36-byte shielded note memo (DashMemo).

Every shielded output carries a fixed 36-byte memo (MEMO_SIZE). The dashpay Orchard fork pins the memo to 36 bytes (Zcash’s is 512) by making the memo size a type parameter; the on-chain note ciphertext reserves exactly those bytes. This type imposes a small self-describing structure on those bytes so the wallet can attach an optional text note to a transfer and recover it on the receive side:

  • bytes [0..4]kind as a little-endian u32.
  • bytes [4..36] — a 32-byte payload whose meaning depends on kind.

Two kinds are defined today; unknown kinds round-trip verbatim as ShieldedMemo::Other so a future writer’s memo is never corrupted by an older reader.

Enums§

ShieldedMemo
A decoded shielded note memo.

Constants§

MEMO_PAYLOAD_SIZE
Length of the payload that follows the 4-byte kind tag.
MEMO_SIZE
Total memo length in bytes (DashMemo = [u8; 36]).