Oh yes thanks.
So I successfully created a raw transaction following this schema:
- Get a list of not-yet-spent outputs with listunspent
- Create a transaction using createrawtransaction
- Apply signatures using signrawtransaction
- Submit it using sendrawtransaction
I just have a last question to be sure I'm doing things right: here's signrawtransaction doc:
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] [sighash="ALL"]
I used signrawtransaction <hex string> and it worked, I was wondering if I had to specify the private key I want to use since all the inputs in the tx are from the same address?
You should not be testing on the bitcoin network. That's a good way to lose a lot of money if you don't know what you are doing.
You should test on testnet until you are certain that you fully understand all the implications and consequences of what you are doing.
The parameters inside the square brackets [] are optional parameters. If the private keys, and the unspent outputs are already known to the wallet, they are unnecessary.