mirror of
https://github.com/seigler/dash-docs
synced 2025-07-28 02:06:13 +00:00
Add Dash-specific GetAddressBalance RPC command and associated updates
Update RPC quick reference list
This commit is contained in:
parent
49cda1f507
commit
bd30018011
7 changed files with 79 additions and 2 deletions
|
@ -180,9 +180,8 @@ Use v0.n.n in abbreviation title to prevent autocrossrefing.
|
|||
* [ListBanned][rpc listbanned]: {{summary_listBanned}} {{NEW0_12_0}}
|
||||
* [Ping][rpc ping]: {{summary_ping-rpc}}
|
||||
* [SetBan][rpc setban]: {{summary_setBan}} {{NEW0_12_0}}
|
||||
<!-- Not in Dash
|
||||
* [SetNetworkActive][rpc setnetworkactive]: {{summary_setNetworkActive}} {{NEW0_14_0}}
|
||||
-->
|
||||
|
||||
{% endautocrossref %}
|
||||
|
||||
#### Raw Transaction RPCs
|
||||
|
@ -239,6 +238,7 @@ default.
|
|||
<!-- Not in Dash
|
||||
* [BumpFee][rpc bumpfee]: {{summary_bumpFee}} {{NEW0_14_0}}
|
||||
-->
|
||||
* [DumpHDInfo][rpc dumphdinfo]: {{summary_dumpHdInfo}}
|
||||
* [DumpPrivKey][rpc dumpprivkey]: {{summary_dumpPrivKey}}
|
||||
* [DumpWallet][rpc dumpwallet]: {{summary_dumpWallet}}
|
||||
* [EncryptWallet][rpc encryptwallet]: {{summary_encryptWallet}}
|
||||
|
|
70
_includes/devdoc/dash-core/rpcs/rpcs/getaddressbalance.md
Normal file
70
_includes/devdoc/dash-core/rpcs/rpcs/getaddressbalance.md
Normal file
|
@ -0,0 +1,70 @@
|
|||
{% 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/getaddressbalance.md" %}
|
||||
|
||||
##### GetAddressBalance
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
{% assign summary_getAddressBalance="returns the balance for address(es) (requires addressindex to be enabled)." %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
||||
The `getaddressbalance` RPC {{summary_getAddressBalance}}
|
||||
|
||||
*Parameter #1---an array of addresses*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Address"
|
||||
t: "string (base58)"
|
||||
p: "Required<br>(1 or more)"
|
||||
d: "An array of P2PKH or P2SH Dash address(es)."
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Result---the current balance in duffs and the total number of duffs received (including change)*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`result`"
|
||||
t: "object"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An object listing the current balance and total amount received (including change), or an error if any address is invalid"
|
||||
|
||||
- n: "→<br>`balance`"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The current balance in duffs"
|
||||
|
||||
- n: "→<br>`received`"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The total number of duffs received (including change)"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Get the balance for an address:
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli getaddressbalance '{"addresses": ["yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"]}'
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight text %}
|
||||
{
|
||||
"balance": 0,
|
||||
"received": 10000100
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
||||
* [GetBalance][rpc getbalance]: {{summary_getBalance}}
|
||||
* [GetUnconfirmedBalance][rpc getunconfirmedbalance]: {{summary_getUnconfirmedBalance}}
|
||||
|
||||
{% endautocrossref %}
|
Loading…
Add table
Add a link
Reference in a new issue