Hello,
I post a message today cause I tried multiple ways to manage with my issue but I didn't find any solution. Maybe you can help me ?
First my version and OS :
Bitcoin Core version v24.0.1 (release build)
MacOS 14.0
Shell : zsh
My Bitcoin full node is running with txindex=1. I'm running `./bitcoind`. Everything what I'm talking is under `./bitcoin-cli` command.
I selected a wallet, and listed unspent. I want to merge multiple inputs into one single output.
I selected transactions that I want to merge 3 for the test and one address to give the change.
I try to build my tx from `rawtransaction` but maybe I should use another. Here I tried also `walletcreatefundedpsbt` but I got the error : Insufficient funds.
So, I selected my utxos and build rawtransaction as follow :
./bitcoin-cli -rpcwallet=MY_WALLET createrawtransaction "[{\"txid\":\"tx_id_1\",\"vout\": 0, \"scriptPubKey\":\"Script_1\"}, {\"txid\":\"tx_id_2\",\"vout\": 1, \"scriptPubKey\":\"Script_2\"}, {\"txid\":\"tx_id_3\",\"vout\": 1, \"scriptPubKey\":\"Script_3\"}]" "[{\"recipient\" : amt}]"
Here I take the output to sign it (with `signrawtransactionwithwallet`), I got the error :
{
"txid": "tx_id_1",
"vout": 0,
"witness": [
],
"scriptSig": "",
"sequence": 4294967293,
"error": "Witness program was passed an empty witness"
}
This for all utxos.
So, I tried to sign manually each ScriptPubKey as message with signmessage but I need the pvkey. When I try dumpvkey I have the error : Only legacy wallets are supported by this command
The wallet is a taproot wallet (bc1p...).
I don't know what step to follow in order to add the witness and be able to sign this raw transaction and send to the network. I think sending on the network is not the hardest part but I didn't find how to handle signatures for this...
It's not a multisig wallet and I have the control of it.
Do you have any ideas or suggestions ?
Thanks for your reading I hope that we can solve this together