[Content] - RPC - Add new ListAddressBalances RPC (#50)

Closes #47
This commit is contained in:
thephez 2018-03-14 12:44:13 -04:00 committed by GitHub
parent 9a803fdf48
commit e3c34fef4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 79 additions and 1 deletions

View file

@ -414,6 +414,8 @@ CVE-2012-2459:
'`keypoolrefill` RPC': rpc keypoolrefill
'`listaccounts`': rpc listaccounts
'`listaccounts` RPC': rpc listaccounts
'`listaddressbalances`': rpc listaddressbalances
'`listaddressbalances` RPC': rpc listaddressbalances
'`listaddressgroupings`': rpc listaddressgroupings
'`listaddressgroupings` RPC': rpc listaddressgroupings
'`listbanned`': rpc listbanned

View file

@ -271,6 +271,7 @@ devsearches:
- 'KeePass': "/en/developer-reference#keepass"
- 'KeypoolRefill': "/en/developer-reference#keypoolrefill"
- 'ListAccounts': "/en/developer-reference#listaccounts"
- 'ListAddressBalances': "/en/developer-reference#listaddressbalances"
- 'ListAddressGroupings': "/en/developer-reference#listaddressgroupings"
- 'ListBanned': "/en/developer-reference#listbanned"
- 'ListLockUnspent': "/en/developer-reference#listlockunspent"

View file

@ -276,6 +276,7 @@ default.
* [KeePass][rpc keepass]: {{summary_keepass}} {{DARKCOIN_NEW0_11_0}}
* [KeyPoolRefill][rpc keypoolrefill]: {{summary_keyPoolRefill}}
* [ListAccounts][rpc listaccounts]: {{summary_listAccounts}} {{DEPRECATED}}
* [ListAddressBalances][rpc listaddressbalances]: {{summary_listAddressBalances}} {{DASH_NEW0_12_3}}
* [ListAddressGroupings][rpc listaddressgroupings]: {{summary_listAddressGroupings}}
* [ListLockUnspent][rpc listlockunspent]: {{summary_listLockUnspent}}
* [ListReceivedByAccount][rpc listreceivedbyaccount]: {{summary_listReceivedByAccount}} {{DEPRECATED}}

View file

@ -0,0 +1,63 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/listaddressbalances.md" %}
##### ListAddressBalances
{% include helpers/subhead-links.md %}
{% assign summary_listAddressBalances="lists addresses of this wallet and their balances" %}
<!-- __ -->
{% autocrossref %}
The `listaddressbalances` RPC {{summary_listAddressBalances}}
*Parameter #1---Minimum Amount*
{% itemplate ntpd1 %}
- n: "Minimum Amount"
t: "numeric (int)"
p: "Optional<br>(0 or 1)"
d: "Minimum balance in DASH an address should have to be shown in the list (default=0)"
{% enditemplate %}
*Result---an object containing the addresses and their balances*
{% itemplate ntpd1 %}
- n: "`result`"
t: "object"
p: "Required<br>(exactly 1)"
d: "An object containing key/value pairs corresponding to the addresses with balances > the minimum amount. May be empty"
- n: "→<br>Address/Amount"
t: "string (base58):<br>number (DASH)"
p: "Optional<br>(1 or more)"
d: "A key/value pair with a base58check-encoded string containing the address as the key, and an amount of DASH as the value"
{% enditemplate %}
*Example from Dash Core 0.12.3*
{% highlight bash %}
dash-cli -testnet listaddressbalances 25
{% endhighlight %}
Result:
{% highlight json %}
{
"yMQtQkcMBXrAZyqTGZeg7tQHzmbypGEP4w": 299.99990000,
"yRyfgrHm4f5A8GGvqpqTFvbCrCQHJm1L4V": 99.13570000,
"ybePwhPzUbiWzFhkgxPgP6iHnTLTyFH6sU": 123.45600000,
"ycCdPQnjNEVRgrQY8j6mxEx9h7oaQpo5Ge": 500.00000000
}
{% endhighlight %}
*See also:*
* [ListAddressGroupings][rpc listaddressgroupings]: {{summary_listAddressGroupings}}
{% endautocrossref %}

View file

@ -91,5 +91,6 @@ Result (edited to only three results):
* [GetAddressesByAccount][rpc getaddressesbyaccount]: {{summary_getAddressesByAccount}}
* [GetTransaction][rpc gettransaction]: {{summary_getTransaction}}
* [ListAddressBalances][rpc listaddressbalances]: {{summary_listAddressBalances}}
{% endautocrossref %}

View file

@ -89,6 +89,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
{% assign summary_keepass="provides commands for configuring and managing KeePass authentication" %}
{% assign summary_keyPoolRefill="fills the cache of unused pre-generated keys (the keypool)." %}
{% assign summary_listAccounts="lists accounts and their balances." %}
{% assign summary_listAddressBalances="lists addresses of this wallet and their balances" %}
{% assign summary_listAddressGroupings="lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction." %}
{% assign summary_listBanned="lists all banned IPs/Subnets." %}
{% assign summary_listLockUnspent="returns a list of temporarily unspendable (locked) outputs." %}

View file

@ -715,6 +715,12 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header::
<td class="tg-dzk6">Y</td>
<td class="tg-dzk6"></td>
</tr>
<tr>
<td class="tg-yw4l">Wallet</td>
<td class="tg-yw4l"><a href="#listaddressbalances">ListAddressBalances</a></td>
<td class="tg-baqh">Y</td>
<td class="tg-baqh">0.12.3.0+</td>
</tr>
<tr>
<td class="tg-yw4l">Wallet</td>
<td class="tg-yw4l"><a href="#listaddressgroupings">ListAddressGroupings</a></td>

View file

@ -144,6 +144,7 @@ http://opensource.org/licenses/MIT.
[rpc keepass]: /en/developer-reference#keepass
[rpc keypoolrefill]: /en/developer-reference#keypoolrefill
[rpc listaccounts]: /en/developer-reference#listaccounts
[rpc listaddressbalances]: /en/developer-reference#listaddressbalances
[rpc listaddressgroupings]: /en/developer-reference#listaddressgroupings
[rpc listbanned]: /en/developer-reference#listbanned
[rpc listlockunspent]: /en/developer-reference#listlockunspent

View file

@ -248,6 +248,8 @@ untrusted source.
{% include devdoc/dash-core/rpcs/rpcs/listaccounts.md %}
{% include devdoc/dash-core/rpcs/rpcs/listaddressbalances.md %}
{% include devdoc/dash-core/rpcs/rpcs/listaddressgroupings.md %}
{% include devdoc/dash-core/rpcs/rpcs/listbanned.md %}