Prepare a signable Bitcoin transaction for a RAVN DEPOSIT
ravn_btc_prepare_sendTurns a DEPOSIT-type ravn_execute result (deposit.address + deposit.amount) into a ready-to-sign PSBT, so you don't have to write your own UTXO selection and fee-estimation code. If that result also has a fee (an integrator fee RAVN collects beside the deposit), pass its fee.address as feeAddress and fee.amount as feeAmountSats: the PSBT then pays it as a second output of the same transaction, which is the only place RAVN looks for it. Fetches your UTXOs and the current network fee rate from mempool.space (public, no auth). RAVN never sees or touches a private key — sign the returned PSBT with your own wallet and broadcast it yourself. Only one signer is ever needed (unlike PSBT flows that require coordinating signatures across multiple UTXO-holding wallets), because every RAVN BTC-source venue resolves to a plain payment to the deposit address (plus RAVN's fee output, when there is one).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Defaults to mainnet | |
| toAddress | Yes | deposit.address from the ravn_execute DEPOSIT result | |
| amountSats | Yes | deposit.amount from the ravn_execute DEPOSIT result, in satoshis | |
| feeAddress | No | fee.address from the ravn_execute DEPOSIT result — REQUIRED whenever that result has a `fee`. RAVN's fee is paid as an extra output of this same transaction; leave it out and the fee is never paid | |
| fromAddress | Yes | Your Bitcoin address holding the UTXOs to spend — native SegWit (bc1q…) or Taproot (bc1p…) only | |
| feeAmountSats | No | fee.amount from the ravn_execute DEPOSIT result, in satoshis — pass together with feeAddress | |
| feeRateSatsPerVb | No | Omit to use mempool.space's current halfHourFee estimate |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||