nostr-websocket-utils

nostr-websocket-utils v0.3.16


nostr-websocket-utils / ChannelSubscriptionManager

Interface: ChannelSubscriptionManager

Defined in: nips/nip-28.ts:186

Channel subscription manager interface

Methods

subscribe()

subscribe(channelId): NostrWSMessage

Defined in: nips/nip-28.ts:192

Subscribes to a channel

Parameters

channelId

string

Channel ID

Returns

NostrWSMessage

Subscription message


unsubscribe()

unsubscribe(channelId): NostrWSMessage

Defined in: nips/nip-28.ts:199

Unsubscribes from a channel

Parameters

channelId

string

Channel ID

Returns

NostrWSMessage

Unsubscribe message


getMetadata()

getMetadata(channelId): Promise<ChannelMetadata | undefined>

Defined in: nips/nip-28.ts:206

Gets channel metadata

Parameters

channelId

string

Channel ID

Returns

Promise<ChannelMetadata | undefined>

Channel metadata