Skip to main content
Gets the estimated fee for a swap of leaves for the SparkWallet.

Method Signature

async getSwapFeeEstimate(amountSats: number): Promise<LeavesSwapFeeEstimateOutput>

Parameters

amountSats
number
required
The amount of sats to swap

Returns

estimate
LeavesSwapFeeEstimateOutput
required
The estimated fee for the swap

Example

const feeEstimate = await wallet.getSwapFeeEstimate(10000);
console.log("Swap fee estimate:", feeEstimate);