I want create a coinbase transaction to go with a new block minned by my program. I am creating it with the json-rpc command createrawtransaction. What's the values for txid and vout in this case?
Asked
Active
Viewed 664 times
0
Kleber Mota
- 131
- 2
- 9
-
what the right way? beginner here, and don't found this anywhere. – Kleber Mota Aug 25 '17 at 23:25
1 Answers
4
The coinbase transaction contains a single input, which has txid set to 0000000000000000000000000000000000000000000000000000000000000000 and vout set to 0xFFFFFFFF.
meshcollider
- 11,695
- 4
- 24
- 52
-
with this values, I got a Parse error as response. the json string I using is: `{"jsonrpc": "1.0", "id":"curltest", "method":"createrawtransaction", "params":[{"txid":"0000000000000000000000000000000000000000000000000000000000000000","vout":0xFFFFFFFF}]`. I also try with `"vout":"0xFFFFFFFF"` – Kleber Mota Aug 25 '17 at 23:31
-
@KleberMota You cannot enter a hex number or string for `vout`. That is invalid JSON. – Andrew Chow Oct 25 '17 at 03:37