Title: bitcoind listunspent for account Post by: Kazuldur on March 31, 2013, 03:29:30 PM Is it possible to list unspent transaction outputs only for one account using bitcoind RPC API?
I have: Code: bitcoind listaccounts Title: Re: bitcoind listunspent for account Post by: Stephen Gornick on March 31, 2013, 08:36:05 PM Is there a way to get all addresses associated with an account? You can use listaddressgroupings to get all the addresses in the wallet and then getaccount to determine which account each address is in. You could filter that with the ones you already know from getaddressesbyaccount and that would leave a smaller list (just of change addresses that exist for all accounts). Title: Re: bitcoind listunspent for account Post by: Kazuldur on April 01, 2013, 05:19:15 PM Well either I'm doing something wrong or there's something wrong with my bitcoind.
Code: $ bitcoind getaddressesbyaccount bitcoiner The second thing is that for every address returned by listaddressgroupings (except for these returned by getaddressesbyaccount) getaccount gives nothing. Here's an output of a little script implementing Stephen's idea (checking for bitcoiner account): Code: $ php test.php Code: Code fragment using jsonRPCClient.php: |