import type { z } from 'mppx'; import { Challenge } from 'mppx'; import { charge as chargeMethod, session as sessionMethod } from '../Methods.js'; import { type SessionMode } from './Session.js'; /** A typed Solana charge challenge accepted by the MPP client. */ export type SolanaChargeChallenge = Challenge.Challenge, typeof chargeMethod.intent, typeof chargeMethod.name>; /** A typed Solana session challenge accepted by the MPP client. */ export type SolanaSessionChallenge = Challenge.Challenge, typeof sessionMethod.intent, typeof sessionMethod.name>; /** Options for selecting one Solana charge challenge from a challenge set. */ export type SelectSolanaChargeChallengeOptions = { /** Currency symbol or mint address the client wants to pay with. */ currency?: string | readonly string[] | undefined; /** Solana network identifier, e.g. "mainnet-beta", "devnet", or "localnet". */ network?: string | undefined; }; /** Options for selecting one Solana session challenge from a challenge set. */ export type SelectSolanaSessionChallengeOptions = SelectSolanaChargeChallengeOptions & { /** Preferred funding mode. */ mode?: SessionMode | readonly SessionMode[] | undefined; }; /** * Returns true when a challenge is a schema-valid Solana charge challenge. */ export declare function isSolanaChargeChallenge(challenge: Challenge.Challenge): challenge is SolanaChargeChallenge; /** * Returns true when a challenge is a schema-valid Solana session challenge. */ export declare function isSolanaSessionChallenge(challenge: Challenge.Challenge): challenge is SolanaSessionChallenge; /** * Selects the Solana charge challenge the client should sign. * * Servers can return multiple charge challenges for the same resource, for * example one challenge per supported stablecoin. This helper filters by * network and currency preferences while preserving server order otherwise. */ export declare function selectSolanaChargeChallenge(challenges: readonly Challenge.Challenge[], options?: SelectSolanaChargeChallengeOptions): SolanaChargeChallenge | undefined; /** * Selects the Solana session challenge the client should open. */ export declare function selectSolanaSessionChallenge(challenges: readonly Challenge.Challenge[], options?: SelectSolanaSessionChallengeOptions): SolanaSessionChallenge | undefined; /** * Extracts all HTTP `WWW-Authenticate` challenges from a response and selects * the Solana charge challenge the client should sign. */ export declare function selectSolanaChargeChallengeFromResponse(response: Response, options?: SelectSolanaChargeChallengeOptions): SolanaChargeChallenge | undefined; /** * Extracts all HTTP `WWW-Authenticate` challenges from a response and selects * the Solana session challenge the client should open. */ export declare function selectSolanaSessionChallengeFromResponse(response: Response, options?: SelectSolanaSessionChallengeOptions): SolanaSessionChallenge | undefined; //# sourceMappingURL=ChallengeSelection.d.ts.map