From 1de2b924a9f0f006c745b13cb8d4c36a8f622e86 Mon Sep 17 00:00:00 2001 From: thephez Date: Wed, 21 Aug 2019 15:17:11 -0400 Subject: [PATCH] RPC - Add new listwallets RPC --- _autocrossref.yaml | 2 + _config.yml | 1 + .../devdoc/dash-core/rpcs/quick-reference.md | 1 + .../devdoc/dash-core/rpcs/rpcs/listwallets.md | 51 +++++++++++++++++++ _includes/helpers/summaries.md | 1 + _includes/layout/base/rpc-table.html | 6 +++ _includes/references.md | 1 + en/developer-reference.md | 2 + 8 files changed, 65 insertions(+) create mode 100644 _includes/devdoc/dash-core/rpcs/rpcs/listwallets.md diff --git a/_autocrossref.yaml b/_autocrossref.yaml index f5883896..66ecd49c 100644 --- a/_autocrossref.yaml +++ b/_autocrossref.yaml @@ -489,6 +489,8 @@ DIP8: '`listtransactions` RPC': rpc listtransactions '`listunspent`': rpc listunspent '`listunspent` RPC': rpc listunspent +'`listwallets`': rpc listwallets +'`listwallets` RPC': rpc listwallets '`lockunspent`': rpc lockunspent '`lockunspent` RPC': rpc lockunspent '`masternode`': rpc masternode diff --git a/_config.yml b/_config.yml index 4b47e476..a28e448c 100644 --- a/_config.yml +++ b/_config.yml @@ -266,6 +266,7 @@ devsearches: - 'ListSinceBlock': "/en/developer-reference#listsinceblock" - 'ListTransactions': "/en/developer-reference#listtransactions" - 'ListUnspent': "/en/developer-reference#listunspent" + - 'ListWallets': "/en/developer-reference#listwallets" - 'LockUnspent': "/en/developer-reference#lockunspent" - 'Masternode': "/en/developer-reference#masternode" - 'MasternodeBroadcast': "/en/developer-reference#masternodebroadcast" diff --git a/_includes/devdoc/dash-core/rpcs/quick-reference.md b/_includes/devdoc/dash-core/rpcs/quick-reference.md index df685b3e..5abcd1c1 100644 --- a/_includes/devdoc/dash-core/rpcs/quick-reference.md +++ b/_includes/devdoc/dash-core/rpcs/quick-reference.md @@ -315,6 +315,7 @@ default. * [ListSinceBlock][rpc listsinceblock]: {{summary_listSinceBlock}} {{DASH_UPDATED0_14_1}} * [ListTransactions][rpc listtransactions]: {{summary_listTransactions}} {{DASH_UPDATED0_14_0}} * [ListUnspent][rpc listunspent]: {{summary_listUnspent}} {{DASH_UPDATED0_14_1}} +* [ListWallets][rpc listwallets]: {{summary_listWallets}} {{DASH_NEW0_14_1}} * [LockUnspent][rpc lockunspent]: {{summary_lockUnspent}} * [Move][rpc move]: {{summary_move}} {{DEPRECATED}} * [RemovePrunedFunds][rpc removeprunedfunds]: {{summary_removePrunedFunds}} {{DASH_NEW0_12_3}} {{NEW0_13_0}} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/listwallets.md b/_includes/devdoc/dash-core/rpcs/rpcs/listwallets.md new file mode 100644 index 00000000..0518125a --- /dev/null +++ b/_includes/devdoc/dash-core/rpcs/rpcs/listwallets.md @@ -0,0 +1,51 @@ +{% 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/listwallets.md" %} + + +##### ListWallets +{% include helpers/subhead-links.md %} + +{% assign summary_listWallets="returns a list of currently loaded wallets." %} + +{% autocrossref %} + +The `listwallets` RPC {{summary_listWallets}} + +For full information on the wallet, use the `getwalletinfo` RPC. + +*Parameters: none* + +*Result* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of strings containing a list of currently loaded wallet files" + +- n: "→
Wallet" + t: "string" + p: "Required
(0 or more)" + d: "The name of a wallet file" + +{% enditemplate %} + +*Example from Dash Core 0.14.1* + +{% highlight bash %} +dash-cli -testnet listwallets +{% endhighlight %} + +Result: +{% highlight json %} +[ + "wallet.dat" +] +{% endhighlight %} + +*See also: none* + +{% endautocrossref %} diff --git a/_includes/helpers/summaries.md b/_includes/helpers/summaries.md index 72cf5d20..9044b144 100644 --- a/_includes/helpers/summaries.md +++ b/_includes/helpers/summaries.md @@ -101,6 +101,7 @@ This file is licensed under the terms of its source texts{%endcomment%} {% assign summary_listSinceBlock="gets all transactions affecting the wallet which have occurred since a particular block, plus the header hash of a block at a particular depth." %} {% assign summary_listTransactions="returns the most recent transactions that affect the wallet." %} {% assign summary_listUnspent="returns an array of unspent transaction outputs belonging to this wallet." %} +{% assign summary_listWallets="returns a list of currently loaded wallets." %} {% assign summary_lockUnspent="temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails." %} {% assign summary_masternode="provides a set of commands for managing masternodes and displaying information about them." %} {% assign summary_masternodeBroadcast="was removed in Dash Core 0.14.0." %} diff --git a/_includes/layout/base/rpc-table.html b/_includes/layout/base/rpc-table.html index f068c930..d036de01 100644 --- a/_includes/layout/base/rpc-table.html +++ b/_includes/layout/base/rpc-table.html @@ -793,6 +793,12 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header:: Y Updated in 0.14.1 + + Wallet + ListWallets + Y + Added in 0.14.1 + Wallet LockUnspent diff --git a/_includes/references.md b/_includes/references.md index a024ec44..6e8840b3 100644 --- a/_includes/references.md +++ b/_includes/references.md @@ -169,6 +169,7 @@ http://opensource.org/licenses/MIT. [rpc listsinceblock]: /en/developer-reference#listsinceblock [rpc listtransactions]: /en/developer-reference#listtransactions [rpc listunspent]: /en/developer-reference#listunspent +[rpc listwallets]: /en/developer-reference#listwallets [rpc lockunspent]: /en/developer-reference#lockunspent [rpc masternode]: /en/developer-reference#masternode [rpc masternodebroadcast]: /en/developer-reference#masternodebroadcast diff --git a/en/developer-reference.md b/en/developer-reference.md index 36221f77..954bf030 100644 --- a/en/developer-reference.md +++ b/en/developer-reference.md @@ -272,6 +272,8 @@ untrusted source. {% include devdoc/dash-core/rpcs/rpcs/listunspent.md %} +{% include devdoc/dash-core/rpcs/rpcs/listwallets.md %} + {% include devdoc/dash-core/rpcs/rpcs/lockunspent.md %} {% include devdoc/dash-core/rpcs/rpcs/masternode.md %}