23 lines
713 B
Plaintext
23 lines
713 B
Plaintext
module Nostr
|
|
class Client
|
|
include EventEmitter
|
|
|
|
def initialize: -> void
|
|
def connect: (Relay relay) -> Thread
|
|
def subscribe: (?subscription_id: String, ?filter: Filter) -> Subscription
|
|
def unsubscribe: (String subscription_id) -> void
|
|
def publish: (Event event) -> untyped
|
|
|
|
private
|
|
|
|
attr_reader logger: Logger
|
|
attr_reader subscriptions: Hash[String, Subscription]
|
|
attr_reader parent_to_child_channel: EventMachine::Channel
|
|
attr_reader child_to_parent_channel: EventMachine::Channel
|
|
|
|
def execute_within_an_em_thread: { -> void } -> Thread
|
|
def initialize_channels: -> void
|
|
def build_websocket_client: (String relay_name) -> Faye::WebSocket::Client
|
|
end
|
|
end
|