import { ConfigService } from "@nestjs/config"; import { JwtService } from "@nestjs/jwt"; import { TransactionSearchCriteria, TransferTransaction } from "@dhealth/sdk"; import { Request } from "express"; import { NetworkService } from "./NetworkService"; import { AccountsService } from "./AccountsService"; import { ChallengesService } from "./ChallengesService"; import { AccountDocument } from "../models/AccountSchema"; import { AccessTokenDTO } from "../models/AccessTokenDTO"; import { AccountSessionQuery } from "../models/AccountSessionSchema"; import { AccountSessionsService } from "./AccountSessionsService"; import { AccessTokenRequest } from "../requests/AccessTokenRequest"; export interface CookiePayload { name: string; domain: string; secret?: string; challenge?: string; } export interface AuthenticationPayload { sub: string; address: string; referralCode?: string; } export declare class AuthService { private readonly configService; private readonly networkService; private readonly accountsService; private readonly accountSessionsService; private readonly challengesService; private jwtService; protected cookie: CookiePayload; protected challengeSize: number; private authSecret; static extractToken(request: Request, cookieName?: string): string | null; constructor(configService: ConfigService, networkService: NetworkService, accountsService: AccountsService, accountSessionsService: AccountSessionsService, challengesService: ChallengesService, jwtService: JwtService); getCookie(): CookiePayload; getChallenge(): string; getAccount(request: Request, cookieName?: string): Promise; validateChallenge({ challenge, sub, registry }: AccessTokenRequest, markAsUsed?: boolean): Promise; getAccessToken(payload: AuthenticationPayload): Promise; refreshAccessToken(userAddress: string, refreshToken: string): Promise; protected getAccountSessionQuery(payload: AuthenticationPayload): AccountSessionQuery; protected getTransactionQuery(registry: string): TransactionSearchCriteria; protected findRecentChallenge(registry: string, challenge: string): Promise; }