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 %}
|
|
@ -23,6 +23,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
|||
{% assign summary_getAccount="returns the name of the account associated with the given address." %}
|
||||
{% assign summary_getAccountAddress="returns the current Bitcoin address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address." %}
|
||||
{% assign summary_getAddedNodeInfo="returns information about the given added node, or all added nodes (except onetry nodes). Only nodes which have been manually added using the `addnode` RPC will have their information displayed." %}
|
||||
{% assign summary_getAddressBalance="returns the balance for address(es) (requires addressindex to be enabled)." %}
|
||||
{% assign summary_getAddressesByAccount="returns a list of every address assigned to a particular account." %}
|
||||
{% assign summary_getBalance="gets the balance in decimal bitcoins across all accounts or for a particular account." %}
|
||||
{% assign summary_getBestBlockHash="returns the header hash of the most recent block on the best block chain." %}
|
||||
|
|
|
@ -106,6 +106,7 @@ http://opensource.org/licenses/MIT.
|
|||
[rpc getaccount]: /en/developer-reference#getaccount
|
||||
[rpc getaccountaddress]: /en/developer-reference#getaccountaddress
|
||||
[rpc getaddednodeinfo]: /en/developer-reference#getaddednodeinfo
|
||||
[rpc getaddressbalance]: /en/developer-reference#getaddressbalance
|
||||
[rpc getaddressesbyaccount]: /en/developer-reference#getaddressesbyaccount
|
||||
[rpc getbalance]: /en/developer-reference#getbalance
|
||||
[rpc getbestblockhash]: /en/developer-reference#getbestblockhash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue