You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameters passed to the current store json-rpc api is position based. This means optional parameters has to be explicitly set to null while being send to the api. Only parameters towards the end of the arguments list can be left unspecified but not the middle ones. What we are looking for is to be able to use named-argument passing so that optional arguments can be entirely omitted.
This feature must be normally supported by nim-json-rpc lib (As also indicated in the json-rpc specs https://www.jsonrpc.org/specification under sec 4.2), which is not the case yet. Here is the issue re this status-im/nim-json-rpc#90.
Till this feature gets integrated in nim-json-rpc, the workaround would be to define a Nim object data type wrapping all the arguments inside. The inputs to the rpc procs will be replaced by that Nim object. This means rpc call optional arguments which are now the data members of the Nim object can be omitted with no error.
The text was updated successfully, but these errors were encountered:
Problem
The parameters passed to the current store json-rpc api is position based. This means optional parameters has to be explicitly set to null while being send to the api. Only parameters towards the end of the arguments list can be left unspecified but not the middle ones. What we are looking for is to be able to use named-argument passing so that optional arguments can be entirely omitted.
This feature must be normally supported by nim-json-rpc lib (As also indicated in the json-rpc specs https://www.jsonrpc.org/specification under sec 4.2), which is not the case yet. Here is the issue re this status-im/nim-json-rpc#90.
Till this feature gets integrated in nim-json-rpc, the workaround would be to define a Nim object data type wrapping all the arguments inside. The inputs to the rpc procs will be replaced by that Nim object. This means rpc call optional arguments which are now the data members of the Nim object can be omitted with no error.
The text was updated successfully, but these errors were encountered: