import { PrivyClient, type User as PrivyUser } from "@privy-io/node"; import { type Address } from "viem"; import { PrivyRole } from "../../core"; interface AuthRequest { privyToken?: string; privyIdToken?: string; ethAddress?: string; role: PrivyRole; } declare class PrivyService { authenticate({ privyToken, privyIdToken, ethAddress, role }: AuthRequest): Promise; /** * Fetch a Privy user by id. We don't always know whether the user was created * under the regular "User" app or the Admin app, so try the User client first * and fall back to the Admin client if not found. */ getUserById(userId: string): Promise; /** * Gets the user's Ethereum wallet address, prioritizing external wallets over Privy wallets. * Returns the first external wallet found, or falls back to a Privy wallet if none exist. */ getUserEthAddress: (user: PrivyUser) => Address | undefined; /** * Verifies that an Ethereum address belongs to a user by checking their linked accounts. */ private verifyUserOwnsAddress; /** * Returns the raw PrivyClient for the given role. */ getClient(role?: PrivyRole): PrivyClient; private getPrivyClients; } export declare const privyService: PrivyService; export {};