Here goes the answers for many posts you made.
Before I was using version 23, but I managed to upgrade to 25, problem was that I was running a service in this website:
https://console.shuken.io/account/And they were running only version 23.
They said they would upgrade just next month, so I moved on to a VPS and I installed a pruned node.
Now with my own version 25, I got solution for the problem:
"error": "Witness program was passed an empty witness"What is the problem?
If we add some address to our wallet and we use the option to rescan the wallet since some "timestamp" value it will never work, we will see always that error.
So, if you use a "timestamp" to rescan wallet, at the end you need to always run this command:
bitcoin-cli importdescriptors '[{"desc": "tr(your_private_key)#your-checksum", "timestamp": "now", "internal": false, "label": "your_label"}]'Sometimes even if you stop the core and restart again you need to do it again what is a pain in the ass.
After that you just create the raw normally with this command:
bitcoin-cli createrawtransaction '[{"txid":"your_txid","vout":your_vout}]' '[{"your_destination_address":your_amount}]'That will give some output like this:
0200000001...Then we sign that output RAW with this command:
bitcoin-cli signrawtransactionwithwallet 0200000001...That will give us some output like this:
020000000001...And we use it to broadcast it with:
bitcoin-cli sendrawtransaction 020000000001...That's it.
But now... Here we go again, infatuation !
If we want to use
signrawtransactionwithkey and we are using the simplest syntax:
bitcoin-cli signrawtransactionwithkey 0200000001... '["your_private_key"]'I got the same old f* error:
"error": "Witness program was passed an empty witness"Now we can't use the
bitcoin-cli importdescriptors trick with
"timestamp": "now", so, what is the solution?
Try it yourself please and give here feedback about if you have the same results or not.