Applesauce
    Preparing search index...

    Type Alias RelayAuthOptions

    D-05 mixin: the shared set of auth-related options intersected into every operation's option type (RelayReqOptions, PublishOptions, RelayCountOptions, RelaySyncOptions) so waitForAuth and its siblings are declared exactly once.

    type RelayAuthOptions = {
        authRetries?: number;
        authTimeout?: number | false;
        onAuthRequired?: RelayAuthHandler;
        waitForAuth?: AuthRequirement;
    }
    Index
    authRetries?: number

    The number of consecutive auth-required cycles to tolerate before giving up. default is 1

    authTimeout?: number | false

    The maximum time (in milliseconds) to wait for a single auth phase (handler execution plus the subsequent authentication wait). default is 30_000. Pass false to wait indefinitely for external auth state to satisfy the requirement.

    onAuthRequired?: RelayAuthHandler

    Called when the relay signals that authentication is required for this operation

    waitForAuth?: AuthRequirement

    What authentication to wait for when the relay requires auth for this operation. default is true (any authenticated user) Pass a pubkey (or array of pubkeys) to wait until those specific users are authenticated.