I'm doing some work building yet another language-specific wrapper for BitcoinD's JSON-RPC requests. I'm working from the wiki documentation at
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list.
I'm trying to understand the proper and best way to provide both required and optional parameters.
For example, this request body is valid and produces the response that I expect:
{"jsonrpc":"2.0","id":"1","method":"gettransaction","params":["315a1e40465591c5cbbbeab3318c57fb1b2cfa21e9f8ad297dcf1bc58d560dcd"]}
However, the parameter in this case is not named. In this specific method, it's not such of a big deal since there is only one required parameter. But if you look at some of the more complex calls that have multiple parameters such as listreceivedbyaccount or move, sendmany, etc. it would seem that naming parameters would be more important.
By naming parameters, I'm talking about supplying both the parameter name and it's value to the server.
Something like this, although this *does not work* (so don't use it):
{"jsonrpc":"2.0","id":"1","method":"gettransaction","params":[{"txid":"315a1e40465591c5cbbbeab3318c57fb1b2cfa21e9f8ad297dcf1bc58d560dcd"}]}
Have I just got the expected format wrong? Is there any way to provide the specific parameter name and value to the server to be very specific? Or is it just positional order that is important?
thanks