mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
[Content] v12.3 RPC changes (#38)
* content - Mempool related RPC updates - Add getmempoolancestors, getmempooldescendants, and getmempoolentry RPCs - Update Ref and Table * content - Generate RPCs updated - Mark get/setgenerate as removed - Add generatetoaddress details - Update Ref and Table * content - Debug RPC updated - Change delimiter to + instead of comma - Update Ref and Table * content - GetInfo RPCs updated - getaddednodeinfo, getmemoryinfo, getnetworkinfo - Update Ref and Table * content - Added PreciousBlock RPC - Update Ref and Table * content - Added and update RPCs - Debug, estimatepriority, estimatesmartpriority, listunspent, signmessagewithprivkey, validateaddress - Update Ref and Table * Update GObject Getcurrentvotes with shortened outpoint output - Update example and Vote Info field - Ref #24 * content - Update generate RPC - Add iterations parameter - Ref dashpay/dash#1790 (and bitcoin/bitcoin#7663) * content - Update rawtransaction and generate RPCs - CreateRawTransaction, GetRawTransaction, and FundRawTransaction minor updates - Some minor generate RPC updates for removed commands * content - Update RPCs - Update GetBlockChainInfo and GetBlockTemplate - Add ImportMulti - Some minor generate RPC updates for removed commands * content - Update Dash RPCs - Update GetGovernanceInfo and MasternodeList * content - Update Pruning related RPCs - Update PruneBlockchain, ImportPrunedFunds, and RemovePrunedFunds * content - RPC table - Minor updates * content - Add SetBIP69Enabled RPC * build - Update Makefile check to allow numbers in summary name * content - Add example of RPC with named parameter
This commit is contained in:
parent
d8c79f3876
commit
ded0b9a8ce
41 changed files with 525 additions and 452 deletions
|
@ -7,6 +7,8 @@ http://opensource.org/licenses/MIT.
|
|||
### Remote Procedure Calls (RPCs)
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
Dash Core provides a remote procedure call (RPC) interface for various
|
||||
|
@ -57,6 +59,7 @@ format:
|
|||
| → <br>`id` | string | Optional<br>(0 or 1) | An arbitrary string that will be returned with the response. May be omitted or set to an empty string ("")
|
||||
| → <br>`method` | string | Required<br>(exactly 1) | The RPC method name (e.g. `getblock`). See the RPC section for a list of available methods.
|
||||
| → <br>`params` | array | Optional<br>(0 or 1) | An array containing positional parameter values for the RPC. May be an empty array or omitted for RPC calls that don't have any required parameters.
|
||||
| → <br>`params` | object | Optional<br>(0 or 1) | Starting from Dash Core 0.12.3 / Bitcoin Core 0.14.0 (replaces the params array above) An object containing named parameter values for the RPC. May be an empty object or omitted for RPC calls that don’t have any required parameters.
|
||||
| → → <br>Parameter | *any* | Optional<br>(0 or more) | A parameter. May be any JSON type allowed by the particular RPC method
|
||||
{:.ntpd}
|
||||
|
||||
|
@ -109,6 +112,12 @@ The command to send this request using `dash-cli` is:
|
|||
dash-cli getblockhash 0
|
||||
{% endhighlight %}
|
||||
|
||||
The command to send this request using `dash-cli` with named parameters is:
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli -named getblockhash height=0
|
||||
{% endhighlight %}
|
||||
|
||||
Alternatively, we could `POST` this request using the cURL command-line program
|
||||
as follows:
|
||||
|
||||
|
@ -126,7 +135,7 @@ The HTTP response data for this request would be:
|
|||
|
||||
{% highlight json %}
|
||||
{
|
||||
"result": "00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6",
|
||||
"result": "00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c",
|
||||
"error": null,
|
||||
"id": "foo"
|
||||
}
|
||||
|
@ -147,7 +156,7 @@ Continuing with the example above, the output<!--noref--> from the `dash-cli`
|
|||
command would be simply:
|
||||
|
||||
{% highlight text %}
|
||||
00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6
|
||||
00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c
|
||||
{% endhighlight %}
|
||||
|
||||
If there's an error processing a request, Dash Core sets the `result` field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue