Skip to content

Commit 7d9af29

Browse files
committed
[Doc] Add RPC named arguments to release notes
1 parent 1582bdf commit 7d9af29

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/release-notes.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,25 @@ Results without keys can be queried using an integer in brackets.
9898
example: getblock(getblockhash(0),true)[tx][0]
9999
```
100100

101+
Support for JSON-RPC Named Arguments
102+
------------------------------------
103+
104+
Commands sent over the JSON-RPC interface and through the `pivx-cli` binary can now use named arguments. This follows the [JSON-RPC specification](http://www.jsonrpc.org/specification) for passing parameters by-name with an object.
105+
`pivx-cli` has been updated to support this by parsing `name=value` arguments when the `-named` option is given.
106+
107+
Some examples:
108+
109+
```
110+
src/pivx-cli -named help command="help"
111+
src/pivx-cli -named getblockhash height=0
112+
src/pivx-cli -named getblock blockhash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
113+
src/pivx-cli -named sendtoaddress address="DMJRSsuU9zfyrvxVaAEFQqK4MxZg6vgeS6" amount="1.0" comment="donation"
114+
```
115+
116+
The order of arguments doesn't matter in this case. Named arguments are also useful to leave out arguments that should stay at their default value.
117+
The RPC server remains fully backwards compatible with positional arguments.
118+
119+
101120
#### Allow to optional specify the directory for the blocks storage
102121

103122
A new init option flag '-blocksdir' will allow one to keep the blockfiles external from the data directory.

0 commit comments

Comments
 (0)