import { Wallet } from "ethers"; import { CommunityConfig } from "../config"; export interface SessionRequestResult { txHash: string; hash: string; } export declare class BadRequestException extends Error { constructor(message?: string); } export declare class InvalidChallengeException extends Error { constructor(message?: string); } /** * Creates a session request by generating the necessary cryptographic signatures * and submitting them to the backend API. * * @param {string} url - The API endpoint URL (e.g., 'https://api.example.com') * @param {CommunityConfig} community - Instance of CommunityConfig containing provider address * @param {Wallet} privateKey - The wallet instance to sign the session request * @param {string} source - The source identifier (e.g., phone number for SMS sessions) * @param {string} sessionType - The type of session (e.g., 'sms', 'email', etc.) * @returns {Promise} Object containing transaction hash and request hash, or null on failure * @throws {InvalidChallengeException} If the request is rejected as a bad request */ export declare const sendSessionRequest: (url: string, community: CommunityConfig, privateKey: Wallet, source: string, sessionType: string) => Promise; /** * Confirms a session request by signing the session hash and submitting it to the backend API. * * @param {string} url - The API endpoint URL (e.g., 'https://api.example.com') * @param {CommunityConfig} community - Instance of CommunityConfig containing provider address * @param {Wallet} privateKey - The wallet instance to sign the session confirmation * @param {string} sessionRequestHash - The session request hash (hex string with 0x prefix) * @param {number | string} challenge - The challenge number received from the session request * @returns {Promise} The transaction hash of the confirmation, or null on failure */ export declare const confirmSessionRequest: (url: string, community: CommunityConfig, privateKey: Wallet, sessionRequestHash: string, challenge: number | string) => Promise; //# sourceMappingURL=request.d.ts.map