Files
welshman/packages/net
2024-12-10 08:25:49 -08:00
..
2024-12-10 08:21:14 -08:00
2024-09-26 15:36:01 -07:00
2024-09-26 14:29:57 -07:00
2024-12-10 08:25:49 -08:00
2024-11-20 15:46:06 -08:00
2024-04-22 13:22:53 -07:00

@welshman/net version

Utilities having to do with connection management and nostr messages.

  • Connection - the main api for dealing with relay connections
  • ConnectionAuth - tracks auth status for a connection
  • ConnectionSender - a send queue for connections
  • ConnectionState - tracks pending publishes and requests for a connection
  • ConnectionStats - tracks timing and error stats for a connection
  • Context - provides default values for configuring ctx.net
  • Executor - implements common nostr flows on a given target
  • Pool - a thin wrapper around Map which stores Connections
  • Publish - utilities for publishing events
  • Socket - a wrapper around isomorphic-ws that handles json parsing/serialization
  • Subscribe - utilities for making requests against nostr relays
  • Tracker - tracks which relays a given event was seen on

Executor targets extend Emitter, and have a send method, a cleanup method, and a connections getter. They are intended to be passed to an Executor for use.

  • targets/Multi allows you to compose multiple targets together.
  • targets/Relay takes a Connection and provides listeners for different verbs.
  • targets/Relays takes an array of Connections and provides listeners for different verbs, merging all events into a single stream.