Withdrawal Guide
This guide covers the withdrawal process from Citrea back to Bitcoin using Clementine CLI. Withdrawals follow a specific sequential process.
All available withdrawal commands can be viewed using clementine-cli withdraw --help command and clementine-cli withdraw <subcommand> --help.
Don't forget to specify the --network flag if you plan to use a different Bitcoin network other than mainnet. Mainnet is selected implicitly for every command. Network aliases are used interchangeably throughout the docs: bitcoin/mainnet, testnet4/testnet, signet/devnet, and regtest.
Prerequisites
Before starting a withdrawal, ensure you have:
A Clementine CLI wallet with
withdrawalpurpose ("wit" prefix address) which will be used as thesigner addressA Bitcoin address where funds will be sent (destination address)
Access to Citrea wallet with 10 cBTC to withdraw. This can be on a MultiSig or an EOA wallet.
Withdrawal Process Overview
The withdrawal process follows these sequential steps:
Create Withdrawal Wallet - Create a withdrawal wallet for the signer address
Start Withdrawal - Initiate withdrawal process (prompts for Bitcoin transaction)
Send Bitcoin Transaction - Send 330 sats to the signer address to create withdrawal UTXO
Scan for Withdrawals - Find available withdrawal UTXOs
Generate Withdrawal Signatures - Create signatures for optimistic and operator-paid withdrawals
Send - Send withdrawal request with signature to Citrea for optimistic withdrawal along with sending 10 cBTC to the bridge contract for registration of the withdrawal operation. After successful optimistic withdrawal, you will receive your ~10 BTC on your Bitcoin address.
Check Status - Monitor withdrawal progress for optimistic withdrawal for 12 hours
Send Signature to Operators - If Step 6 fails, submit signature to Clementine operators for operator-paid withdrawal
Check Status - Monitor withdrawal progress for operator-paid withdrawal
The SIGNER_ADDRESS and the DESTINATION_ADDRESS are different. The SIGNER_ADDRESS will belong to your Clementine wallet to be able to perform withdrawal specific signing operations, whereas DESTINATION_ADDRESS is the address that the withdrawn BTC funds will be sent to.
Step 1: Create a Wallet for Withdrawal
A new address for withdrawal is required:
Example:
For more detailed wallet usage, please check the wallet documentation.
Step 2: Start Withdrawal
Start the withdrawal process:
Parameters:
SIGNER_ADDRESS: Withdrawal wallet address with "wit" prefixDESTINATION_ADDRESS: Bitcoin address where funds will be sent
Example:
This command will prompt the user to send 330 sats to the signer address to create the dust UTXO needed for the withdrawal operation.
About the "wit" prefix: The signer address must belong to a Clementine wallet with withdrawal purpose and should be prefixed with "wit" to indicate it's being used for withdrawal operations. This ensures proper cryptographic derivation for withdrawal bridge operations.
Important: After running this command, you'll need to send the prompted Bitcoin transaction to the signer address before proceeding.
Step 3: Send Required Bitcoin Transaction
Send 0.00000330 BTC to the prompted address given by the start command to create your withdrawal UTXO.
You'll notice the address used in the command above matches your signer address but lacks the wit prefix. This is intentionalβthe prefix is only needed for Clementine-specific operations, whereas regular transactions use the address in its standard form.
If your wallet cannot send exactly 0.00000330 BTC, you may want to send a slightly higher amount. Be sure to update the config to match the amount you actually sent before proceeding. Run clementine-cli update-config to update the dust_utxo_amount to the amount you actually sent.
This creates the small UTXO needed for the withdrawal operation.
Step 4: Scan for Withdrawals
Scan for available withdrawal UTXOs:
Example:
What this command does:
The scan command provides detailed information about your withdrawal:
Why: Explains that it's locating UTXOs to withdraw funds from Citrea back to Bitcoin
Where: Displays the Bitcoin network, signer address, destination address, and expected UTXO amount
When: Shows block height and confirmation status of each found UTXO, indicating whether they're ready for withdrawal or still pending confirmation
The command will:
Scan the Bitcoin network for UTXOs at your signer address
Display detailed information about each UTXO including:
OutPoint (transaction ID and output index)
Amount in BTC and satoshis
Block height (if confirmed) or mempool status (if unconfirmed)
Current status (ready for withdrawal or waiting for confirmation)
Filter and identify UTXOs that match the expected dust amount
Filter UTXOs that are already used in a withdrawal operation, and warn user not to reuse their signer address
Provide the exact command to generate withdrawal signatures for each valid UTXO
If a UTXO is unconfirmed, you'll need to wait for Bitcoin network confirmation before proceeding with signature generation.
Step 5: Generate Withdrawal Signatures
Generate the signatures for optimistic withdrawal and operator-paid withdrawal using your Clementine CLI wallet.
This command will generate two signatures: one for optimistic withdrawal (which has an exact amount of 999999760 satoshis, or 9.9999976 BTC), and one for operator-paid withdrawal (which has an exact amount of 997000000 satoshis, or 9.97 BTC).
Example:
Save the generated signatures since they will be used to authorize the withdrawal operations that will be done later.
Step 6: Send 10 cBTC to the Bridge Contract
Send 10 cBTC to the bridge contract for registration of the withdrawal operation. After successful optimistic withdrawal, you will receive your ~10 BTC on your Bitcoin address.
Run the following command to open the webpage where you can send the 10 cBTC to the bridge contract along with the generated withdrawal signature that will be used for optimistic withdrawal.
Example:
Step 7: Check Withdrawal Status
Monitor the status of your withdrawal:
Parameters:
WITHDRAWAL_UTXO: Withdrawal UTXO intxid:voutformat
Example:
The status will show the response from the backend.
Step 8: Send the Signature to the Operators
If the optimistic withdrawal does not complete within 12 hours, submit the generated operator-paid withdrawal signature to bridge operators for operator-paid withdrawal processing:
Example:
After sending the operator-paid signature, Clementine Operators will validate and process the withdrawal. Use Step 7 to monitor the status.
Troubleshooting
Address rejected:
DESTINATION_ADDRESSmust be a normal Bitcoin address without thewit/depprefix and not one of your Clementine wallet addresses.No valid UTXOs found in
withdraw scan: the dust UTXO must be confirmed and matchdust_utxo_amount.Signature rejected: regenerate signatures with the exact
WITHDRAWAL_UTXOfrom scan and use the optimistic signature forwithdraw sendor the operator-paid signature forsend-withdrawal-signature-to-operators.
Last updated
Was this helpful?