Add max_reverse_swap_amount docs

This commit is contained in:
Roei Erez
2023-11-26 08:50:52 +02:00
parent 8074a59d1c
commit 790d1784a4
9 changed files with 190 additions and 34 deletions

View File

@@ -24,6 +24,14 @@ func ListCurrentFees(currentFees: ReverseSwapPairInfo) {
// ANCHOR_END: get-current-reverse-swap-min-max
}
func MaxReverseSwapAmount(sdk: BlockingBreezServices) -> MaxReverseSwapAmountResponse? {
// ANCHOR: max-reverse-swap-amount
let maxAmount = try? sdk.MaxReverseSwapAmount()
print("Max reverse swap amount: \(String(describing: maxAmount?.totalSat))")
// ANCHOR_END: max-reverse-swap-amount
return maxAmount
}
func StartReverseSwap(sdk: BlockingBreezServices, currentFees: ReverseSwapPairInfo) -> SendOnchainResponse? {
// ANCHOR: start-reverse-swap
let destinationAddress = "bc1.."