Gets a fee quote for a cooperative exit (on-chain withdrawal) for the SparkWallet. The quote includes options for different speeds and an expiry time.
Method Signature
async getWithdrawalFeeQuote({
amountSats,
withdrawalAddress,
}: {
amountSats: number;
withdrawalAddress: string;
}): Promise<WithdrawalFeeQuote | null>
Parameters
The amount in satoshis to withdraw
The Bitcoin address where the funds should be sent
Returns
feeQuote
WithdrawalFeeQuote | null
required
A fee quote for the withdrawal, or null if not available
Example
const feeQuote = await wallet.getWithdrawalFeeQuote({
amountSats: 17000,
withdrawalAddress: "bcrt1p..."
});
console.log("Fee quote:", feeQuote);