RelaySession

Serialized relay protocol state machine for a host-owned socket lifecycle.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun authenticate(event: SignedNostrEvent): ERROR CLASS: Cannot infer argument for type parameter T

Queue one verified NIP-42 AUTH response while authentication is pending.

Link copied to clipboard
fun authenticated(): ERROR CLASS: Cannot infer argument for type parameter T

Complete an authentication phase and replay queued operations.

Link copied to clipboard

Permanently cancel the session and request transport closure.

Link copied to clipboard
open override fun close(): ERROR CLASS: Unresolved name: close

Release native state; use cancel first when a transport is active.

Link copied to clipboard
fun closeSubscription(id: String): ERROR CLASS: Cannot infer argument for type parameter T

Close and forget one subscription.

Link copied to clipboard
fun confirmIngested(eventId: NostrEventId): ERROR CLASS: Cannot infer argument for type parameter T

Confirm that one received event was durably committed by the host.

Link copied to clipboard
fun confirmSent(eventIds: List<NostrEventId>): ERROR CLASS: Cannot infer argument for type parameter T

Confirm socket handoff for one drained frame.

Link copied to clipboard

Begin a connection attempt and request transport creation.

Link copied to clipboard

Remove at most limit queued outbound frame records.

Link copied to clipboard
fun publish(events: List<SignedNostrEvent>): ERROR CLASS: Cannot infer argument for type parameter T

Queue one bounded batch of signed events for delivery tracking.

Link copied to clipboard

Consume one relay text frame and return required platform actions.

Link copied to clipboard

Read one redacted diagnostic snapshot.

Link copied to clipboard
fun subscribe(id: String, filtersJson: List<String>): ERROR CLASS: Cannot infer argument for type parameter T

Add or replace a subscription using canonical filter JSON values.

Link copied to clipboard
fun transportConnected(): ERROR CLASS: Cannot infer argument for type parameter T

Notify the state machine that the platform transport is connected.

Link copied to clipboard

Notify the session of transport loss and calculate recovery actions.