Hierarchy (view full)

Constructors

Properties

domain: string

The domain from which the signing request is made

litNodeClient: LitNodeClient

Client to connect to Lit nodes

origin: string

The origin from which the signing request is made

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 a wallet signature to use as an auth method

    Parameters

    • options: {
          address?: string;
          chain?: string;
          domain?: string;
          expiration?: string;
          litNodeClient: LitNodeClient;
          origin?: string;
          signer: Wallet | Signer | EthWalletAuthenticateOptions;
      }
      • Optionaladdress?: string

        Address to sign with

      • Optionalchain?: string

        Name of chain to use for signature

      • Optionaldomain?: string

        Domain from which the signing request is made

      • Optionalexpiration?: string

        When the auth signature expires

      • litNodeClient: LitNodeClient

        LitNodeClient instance

      • Optionalorigin?: string

        Origin from which the signing request is made

      • signer: Wallet | Signer | EthWalletAuthenticateOptions

        Signer object

    Returns Promise<AuthMethod>

    • Auth method object containing the auth signature

    EthWalletProvider

      const authMethod = await EthWalletProvider.authenticate({
    signer: wallet,
    litNodeClient: client,
    });