ts-algochat
    Preparing search index...

    Function recordReceive

    • Records a received counter, returning a new state.

      Updates peerLastCounter if the received counter is newer, and prunes old entries from seenCounters that fall outside the window.

      Parameters

      • state: PSKState

        Current PSK state

      • counter: number

        The received counter to record

      Returns PSKState

      New PSK state with counter recorded