@@ -26,6 +26,8 @@ import {
2626 PassportModuleConfiguration ,
2727 User ,
2828 UserProfile ,
29+ ConnectEvmArguments ,
30+ LoginArguments ,
2931} from './types' ;
3032import { ConfirmationScreen , EmbeddedLoginPrompt } from './confirmation' ;
3133import { ZkEvmProvider } from './zkEvm' ;
@@ -163,9 +165,7 @@ export class Passport {
163165 * @param {boolean } options.announceProvider - Whether to announce the provider via EIP-6963 for wallet discovery (defaults to true)
164166 * @returns {Provider } The EVM provider instance
165167 */
166- public connectEvm ( options : {
167- announceProvider : boolean
168- } = { announceProvider : true } ) : Promise < Provider > {
168+ public connectEvm ( options : ConnectEvmArguments = { announceProvider : true } ) : Promise < Provider > {
169169 return withMetricsAsync ( async ( ) => {
170170 const provider = new ZkEvmProvider ( {
171171 passportEventEmitter : this . passportEventEmitter ,
@@ -203,13 +203,7 @@ export class Passport {
203203 * @throws {Error } If retrieving the cached user session fails (except for "Unknown or invalid refresh token" errors)
204204 * and useCachedSession is true
205205 */
206- public async login ( options ?: {
207- useCachedSession ?: boolean ;
208- anonymousId ?: string ;
209- useSilentLogin ?: boolean ;
210- useRedirectFlow ?: boolean ;
211- directLoginOptions ?: DirectLoginOptions ;
212- } ) : Promise < UserProfile | null > {
206+ public async login ( options ?: LoginArguments ) : Promise < UserProfile | null > {
213207 return withMetricsAsync ( async ( ) => {
214208 const { useCachedSession = false , useSilentLogin } = options || { } ;
215209 let user : User | null = null ;
0 commit comments