Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

NIP-59 (Gift Wrap)

Digital Sovereignty

Definition

NIP-59 defines "gift wrapping," a three-layer construction that lets Nostr events hide not just their content but most of their metadata. It is the generic mechanism that private-messaging and other confidential protocols reuse, rather than each reinventing metadata protection. The design progressively peels concerns apart across three nested events.

The three layers

The innermost layer is the rumor: an unsigned event carrying the real content. Because it has no signature, a leaked rumor cannot be cryptographically attributed to anyone, which provides a form of deniability. The middle layer is the seal (kind 13), which encrypts the rumor and is signed by the author's real key; the only thing publicly visible is who signed it, not what was said or to whom. The outer layer is the gift wrap (kind 1059, or ephemeral kind 21059) encrypted under a single-use, randomly generated keypair, so the true sender's identity is hidden while routing tags like the recipient remain readable by relays.

Why it matters

Each layer isolates a concern: content without attribution, authorship without disclosure, and delivery routing without revealing the real sender. Encryption uses NIP-44, and timestamps outside the rumor are randomized to frustrate timing analysis. The kind 1059 form is stored by relays for asynchronous, offline delivery, while kind 21059 is ephemeral for real-time use.

This is the building block behind metadata-resistant communication on Nostr. We cover its most common application in NIP-17 (Private Direct Messages).

In Simple Terms

NIP-59 defines “gift wrapping,” a three-layer construction that lets Nostr events hide not just their content but most of their metadata. It is the generic…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Mining Glossary

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Compare Miners