Hierarchy

Constructors

Properties

litNodeClient: LitNodeClient

Client to connect to Lit nodes

relay: IRelay

Relay server to subsidize minting of PKPs

rpcUrl: string

Endpoint to interact with a blockchain network. Defaults to the Lit Chronicle.

Methods

  • Authenticate the user based on the provider-specific implementation and return the relevant authentication data

    Returns

    • Auth method object that contains authentication data

    Type Parameters

    Parameters

    • Optional options: T

      Optional parameters that vary based on the provider

    • Optional urlCheckCallback: ((currentUrl: string, redirectUri: string) => boolean)

      Optional callback to handle authentication data or errors

        • (currentUrl: string, redirectUri: string): boolean
        • Parameters

          • currentUrl: string
          • redirectUri: string

          Returns boolean

    Returns Promise<AuthMethod>

  • Calculates a public key for a given key identifier which is an Auth Method Identifier the Auth Method Identifier is a hash of a user identifier and app idendtifer. These identifiers are specific to each auth method and will derive the public key protion of a pkp which will be persited when a key is claimed.

    Auth Method User ID App ID
    Google OAuth token sub token aud
    Discord OAuth user id client app identifier
    Stytch OTP token sub token aud

    Returns

    Parameters

    Returns Promise<string>

  • Get auth method id that can be used to look up and interact with PKPs associated with the given auth method

    Returns

    • Auth method id

    Parameters

    • authMethod: AuthMethod

      Auth method object

    • Optional options: any

      Optional parameters that vary based on the provider

    Returns Promise<string>

Generated using TypeDoc