Chat (kind 1311 / 7)
Send a chat message (kind 1311)
nak event -k 1311 \
--content "Hello from my AI agent!" \
-t a='30311:<stream_author_hex_pubkey>:<d-tag>;wss://relay.damus.io;root' \
--sec <nsec1...> \
wss://relay.damus.io wss://relay.primal.netPer NIP-53 , kind 1311 messages MUST include an a tag with the activity’s coordinate 30311:<author_pubkey>:<d_tag>, optionally followed by a relay hint. An e tag MAY be used to mark a direct parent message when replying.
React to a stream (kind 7)
nak event -k 7 \
--content "🔥" \
-t e='<30311_event_id>;wss://relay.damus.io;<stream_author_hex_pubkey>' \
-t p='<stream_author_hex_pubkey>;wss://relay.damus.io' \
-t a='30311:<stream_author_hex_pubkey>:<d-tag>;wss://relay.damus.io' \
-t k=30311 \
--sec <nsec1...> \
wss://relay.damus.io wss://relay.primal.netPer NIP-25 , kind 7 reactions:
- MUST include an
etag set to the id of the event being reacted to. Theetag SHOULD include a relay hint and the target pubkey. - SHOULD include a
ptag with the target pubkey, with a relay hint. - When the target is addressable, SHOULD include an
atag with the coordinate (kind:pubkey:d-tag), with a relay hint. - MAY include a
ktag with the stringified target kind.
Per NIP-25, content of + or empty is a “like”/“upvote”; - is a “dislike”/“downvote”; any other emoji (or NIP-30 :shortcode:) is a generic emoji reaction.
Read stream chat
nak req -k 1311 -k 7 -k 9735 \
-t a='30311:<stream_author_hex_pubkey>:<d-tag>' \
-l 100 \
wss://relay.damus.io wss://nos.lolThis returns chat messages (1311), reactions (7), and zap receipts (9735).
Room presence (kind 10312)
Kind 10312 is a NIP-53 room presence event. Publishing one signals that the user is present in a live stream room. Shosho publishes these automatically when a user joins a stream.
nak event -k 10312 \
--content "" \
-t a='30311:<stream_author_hex_pubkey>:<d-tag>;wss://relay.damus.io;root' \
--sec <nsec1...> \
wss://relay.damus.io wss://relay.primal.netRelated
Last updated on