Type alias NDKAuthPolicy

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

Type declaration

    • (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.

      Parameters

      • relay: NDKRelay

        The relay that requested authentication.

      • challenge: string

        The challenge that the relay sent.

      Returns Promise<boolean | void | NDKEvent>

Generated using TypeDoc