Update the documentation of the subscription id
Match the changes introduced in https://github.com/nostr-protocol/nips/pull/299
This commit is contained in:
@@ -74,7 +74,8 @@ module Nostr
|
||||
# @example Subscribing to all events created after a certain time
|
||||
# subscription = client.subscribe(filter: Nostr::Filter.new(since: 1230981305))
|
||||
#
|
||||
# @param subscription_id [String] The subscription id. A random string.
|
||||
# @param subscription_id [String] The subscription id. An arbitrary, non-empty string of max length 64
|
||||
# chars used to represent a subscription.
|
||||
# @param filter [Filter] A set of attributes that represent the events that the client is interested in.
|
||||
#
|
||||
# @return [Subscription] The subscription object
|
||||
|
||||
@@ -5,7 +5,7 @@ require 'securerandom'
|
||||
module Nostr
|
||||
# A subscription the result of a request to receive events from a relay
|
||||
class Subscription
|
||||
# A random string that should be used to represent a subscription
|
||||
# An arbitrary, non-empty string of max length 64 chars used to represent a subscription
|
||||
#
|
||||
# @api public
|
||||
#
|
||||
@@ -41,7 +41,7 @@ module Nostr
|
||||
# @example Subscribing to all events created after a certain time
|
||||
# subscription = Nostr::Subscription.new(filter: Nostr::Filter.new(since: 1230981305))
|
||||
#
|
||||
# @param id [String] A random string that should be used to represent a subscription
|
||||
# @param id [String] An arbitrary, non-empty string of max length 64 chars used to represent a subscription
|
||||
# @param filter [Filter] An object that determines what events will be sent in that subscription
|
||||
#
|
||||
def initialize(filter:, id: SecureRandom.hex)
|
||||
|
||||
Reference in New Issue
Block a user