import type { Chain } from '../../chain';
import type { FlowSourceResponse, FlowSupportedExchangeProvider } from '../flow.types';
type AttachFlowSourceWalletParams = {
    flowId: string;
    /** The address of the user's wallet. */
    fromAddress: string;
    /** The network id for the token that the user is paying with. */
    fromChainId?: string;
    /** The chain name of the user's wallet. */
    fromChainName: Chain;
    sourceType: 'wallet';
};
type AttachFlowSourceExchangeParams = {
    /**
     * The exchange provider key (e.g. `'coinbase'`).
     * The backend uses this to look up the exchange configuration,
     * generate a buy URL, and create the exchange source record.
     */
    exchangeProvider: FlowSupportedExchangeProvider;
    flowId: string;
    sourceType: 'exchange';
};
type AttachFlowSourceDepositAddressParams = {
    flowId: string;
    /** The Dynamic chain ID of the source chain (e.g. '1' for BTC, '101' for SOL). */
    fromChainId: string;
    /** The chain family the user will pay from (e.g. 'BTC', 'SOL', 'EVM'). */
    fromChainName: Chain;
    /** Address to refund to if the deposit fails. Optional — omit to use the chain default. */
    refundAddress?: string;
    sourceType: 'deposit_address';
};
/**
 * Parameters for {@link attachFlowSource}.
 *
 * This is a discriminated union on `sourceType`:
 * - `'wallet'` (default) — requires `fromAddress`, `fromChainId`, `fromChainName`
 * - `'exchange'` — requires `exchangeProvider`
 * - `'deposit_address'` — requires `fromChainId`, `fromChainName`; `refundAddress` optional
 */
export type AttachFlowSourceParams = AttachFlowSourceWalletParams | AttachFlowSourceExchangeParams | AttachFlowSourceDepositAddressParams;
/**
 * Attaches a payment source to a flow.
 *
 * For exchange sources, the backend generates the buy URL and creates the
 * exchange source record. The response includes `exchangeSource.metadata.url`
 * which can be embedded in an iframe for the user to complete payment.
 *
 * @param params AttachFlowSourceParams - The source details to attach.
 * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
 * @returns The updated flow and session token
 * @instrumented
 */
export declare const attachFlowSource: (params: AttachFlowSourceParams, client?: import("../../../exports").DynamicClient) => Promise<FlowSourceResponse>;
export {};
//# sourceMappingURL=attachFlowSource.d.ts.map