Difference between commands. getaccountaddress, getaddressesbyaccount, listaddressgroupings

chaeplin

Active Member
Core Developer
Mar 29, 2014
749
356
133
Difference between commands.

getaccountaddress :
Code:
getaccountaddress will return the same address until coins are received on that address;
once coins have been received, it will generate and return a new address.
listaddressgroupings :
Code:
Returns all addresses in the wallet and info used for coincontrol
getaddressesbyaccount :
Code:
Use the getaddressesbyaccount method to list all addresses associated with an account.
example(in testnet)
Code:
[email protected]:~> darkcoind getaddressesbyaccount 0
[
    "mgosBEJMvd27HiHcm1LLJqTekMAkaxHAvZ"
]
Code:
[email protected]:~> darkcoind listaddressgroupings
[
    [
        [
            "mgosBEJMvd27HiHcm1LLJqTekMAkaxHAvZ",
            2032.89400000,
            "0"
        ]
    ]
]
This one will make new address for account 0.
Code:
[email protected]:~> darkcoind getaccountaddress 0
muj9oHwCtoWLcrALSfV7yQS2yh1KLpbXo6
Code:
[email protected]:~> darkcoind listaddressgroupings
[
    [
        [
            "mgosBEJMvd27HiHcm1LLJqTekMAkaxHAvZ",
            2032.89400000,
            "0"
        ]
    ]
]
Code:
[email protected]:~> darkcoind validateaddress muj9oHwCtoWLcrALSfV7yQS2yh1KLpbXo6
{
    "isvalid" : true,
    "address" : "muj9oHwCtoWLcrALSfV7yQS2yh1KLpbXo6",
    "ismine" : true,
    "isscript" : false,
    "pubkey" : "02001c88f3399a1150c47f2e383762997da1f3dde2b94ecfeffac3ac31751853c7",
    "iscompressed" : true,
    "account" : "0"
}
Code:
[email protected]:~> darkcoind getaddressesbyaccount 0
[
    "muj9oHwCtoWLcrALSfV7yQS2yh1KLpbXo6",
    "mgosBEJMvd27HiHcm1LLJqTekMAkaxHAvZ"
]
 
Last edited by a moderator:
  • Like
Reactions: vertoe