What command can i use instead of `ListAccounts`

1

In documentation said: "listaccounts will be removed in a later version of Bitcoin Core"

https://bitcoin.org/en/developer-reference#listaccounts

In "See Also" section:

GetAccount - Not return list accounts
GetAddressesByAccount [deprecated]
ListReceivedByAccount [deprecated]

Are we have a alternative command ?

meotimdihia

Posted 2017-11-11T08:34:56.293

Reputation: 173

listunspent??MCCCS 2017-11-11T14:33:42.213

Answers

1

You can still use the same commands to get a list of accounts and addresses

getaddressesayaccount: returns a list of every address assigned to a particular account.

listreceivedbyaccount: lists the total number of bitcoins received by each account.

Or as a workaround you can try the trick with the following:

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.

listtransactions "*" 1 0 true: List the most recent transaction from all accounts including watch-only addresses.

More info on the available commands to list accounts/addresses: https://bitcoin.org/en/developer-reference

Hope this helps,

kind regards.

Cluster2k

user51260

Posted 2017-11-11T08:34:56.293

Reputation:

thx for the answer! I realized that I can set label(s) for all addresses get labels with listlabels get addresses with getaddressesbylabel for each labelKumirska 2018-11-06T16:11:26.017

0

listaddressgroupings seems to be a good alternative to the deprecated listaccounts command.

James Bedford

Posted 2017-11-11T08:34:56.293

Reputation: 101

0

listaddressgroupings Returns all addresses in the wallet and info used for coincontrol

it basically returns output as a list contaning address and corresponding balance

[
  "2NCX68pyD9Hcp4FVtpoGYqG8GegDEiYBvNp",
  1.99939120
],
[
  "2NE6ee6nVjsmqTVy8WUqR9Krk84PH82KqV1",
  0.00000000
],
[
  "2NEPfREuzAZbVJNMfPR9gr8jfKCGZE24Xjw",
  42.99996200
]

cryptoKTM

Posted 2017-11-11T08:34:56.293

Reputation: 489