-snip-
At this point the transactions have been sent already with the forced fees.
Right now I want to send the entire balance (0.035BTC) of 12oWtmuwHipw9rC9BYUuMGWMWB3RxMsxUN to 1TtxVxWQwXCcdrbzXFQZGnrBP8oSVjYwP
And again same problem when I add a manual fee. When I tick the box send without fee, it will send it witout a fee. But when I want to include 0.0001 as fee it comes up with 0.00001XXXBTC.
I want the raw transaction to include a fee of 0.0002BTC that will be deducted from the total 0.035BTC.
Thanks for your help man. Really appreciate it.
Alright, lets see what we have.
This ->
https://www.blocktrail.com/BTC/address/12oWtmuwHipw9rC9BYUuMGWMWB3RxMsxUN/transactions/in/0tells me that you have one unspend input here ->
https://www.blocktrail.com/BTC/tx/040a4aadd58794ab0360af01cd30112898371f46a6a8a96e4122102d21038d83worth 0.035 BTC.
So we have the TX ID and vout 0 (because its the 1st output of the TX and those writing code tend to start counting at 0)
Receiving address is 1TtxVxWQwXCcdrbzXFQZGnrBP8oSVjYwP and a 0.0002 fee leaves us with 0.0348.
Putting that all together gives us[1]:
createrawtransaction
"[
{\"txid\":\"040a4aadd58794ab0360af01cd30112898371f46a6a8a96e4122102d21038d83\",\"vout\":0}
]"
"{\"1TtxVxWQwXCcdrbzXFQZGnrBP8oSVjYwP\":0.0348}"
core responds with:
0100000001838d03212d1022416ea9a8a6461f3798281130cd01af6003ab9487d5ad4a0a040000000000ffffffff01c0193500000000001976a91405162fb9ce600faed971c98ebb1993682cd4e8a688ac00000000
which is your unsigned raw transaction.
You can verify it with:
decoderawtransaction 0100000001838d03212d1022416ea9a8a6461f3798281130cd01af6003ab9487d5ad4a0a040000000000ffffffff01c0193500000000001976a91405162fb9ce600faed971c98ebb1993682cd4e8a688ac00000000
in order to sign it you need to unlock your wallet. Lets assume your password is 'passw0rd' and you want to unlock your wallet for 60 seconds.
walletpassphrase passw0rd 60
sign it with:
signrawtransaction 0100000001838d03212d1022416ea9a8a6461f3798281130cd01af6003ab9487d5ad4a0a040000000000ffffffff01c0193500000000001976a91405162fb9ce600faed971c98ebb1993682cd4e8a688ac00000000
and broadcast it to the network with:
sendrawtransaction the_hexcode_that_was_returned_after_you_signed_it
[1] If you do this with your own wallet you can just use:
listunspent 1 9999999 "[\"1address\"]"
it directly shows the TX IDs and vout to use.