requestWithdrawal

fun requestWithdrawal(amountSats: Long, bitcoinAddress: String): WithdrawalRequest

Withdraws funds from the account and sends it to the requested bitcoin address.

The process is asynchronous and may take up to a few minutes. You can check the progress by polling the WithdrawalRequest that is created, or by subscribing to a webhook.

Parameters

amountSats

The amount of funds to withdraw in SATOSHI.

bitcoinAddress

The Bitcoin address to withdraw funds to.

Throws

if the withdrawal failed or if the wallet is locked.