Class that communicates with Lit relay server

Implements

Constructors

Methods

  • Generate options for registering a new credential to pass to the authenticator

    Parameters

    • Optionalusername: string

      Optional username to associate with the credential

    Returns Promise<any>

    Registration options for the browser to pass to the authenticator

  • Mints a new pkp with all AuthMethods provided. Allows for permissions and flags to be set separately. 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

    Parameters

    • authMethods: AuthMethod[]

      AuthMethods authentication methods to be added to the pkp

    • options: {
          addPkpEthAddressAsPermittedAddress?: boolean;
          pkpPermissionScopes?: number[][];
          sendPkpToitself?: boolean;
      }
      • OptionaladdPkpEthAddressAsPermittedAddress?: boolean
      • OptionalpkpPermissionScopes?: number[][]
      • OptionalsendPkpToitself?: boolean

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

    pkp information

    • Throws an error if no AuthMethods are given