Hierarchy (view full)

Constructors

Properties

litNodeClient: LitNodeClient

Client to connect to Lit nodes

relay: IRelay

Relay server to subsidize minting of PKPs

Methods

  • 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

    Parameters

    Returns Promise<string>

  • Generate registration options for the browser to pass to a supported authenticator

    Parameters

    • Optionalusername: string

      Username to register credential with

    Returns Promise<PublicKeyCredentialCreationOptionsJSON>

    • Options to pass to the authenticator
  • Mint PKP with verified registration data

    Parameters

    • options: PublicKeyCredentialCreationOptionsJSON

      Registration options to pass to the authenticator

    • OptionalcustomArgs: MintRequestBody

      Extra data to overwrite default params

    Returns Promise<string>

    • Mint transaction hash
  • Parse the WebAuthn registration response to get the WebAuthn credential public key

    Parameters

    • attResp: RegistrationResponseJSON

      WebAuthn registration response

    Returns string

    • WebAuthn credential public key in hex format