INNER CODE UNIT · TypeScript
nextAnnounce
dmotz/trystero · packages/nostr/src/index.ts:82
const nextAnnounce = (nextAnnounceMs: number) => ({nextAnnounceMs})
const stopAnnouncing = {stopAnnouncing: true} as const
const retireRelay = (client: SocketClient): boolean => {
if (retiredRelays.has(client)) {
return false
}
retiredRelays.add(client)
relayBackoffs.delete(client)
client.close?.()
return true
}
export type NostrRoomConfig = JoinRoomConfig
const now = (): number => Math.floor(Date.now() / 1000)