import type { ResolvedFundingMethod } from './fundingClient.js'; import { type UseFundingOptions } from './useFunding.js'; /** The session handle the fiat hooks need — id + its clientSecret. */ export type FundingSessionRef = { id: string; clientSecret: string; }; export type UseFundingMethods = { /** Server-resolved fiat rows to render, in display order. Empty until loaded. */ methods: ResolvedFundingMethod[]; /** Resolved buyer country (ISO-3166 alpha-2), or null for rest-of-world / not loaded. */ country: string | null; /** True once the resolve request has settled (rows or error). */ loaded: boolean; loading: boolean; error: Error | null; refresh: () => void; }; export type UseFundingMethodsOptions = UseFundingOptions & { /** Buyer-country override (ISO-3166 alpha-2); defaults to `uiConfig.funding.country`, else the request IP. */ country?: string; }; /** * The fiat funding methods available for a session's destination and the * buyer's region, resolved server-side (`GET /v2/funding/sessions/{id}/methods`). * Openfort picks the provider per method — render the rows and commit one with * {@link useOnramp}; there is no provider choice on the client. * * Rows that fail to resolve are ABSENT, and on error `methods` is empty — never * render a fallback method list: a row whose tap can't execute (or isn't * available in the user's region) is worse than no row. */ export declare function useFundingMethods(session: FundingSessionRef | null | undefined, options?: UseFundingMethodsOptions): UseFundingMethods;