12<html lang="en">3<head>4<meta charset="utf-8">5<meta name="viewport" content="width=device-width, initial-scale=1">6<title>NIP-33 - Parameterized Replaceable Events — Nostr Instruction Manual</title>7<meta name="description" content="NIP-33: parameterized replaceable events, renamed to addressable events, merged into NIP-01. This page explains what it defined and where the rules live now.">8<link rel="preload" href="../assets/fonts/michroma-400-latin.woff2" as="font" type="font/woff2" crossorigin>9<link rel="preload" href="../assets/fonts/exo2-var-latin.woff2" as="font" type="font/woff2" crossorigin>10<link rel="preload" href="../assets/fonts/sairacondensed-600-latin.woff2" as="font" type="font/woff2" crossorigin>11<link rel="preload" href="../assets/fonts/sairacondensed-700-latin.woff2" as="font" type="font/woff2" crossorigin>12<link rel="preload" href="../assets/fonts/sairacondensed-500-latin.woff2" as="font" type="font/woff2" crossorigin>13<link rel="preload" href="../assets/fonts/sharetechmono-400-latin.woff2" as="font" type="font/woff2" crossorigin>14<link rel="preload" href="../assets/fonts/exo2-400i-latin.woff2" as="font" type="font/woff2" crossorigin>15<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml">16<link rel="stylesheet" href="../assets/manual.css">17</head>18<body>1920<svg width="0" height="0" style="position:absolute">21 <defs>22 <marker id="arr" markerWidth="9" markerHeight="9" refX="7" refY="4.5" orient="auto">23 <path d="M1,1 L8,4.5 L1,8 Z" fill="#f26a00"/>24 </marker>25 <marker id="arrb" markerWidth="9" markerHeight="9" refX="7" refY="4.5" orient="auto">26 <path d="M1,1 L8,4.5 L1,8 Z" fill="#2e5f9e"/>27 </marker>28 </defs>29</svg>3031<div class="page">32 <span class="staple s1"></span><span class="staple s2"></span>3334 <header class="band">35 <a class="logo" href="../index.html">NOSTR<b>▸</b>PROTOCOL MANUAL</a>36 <span class="booklet-note">Chapter 33 - Core</span>37 </header>38 <nav class="tabs">39 <a href="../index.html">Contents</a>40 <a href="#overview" class="on">Overview</a>41 <a href="#spec">Spec</a>42 <a href="#examples">Examples</a>43 <a href="#history">History</a>44 </nav>4546 <div class="chapter">47 <div class="nipno" data-n="33">33</div>48 <div class="titles">49 <div class="kicker">Nostr Implementation Possibility - Hex № 33</div>50 <h1>Parameterized Replaceable Events</h1>51 <p class="sub">This chapter is closed. NIP-33 once defined a fourth event class, later renamed "addressable events". That rule is now part of the core protocol in <a href="01.html">NIP-01</a>.</p>52 </div>53 <div class="stamp merged">Merged</div>54 </div>5556 <main class="spread">57 <div class="main">5859 <h2 class="bar" id="overview"><span class="num">1</span> Overview</h2>60 <p><a href="16.html">NIP-16</a> gave every relay a way to replace an event: keep only the newest event per author and kind. That worked for a single profile status, but not for a list of items, where an author needs many independent, individually replaceable records of the same kind.</p>61 <p>NIP-33 added a fourth event class to solve this. It used a new kind range, and it replaced events per author, kind, <em>and</em> a tag value called <code>d</code>. This let one author keep many replaceable events of the same kind alive at once, each identified by its own <code>d</code> value.</p>6263 <div class="box hint">64 <span class="tag">Merged</span>65 <p>NIP-33 is closed and carries no separate rules of its own anymore. Its event class now lives in <a href="01.html#kinds">NIP-01, section 4 (Kinds and Storage Classes)</a>, under the name <strong>addressable events</strong>. Read this page for history, then read NIP-01 for the current spec.</p>66 </div>6768 <h2 class="bar" id="spec"><span class="num">2</span> What NIP-33 Defined</h2>69 <p>NIP-33 stated these rules, restated here in Simplified Technical English:</p>70 <ul>71 <li>A <strong>parameterized replaceable event</strong> is an event with a kind from 30000 to 39999.</li>72 <li>For each author, kind, and first <code>d</code> tag value, the relay keeps only the newest event. It discards older ones.</li>73 <li>When two such events share the same <code>created_at</code> timestamp, the relay keeps the one whose <code>id</code> sorts first.</li>74 <li>A missing <code>d</code> tag, an empty <code>tags</code> array, or a <code>d</code> tag with no value all count as a <code>d</code> value of <code>""</code> (empty string). If an event has more than one <code>d</code> tag, only the first one counts.</li>75 <li>Clients should always include a <code>d</code> tag with a real value, so the event can be found with a <code>#d</code> filter.</li>76 </ul>77 <p>NIP-33 also defined the <code>a</code> tag, for referencing this new event class: <code>["a", "<kind>:<pubkey>:<d value>", "<relay url, optional>"]</code>. Before settling on <code>a</code>, the tag went through two earlier names during development: <code>nref</code>, then <code>nitem</code>, before the identifier itself was renamed <code>naddr</code> and the tag became <code>a</code>.</p>7879 <h3>Where It Lives Now</h3>80 <p>NIP-01 kept the kind range, the replacement rule, the tie-break rule, and the <code>a</code> tag exactly as NIP-33 defined them. The one change is the name: in 2024, a separate pull request renamed "parameterized replaceable event" to <strong>addressable event</strong> everywhere, including inside NIP-01 itself. The behavior did not change, only the term.</p>8182 <h2 class="bar" id="examples"><span class="num">3</span> Historical Example</h2>83 <p>This is the tag example NIP-33 used to show how the <code>d</code> value distinguishes events. It still works exactly like this under NIP-01 today.</p>84 <div class="crt">85 <div class="titlebar">Example - referencing an addressable event, from the original NIP-33 text</div>86<pre><span class="s">"tags"</span>: [87 [<span class="s">"a"</span>, <span class="s">"30023:f7234bd4c139…76e9ca:abcd"</span>, <span class="s">"wss://relay.example.com"</span>]88]</pre>89 </div>90 <p>Kind <code>30023</code>, author <code>f7234bd4c139…76e9ca</code>, <code>d</code> value <code>abcd</code>. Together, these three fields point at exactly one addressable event, no matter how many times its author has replaced it.</p>9192 <h2 class="bar" id="history"><span class="num">4</span> Version History</h2>93 <ul class="patchnotes">94 <li><span class="ver">2024</span><span class="when">2024-08-20</span>fiatjaf renamed "parameterized replaceable event" to "addressable event" throughout NIP-01 (PR <a href="https://github.com/nostr-protocol/nips/pull/1418">#1418</a>). The stub you are reading now reflects that rename.</li>95 <li><span class="ver">Closed</span><span class="when">2023-08-13</span>Merged into <a href="01.html">NIP-01</a> along with <a href="12.html">NIP-12</a>, <a href="16.html">NIP-16</a>, and <a href="20.html">NIP-20</a> (PR <a href="https://github.com/nostr-protocol/nips/pull/703">#703</a>). All four were already "final, mandatory" — folding them into the root spec meant a client or relay only had to read one document to reach baseline compliance.</li>96 <li class="minor"><span class="ver">2023</span><span class="when">2023-11-15</span>Repo-wide cleanup removed the per-file author badge from the now-stub page.</li>97 <li><span class="ver">2023</span><span class="when">2023-05-19</span>Doug Hoyte specified the same-timestamp tie-break rule: keep the event with the lowest <code>id</code>.</li>98 <li><span class="ver">2023</span><span class="when">2023-03-26</span>Leo Wandersleb clarified the wording around what "replaceable" means in practice.</li>99 <li><span class="ver">2023</span><span class="when">2023-02-04 to 2023-02-13</span>fiatjaf renamed the reference identifier twice in nine days: <code>nref</code> to <code>nitem</code> to <code>naddr</code>, settling the tag name on <code>a</code>.</li>100 <li><span class="ver">2023</span><span class="when">2023-01-24</span>Semisol specified how missing or repeated <code>d</code> tags should be interpreted.</li>101 <li><span class="ver">Origin</span><span class="when">2023-01-04</span>Semisol published NIP-33, with Kukks, Cameri, and Giszmo, adding a fourth event class on top of NIP-16 (PR <a href="https://github.com/nostr-protocol/nips/pull/54">#54</a>).</li>102 </ul>103104 <div class="credits">105 <h3 class="cardhead">Original Proposal - Credits</h3>106 <table>107 <tr><td>Authors</td><td>Semisol, Kukks, Cameri, Giszmo</td></tr>108 <tr><td>First commit</td><td>2023-01-04 — “Add NIP-33 Parameterized replaceable events” (PR <a href="https://github.com/nostr-protocol/nips/pull/54">#54</a>)</td></tr>109 <tr><td>Status</td><td><span class="chip final">final</span> <span class="chip mandatory">mandatory</span> — merged and renamed, no longer a standalone document</td></tr>110 <tr><td>Source</td><td><a href="https://github.com/nostr-protocol/nips/blob/master/33.md">33.md on GitHub</a> - <a href="https://github.com/nostr-protocol/nips/commits/master/33.md">full change history</a></td></tr>111 </table>112 </div>113114 <h2 class="bar"><span class="num">5</span> See Also</h2>115 <ul>116 <li><a href="01.html">NIP-01</a> — the current, canonical home of addressable events and the <code>a</code> tag.</li>117 <li><a href="16.html">NIP-16</a> — event treatment, the three older event classes this one was added alongside.</li>118 <li><a href="12.html">NIP-12</a> — generic tag queries, merged the same day as NIP-33.</li>119 <li><a href="20.html">NIP-20</a> — command results, merged the same day as NIP-33.</li>120 <li><a href="19.html">NIP-19</a> — defines the <code>naddr</code> bech32 encoding for addressable event coordinates.</li>121 </ul>122 </div>123124 <aside>125 <div class="cartridge">126 <div class="inner">127 <h3 class="cardhead">Spec Card</h3>128 <div class="lights"><span class="led on"></span><span class="led on"></span><span class="led on"></span></div>129 <dl>130 <dt>Status</dt><dd><span class="chip final">final</span><span class="chip mandatory">mandatory</span></dd>131 <dt>Defined</dt><dd>addressable events (30000-39999) - <code>a</code> tag</dd>132 <dt>Now lives in</dt><dd><a href="01.html#kinds">NIP-01 §4</a></dd>133 <dt>Requires</dt><dd><a href="01.html">NIP-01</a>, <a href="16.html">NIP-16</a></dd>134 <dt>First commit</dt><dd>2023-01-04</dd>135 <dt>Merged</dt><dd>2023-08-13 (PR #703)</dd>136 <dt>Renamed</dt><dd>2024-08-20 (PR #1418)</dd>137 <dt>Last updated</dt><dd>2024-08-20</dd>138 </dl>139 </div>140 </div>141 </aside>142 </main>143144 <nav class="navbtns">145 <a href="32.html">◀ NIP-32: Labeling</a>146 <a href="34.html">NIP-34: `git` stuff ▶</a>147 </nav>148149 <footer class="pagefoot">150 <a href="../index.html">Nostr Protocol Manual</a>151 <span class="pageno">NIP 33 / F4</span>152 </footer>153</div>154155<script src="../assets/webmcp.js" defer></script>156</body>157</html>