IsExpiredCallback: (pub: Data) => boolean | number

Callback to determine if a publication is expired.

Type declaration

    • (pub: Data): boolean | number
    • Parameters

      Returns boolean | number

The callback can return either:

  • boolean to indicate whether the publication is expired.
  • number, interpreted as Unix timestamp (milliseconds) of publication creation time. The publication is considered expired if this timestamp is before NOW - (maxPubLifetime+maxClockSkew) or after NOW + maxClockSkew.