Jack Dorsey has set a 10 btc bounty for Nostr based alternative to GitHub
Nostr is this protocol (<a href="https:&#x2F;&#x2F;github.com&#x2F;nostr-protocol&#x2F;nips&#x2F;blob&#x2F;master&#x2F;01.md">https:&#x2F;&#x2F;github.com&#x2F;nostr-protocol&#x2F;nips&#x2F;blob&#x2F;master&#x2F;01.md</a>):<p>Events and signatures
Each user has a keypair. Signatures, public key, and encodings are done according to the Schnorr signatures standard for the curve secp256k1.<p>The only object type that exists is the event, which has the following format on the wire:<p><pre><code>  {
    &quot;id&quot;: &lt;32-bytes lowercase hex-encoded sha256 of the the serialized event data&gt;
    &quot;pubkey&quot;: &lt;32-bytes lowercase hex-encoded public key of the event creator&gt;,
    &quot;created_at&quot;: &lt;unix timestamp in seconds&gt;,
  &quot;kind&quot;: &lt;integer&gt;,
  &quot;tags&quot;: [
    [&quot;e&quot;, &lt;32-bytes hex of the id of another event&gt;, &lt;recommended relay URL&gt;],
    [&quot;p&quot;, &lt;32-bytes hex of a pubkey&gt;, &lt;recommended relay URL&gt;],
    ... &#x2F;&#x2F; other kinds of tags may be included later
  ],
  &quot;content&quot;: &lt;arbitrary string&gt;,
  &quot;sig&quot;: &lt;64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the &quot;id&quot; field&gt;
  }

</code></pre>
To obtain the event.id, we sha256 the serialized event. The serialization is done over the UTF-8 JSON-serialized string (with no white space or line breaks) of the following structure:<p><pre><code>  [
  0,
  &lt;pubkey, as a (lowercase) hex string&gt;,
  &lt;created_at, as a number&gt;,
  &lt;kind, as a number&gt;,
  &lt;tags, as an array of arrays of non-null strings&gt;,
  &lt;content, as a string&gt;
  ]
</code></pre>
Communication between clients and relays
Relays expose a websocket endpoint to which clients can connect.<p>From client to relay: sending events and creating subscriptions
Clients can send 3 types of messages, which must be JSON arrays, according to the following patterns:<p><pre><code>  [&quot;EVENT&quot;, &lt;event JSON as defined above&gt;], used to publish events.
  [&quot;REQ&quot;, &lt;subscription_id&gt;, &lt;filters JSON&gt;...], used to request events and subscribe to new updates.
  [&quot;CLOSE&quot;, &lt;subscription_id&gt;], used to stop previous subscriptions.
  &lt;subscription_id&gt; is an arbitrary, non-empty string of max length 64 chars, that should be used to represent a subscription.

  &lt;filters&gt; is a JSON object that determines what events will be sent in that subscription, it can have the following attributes:

  {
  &quot;ids&quot;: &lt;a list of event ids or prefixes&gt;,
  &quot;authors&quot;: &lt;a list of pubkeys or prefixes, the pubkey of an event must be one of these&gt;,
  &quot;kinds&quot;: &lt;a list of a kind numbers&gt;,
  &quot;#e&quot;: &lt;a list of event ids that are referenced in an &quot;e&quot; tag&gt;,
  &quot;#p&quot;: &lt;a list of pubkeys that are referenced in a &quot;p&quot; tag&gt;,
  &quot;since&quot;: &lt;an integer unix timestamp, events must be newer than this to pass&gt;,
  &quot;until&quot;: &lt;an integer unix timestamp, events must be older than this to pass&gt;,
  &quot;limit&quot;: &lt;maximum number of events to be returned in the initial query&gt;
  }
</code></pre>
Upon receiving a REQ message, the relay SHOULD query its internal database and return events that match the filter, then store that filter and send again all future events it receives to that same websocket until the websocket is closed. The CLOSE event is received with the same &lt;subscription_id&gt; or a new REQ is sent using the same &lt;subscription_id&gt;, in which case it should overwrite the previous subscription.<p>Filter attributes containing lists (such as ids, kinds, or #e) are JSON arrays with one or more values. At least one of the array&#x27;s values must match the relevant field in an event for the condition itself to be considered a match. For scalar event attributes such as kind, the attribute from the event must be contained in the filter list. For tag attributes such as #e, where an event may have multiple values, the event and filter condition values must have at least one item in common.<p>The ids and authors lists contain lowercase hexadecimal strings, which may either be an exact 64-character match, or a prefix of the event value. A prefix match is when the filter string is an exact string prefix of the event value. The use of prefixes allows for more compact filters where a large number of values are queried, and can provide some privacy for clients that may not want to disclose the exact authors or events they are searching for.<p>All conditions of a filter that are specified must match for an event for it to pass the filter, i.e., multiple conditions are interpreted as &amp;&amp; conditions.<p>A REQ message may contain multiple filters. In this case, events that match any of the filters are to be returned, i.e., multiple filters are to be interpreted as || conditions.<p>The limit property of a filter is only valid for the initial query and can be ignored afterward. When limit: n is present it is assumed that the events returned in the initial query will be the latest n events. It is safe to return less events than limit specifies, but it is expected that relays do not return (much) more events than requested so clients don&#x27;t get unnecessarily overwhelmed by data.<p>From relay to client: sending events and notices
Relays can send 2 types of messages, which must also be JSON arrays, according to the following patterns:<p><pre><code>  [&quot;EVENT&quot;, &lt;subscription_id&gt;, &lt;event JSON as defined above&gt;], used to send events requested by clients.
  [&quot;NOTICE&quot;, &lt;message&gt;], used to send human-readable error messages or other things to clients.
</code></pre>
This NIP defines no rules for how NOTICE messages should be sent or treated.<p>EVENT messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the REQ message above).<p>Basic Event Kinds
0: set_metadata: the content is set to a stringified JSON object {name: &lt;username&gt;, about: &lt;string&gt;, picture: &lt;url, string&gt;} describing the user who created the event. A relay may delete past set_metadata events once it gets a new one for the same pubkey.<p>1: text_note: the content is set to the plaintext content of a note (anything the user wants to say). Markdown links ([]() stuff) are not plaintext.<p>2: recommend_server: the content is set to the URL (e.g., wss:&#x2F;&#x2F;somerelay.com) of a relay the event creator wants to recommend to its followers.<p>A relay may choose to treat different message kinds differently, and it may or may not choose to have a default way to handle kinds it doesn&#x27;t know about.<p>Other Notes:
Clients should not open more than one websocket to each relay. One channel can support an unlimited number of subscriptions, so clients should do that.
The tags array can store a tag identifier as the first element of each subarray, plus arbitrary information afterward (always as strings). This NIP defines &quot;p&quot; — meaning &quot;pubkey&quot;, which points to a pubkey of someone that is referred to in the event —, and &quot;e&quot; — meaning &quot;event&quot;, which points to the id of an event this event is quoting, replying to or referring to somehow.
The &lt;recommended relay URL&gt; item present on the &quot;e&quot; and &quot;p&quot; tags is an optional (could be set to &quot;&quot;) URL of a relay the client could attempt to connect to fetch the tagged event or other events from a tagged profile. It MAY be ignored, but it exists to increase censorship resistance and make the spread of relay addresses more seamless across clients.