Class that handles authentication through Lit login

Hierarchy

  • LitAuthClient

Constructors

Properties

debug: boolean

Configures logging

litNodeClient: LitNodeClient

Client to connect to Lit nodes

providers: Map<string, BaseProvider>

Map of providers

relay: IRelay

Relay server to subsidize minting of PKPs

rpcUrl: string

The redirect URI that Lit's auth server should send the user back to

Methods

  • Mints a new pkp with all AuthMethods provided. Allows for permissions and flags to be set seperately. If no permissions are provided then each auth method will be assigned 1 for sign anything If no flags are provided then sendPkpToitself will be false, and addPkpEthAddressAsPermittedAddress will be true It is then up to the implementor to transfer the pkp nft to the pkp address. note When adding permissions, each permission should be added in the same order the auth methods are ordered

    Throws

    • Throws an error if no AuthMethods are given

    Returns

    pkp information

    Parameters

    • authMethods: AuthMethod[]
    • options: {
          addPkpEthAddressAsPermittedAddress?: boolean;
          pkpPermissionScopes?: number[][];
          sendPkpToitself?: boolean;
      }
      • Optional addPkpEthAddressAsPermittedAddress?: boolean
      • Optional pkpPermissionScopes?: number[][]
      • Optional sendPkpToitself?: boolean

    Returns Promise<{
        pkpEthAddress?: string;
        pkpPublicKey?: string;
        pkpTokenId?: string;
    }>

Generated using TypeDoc