Version 22.0 Problem. When trying to send a transaction request to ./bitcoind with an explicit indication of the commission, an error occurs
{
"jsonrpc":"1.0",
"id":"AP",
"method":"sendtoaddress",
"params":[
"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"0.00002",
"comment",
"",
false,
false,
null,
"unset",
false,
"0.00001488"
]
}
The following options were also tried:
{
"jsonrpc":"1.0",
"id":"API",
"method":"sendtoaddress",
"params":[
"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"0.00002",
"comment",
"",
false,
false,
-1,
"unset",
false,
"0.00001488"
]
}
and
{
"jsonrpc":"1.0",
"id":"API lottery",
"method":"sendtoaddress",
"params":[
"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"0.00002",
"comment",
"",
false,
false,
0,
"unset",
false,
"0.00001488"
]
}
Getting any of the above JSON bitcoin thinks that conf_target is full when in fact it is not. Which is why I can't specify fee_rate at the very end. if you remove conf_target from json altogether, then the order of the parser is violated and it parses the fields incorrectly. An error will be received in all three requests:
Cannot specify both conf_target and fee_rate. Please provide either a confirmation target in blocks for automatic fee estimation, or an explicit fee rate.
Expected behavior: Sending a transaction with a fixed commission (0.00001488) specified in the request
Playback:
$ ./bitcoind -testnet
curl --user master --data-binary '{"jsonrpc":"1.0","id":"API","method":"sendtoaddress","params":["tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt","0.00002","comment","",false,false,0,"unset",false,"0.00001488"]}' -H 'content-type: text/plain;' http://127.0.0.1:18332/
When asking this question, I was guided by the documentation on the official website, which by the way does not contain a description of some fields, does not have an example of curl and needs to be updated. So for example there are examples with the fee_rate field, but not where there is no description of it.