Add client support for NIP-02 (manage contact lists)

This commit is contained in:
Wilson Silva
2023-02-15 18:29:12 +07:00
parent e6e4f576e3
commit 19f07efdeb
5 changed files with 40 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ module Nostr
#
attr_reader :created_at
# The kind of the event. An integer from 0 to 2
# The kind of the event. An integer from 0 to 3
#
# @api public
#
@@ -76,7 +76,7 @@ module Nostr
#
# @param pubkey [String] 32-bytes hex-encoded public key of the event creator.
# @param created_at [Integer] Date of the creation of the vent. A UNIX timestamp, in seconds.
# @param kind [Integer] The kind of the event. An integer from 0 to 2.
# @param kind [Integer] The kind of the event. An integer from 0 to 3.
# @param tags [Array<Array>] An array of tags. Each tag is an array of strings.
# @param content [String] Arbitrary string.
#

View File

@@ -24,5 +24,12 @@ module Nostr
# @return [Integer]
#
RECOMMEND_SERVER = 2
# A special event with kind 3, meaning "contact list" is defined as having a list of p tags, one for each of
# the followed/known profiles one is following.
#
# @return [Integer]
#
CONTACT_LIST = 3
end
end

View File

@@ -50,7 +50,7 @@ module Nostr
# @param event_attributes [Hash]
# @option event_attributes [String] :pubkey 32-bytes hex-encoded public key of the event creator.
# @option event_attributes [Integer] :created_at Date of the creation of the vent. A UNIX timestamp, in seconds.
# @option event_attributes [Integer] :kind The kind of the event. An integer from 0 to 2.
# @option event_attributes [Integer] :kind The kind of the event. An integer from 0 to 3.
# @option event_attributes [Array<Array>] :tags An array of tags. Each tag is an array of strings.
# @option event_attributes [String] :content Arbitrary string.
#