Type Alias NDKAuthPolicy

NDKAuthPolicy: ((relay: NDKRelay, challenge: string) => Promise<boolean | void | NDKEvent>)

NDKAuthPolicies are functions that are called when a relay requests authentication so that you can define a behavior for your application.

Type declaration

    • (relay: NDKRelay, challenge: string): Promise<boolean | void | NDKEvent>
    • Parameters

      • relay: NDKRelay

        The relay that requested authentication.

      • challenge: string

        The challenge that the relay sent.

      Returns Promise<boolean | void | NDKEvent>