diff --git a/Makefile b/Makefile index 3bd56d3c..5406fcda 100644 --- a/Makefile +++ b/Makefile @@ -222,9 +222,9 @@ check-for-missing-copyright-licenses: check-for-missing-rpc-summaries: ## Make sure the Quick Reference section has a summary for each RPC we ## have documented - $S for f in _includes/devdoc/bitcoin-core/rpcs/rpcs/*.md ;\ - do grep -q "\[$$( grep '^##### ' $$f | sed 's/^##### *\([a-zA-Z]*\).*/\1/')\]\[" _includes/devdoc/bitcoin-core/rpcs/quick-reference.md \ - || echo 'missing summary for '$$f', you need to add the summary to _includes/devdoc/bitcoin-core/rpcs/quick-ref.md and run make manual-updates' \ + $S for f in _includes/devdoc/dash-core/rpcs/rpcs/*.md ;\ + do grep -q "\[$$( grep '^##### ' $$f | sed 's/^##### *\([a-zA-Z]*\).*/\1/')\]\[" _includes/devdoc/dash-core/rpcs/quick-reference.md \ + || echo 'missing summary for '$$f', you need to add the summary to _includes/devdoc/dash-core/rpcs/quick-ref.md and run make manual-updates' \ ; done | eval $(ERROR_ON_OUTPUT) manual-update-summaries-file: diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/getaddressdeltas.md b/_includes/devdoc/dash-core/rpcs/rpcs/getaddressdeltas.md index cd640e4d..869099ef 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/getaddressdeltas.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/getaddressdeltas.md @@ -9,7 +9,111 @@ http://opensource.org/licenses/MIT. {% autocrossref %} -{% assign summary_getAddressDeltas="" %} +{% assign summary_getAddressDeltas="returns all changes for an address (requires addressindex to be enabled)." %} +*Requires wallet support.* + +The `getaddressdeltas` RPC {{summary_getAddressDeltas}} + +*Parameter #1---an array of addresses* + +{% itemplate ntpd1 %} +- n: "Address" + t: "string (base58)" + p: "Required
(1 or more)" + d: "An array of P2PKH or P2SH Dash address(es)." + +{% enditemplate %} + +*Parameter #2---the start block height* + +{% itemplate ntpd1 %} +- n: "Block Height" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The start block height" + +{% enditemplate %} + +*Parameter #3---the end block height* + +{% itemplate ntpd1 %} +- n: "Block Height" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The end block height" + +{% enditemplate %} + +*Result---information about all changes for the address(es)* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of JSON objects, with each object describing a transaction involving one of the requested addresses" + +- n: "→
`delta`" + t: "object" + p: "Required
(1 or more)" + d: "An object describing a particular address delta" + +- n: "→→
`satoshis`" + t: "number" + p: "Required
(exactly 1)" + d: "The difference of satoshis" + +- n: "→→
`txid`" + t: "string" + p: "Required
(exactly 1)" + d: "The related txid" + +- n: "→→
`index`" + t: "number" + p: "Required
(exactly 1)" + d: "The related input or output index" + +- n: "→→
`height`" + t: "number" + p: "Required
(exactly 1)" + d: "The block height" + +- n: "→→
`address`" + t: "string" + p: "Required
(exactly 1)" + d: "The base58check encoded address" + +{% enditemplate %} + +*Example from Dash Core 0.12.2* + +Get the deltas for an address: + +{% highlight bash %} +dash-cli getaddressdeltas '{"addresses": ["yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"]}' +{% endhighlight %} + +Result: + +{% highlight text %} +[ + { + "satoshis": 10000100, + "txid": "1fe86e463a9394d4ccd9a5ff1c6b483c95b4350ffdb055b55dc3615111e977de", + "index": 18, + "blockindex": 1, + "height": 6708, + "address": "yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ" + }, + { + "satoshis": -10000100, + "txid": "6cb4379eec45cd3bb08b8f4c3a101b8cd89795e24f2cb8288a9941a85fb114cf", + "index": 0, + "blockindex": 1, + "height": 7217, + "address": "yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ" + } +] +{% endhighlight %} {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/getaddressmempool.md b/_includes/devdoc/dash-core/rpcs/rpcs/getaddressmempool.md index eb304960..053c3222 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/getaddressmempool.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/getaddressmempool.md @@ -9,7 +9,83 @@ http://opensource.org/licenses/MIT. {% autocrossref %} -{% assign summary_getAddressMempool="" %} +{% assign summary_getAddressMempool="returns all mempool deltas for an address (requires addressindex to be enabled)." %} +*Requires wallet support.* + +The `getaddressmempool` RPC {{summary_getAddressMempool}} + +*Parameter #1---an array of addresses* + +{% itemplate ntpd1 %} +- n: "Address" + t: "string (base58)" + p: "Required
(1 or more)" + d: "An array of P2PKH or P2SH Dash address(es)." + +{% enditemplate %} + +*Result---information about mempool deltas for the address(es)* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of JSON objects, with each object describing a transaction involving one of the requested addresses" + +- n: "→
`mempool deltas`" + t: "object" + p: "Required
(1 or more)" + d: "An object describing a particular mempool address delta" + +- n: "→→
`address`" + t: "string" + p: "Required
(exactly 1)" + d: "The base58check encoded address" + +- n: "→→
`txid`" + t: "string" + p: "Required
(exactly 1)" + d: "The related txid" + +- n: "→→
`index`" + t: "number" + p: "Required
(exactly 1)" + d: "The related input or output index" + +- n: "→→
`satoshis`" + t: "number" + p: "Required
(exactly 1)" + d: "The difference of satoshis" + +- n: "→→
`timestamp`" + t: "string" + p: "Required
(exactly 1)" + d: "The time the transaction entered the mempool (seconds)" + +- n: "→→
`prevtxid`" + t: "string" + p: "Required
(exactly 1)" + d: "The previous txid (if spending)" + +- n: "→→
`prevout`" + t: "string" + p: "Required
(exactly 1)" + d: "The previous transaction output index (if spending)" +{% enditemplate %} + +*Example from Dash Core 0.12.2* + +Get the deltas for an address: + +{% highlight bash %} +dash-cli getaddressmempool '{"addresses": ["yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"]}' +{% endhighlight %} + +Result: + +{% highlight text %} + Example result needed +{% endhighlight %} {% endautocrossref %}