import { c as DepositConfig, D as DepositStatus, a as DepositResult, b as DepositError, d as DepositRequest } from './types-uAsx5xcj.cjs'; export { t as getDisplayMessage } from './types-uAsx5xcj.cjs'; import { ReactElement } from 'react'; interface BlinkDepositButtonProps { /** Fired when the user taps the button. Hosts typically call `requestDeposit()` here. */ onClick: () => void; /** Disables interaction and dims the button. */ disabled?: boolean; /** Non-interactive waiting state (e.g. while the signer request is in flight). Dims like disabled. */ loading?: boolean; } /** * Blink-branded deposit button merchants can drop onto their page instead of * building their own: a black pill with a bold "Deposit stablecoins" line over * an italic "In a Blink" line, and overlapping USDC/USDT coin marks on the * right. Self-contained — inline styles and data-URI icons, no CSS imports. * * ```tsx * import { BlinkDepositButton, useBlinkDeposit } from '@swype-org/deposit/react'; * * function Checkout() { * const { status, requestDeposit } = useBlinkDeposit({ signer: '/api/sign-payment' }); * return ( * requestDeposit({ amount: 50, chainId: 8453, address: '0x…', token: '0x…' })} * loading={status === 'signer-loading'} * /> * ); * } * ``` */ declare function BlinkDepositButton({ onClick, disabled, loading, }: BlinkDepositButtonProps): ReactElement; interface UseBlinkDepositReturn { /** Current phase of the deposit flow. */ status: DepositStatus; /** Last successful deposit result, or `null`. */ result: DepositResult | null; /** Last deposit error, or `null`. */ error: DepositError | null; /** User-friendly error message derived from the current error, or `null`. */ displayMessage: string | null; /** Whether a deposit flow is currently in progress. */ isActive: boolean; /** Start a deposit flow. Opens a modal iframe with the hosted deposit. */ requestDeposit: (request: DepositRequest) => Promise; /** No-op — retained for API compatibility. */ focus: () => void; /** Close the deposit iframe and reset to idle. */ close: () => void; } /** * React hook that wraps the {@link Deposit} class with reactive state. * * ```tsx * import { useBlinkDeposit } from '@swype-org/deposit/react'; * * function DepositButton() { * const { status, result, error, displayMessage, requestDeposit } = useBlinkDeposit({ * signer: '/api/sign-payment', * }); * * return ( * <> * * {error &&

{displayMessage}

} * {result &&

Transfer {result.transfer.id} complete!

} * * ); * } * ``` */ declare function useBlinkDeposit(config: DepositConfig): UseBlinkDepositReturn; /** @deprecated Use {@link useBlinkDeposit} instead. */ declare const useBlinkCheckout: typeof useBlinkDeposit; /** @deprecated Use {@link useBlinkDeposit} instead. */ declare const useSwypeCheckout: typeof useBlinkDeposit; export { BlinkDepositButton, type BlinkDepositButtonProps, DepositConfig, DepositError, DepositRequest, DepositResult, DepositStatus, useBlinkCheckout, useBlinkDeposit, useSwypeCheckout };