/** * The Nado withdrawal money path: generate a Fun deposit address, sign Nado's * gasless `withdraw_collateral_v2` with `sendTo` pointing at it, and submit. * * Port of web's `createNadoWithdrawalCallback` over {@link WithdrawalClient}. * Two differences from web: * - The amount arrives **already net** of the sequencer fee, where web's * callback deducts it itself. Deducting again would short the user a fee. * - Borrowing is never offered, so `spot_leverage` is always `false`. * * Re-submitting belongs to the gateway, which reuses the signed nonce; a retry * from here would mint a fresh one and withdraw twice. */ import { type WithdrawalClient } from '@funkit/connect-core'; import { type NadoWithdrawalSourceOption } from '@funkit/connect-core/clients/nado'; import type { Address, Hex } from 'viem'; import type { CustomWithdrawalSubmission } from '../../src/flow/withdrawalFlowConfig'; import type { NadoWithdrawalFlowConfig } from './nadoWithdrawalConfig'; export interface NadoWithdrawalSubmitContext { nado: NadoWithdrawalFlowConfig; /** Packed id of the subaccount being debited (`buildNadoSubaccountId`). */ subaccount: Hex; sourceToken: NadoWithdrawalSourceOption; /** The host's signer. Nado needs `signTypedData`; a client without it fails. */ wallet: WithdrawalClient; /** Drops the cached max, or a follow-up withdrawal opens on a stale balance. */ onWithdrawn: () => void; } /** * The `submitWithdrawal` the crypto rail runs in place of a relay execution. * Resolves with the deposit address Nado was told to send to — nothing of ours * goes on-chain, so there is no transaction to return. */ export declare function createNadoWithdrawalSubmit({ nado, subaccount, sourceToken, wallet, onWithdrawn, }: NadoWithdrawalSubmitContext): ({ recipientAddress, destinationToken, amountTokenUnits, }: CustomWithdrawalSubmission) => Promise<{ depositAddress: Address; }>; //# sourceMappingURL=withdrawalSubmit.d.ts.map