Author

Topic: Some questions regarding the JSON RPC API (Read 702 times)

kjj
legendary
Activity: 1302
Merit: 1026
November 24, 2013, 11:03:17 PM
#4
You could run listunspent and work backwards from the scriptPubKey.

But why?
newbie
Activity: 49
Merit: 0
November 24, 2013, 10:06:51 AM
#3
Is there a JSON RPC command I can run to show me either all addresses or only addresses with positive balance in them?

Thanks
kjj
legendary
Activity: 1302
Merit: 1026
November 24, 2013, 07:43:15 AM
#2
How is it possible that I a negative value on the default account?

Accounts don't work like you think they should.  Lots of threads on this.

How come I get so many addresses?

Change.
newbie
Activity: 49
Merit: 0
November 23, 2013, 02:04:31 PM
#1
This is my bitcoin balance:

Code:
[root@server ~]# bitcoind getbalance
0.08360000

Here is a list of all accounts:
Code:
[root@server ~]# bitcoind listaccounts
{
    "" : -0.01640000,
    "Test" : 0.10000000
}

How is it possible that I a negative value on the default account?

Here is the list of addresses assigned to both default and Test account:

Code:
[root@server ~]# bitcoind getaddressesbyaccount Test
[
    "1GHt68zezGUWxYE3mt3YdBAuJ4Gg1XobEn",
    "1E3tD67MK4b7vAV4TUt7sS773Cyhzojoty"
]
[root@server ~]# bitcoind getaddressesbyaccount ''
[
    "1CepZwcr8enPR2MeXViu6jJmw1b5Duy7cr",
    "19Y9Zr5kFW8eFzq2wpbZwXEtdGX7TpkTpM",
    "1Nx3MF99VS84tzqGfekVuQEYxYRWm9NxSZ"
]

As you saw before I have some balance but checking these five addresses none of them has any balance according to blockchain.info

Now it get's weirder, let's list all addresses:

Code:
[root@server ~]# bitcoind listaddressgroupings
[
    [
        [
            "1D8VXBrwLdkM7q97V9DrhCz6i9qSG7dH8X",
            0.00000000
        ],
        [
            "1Da5QLYwBUamhPhLHvVUfS8qyHmkWDLowV",
            0.00000000
        ],
        [
            "1GHt68zezGUWxYE3mt3YdBAuJ4Gg1XobEn",
            0.00000000,
            "Test"
        ],
        [
            "1GYfFugAg2JqmbNBUPU6mKjG5rBg2hG9Rn",
            0.00000000
        ],
        [
            "1JSmKBxUWTJpAitTJ6zHZ3u1YvnS9wmen2",
            0.00000000
        ],
        [
            "12QWneBpiY7QcfYsKya82qvoJ54zxDJBLn",
            0.00000000
        ],
        [
            "12eH7sqhMrkfPafpL2ReewrtgehmxvJ894",
            0.00000000
        ],
        [
            "17fuA8bpyDZy2s9duVmB89EUigZbfSa1n9",
            0.00000000
        ],
        [
            "1HzRmT7GyJWFTqiGz48KhKvFZGnB4dFKCH",
            0.00000000
        ],
        [
            "1DByVqUx95R3qiriq3vQfT1b8dmn8eomT2",
            0.00000000
        ],
        [
            "1EZLyKZd79qtpPk7g5GW6ZLRSeKCuNkSSJ",
            0.00000000
        ],
        [
            "1FSrVyFDZTJGBb4EdF2YTspsfEDySGCLrc",
            0.00000000
        ],
        [
            "1Q7yQ1XpZcxaAF3myohHJraxzD5DuANjmz",
            0.00000000
        ],
        [
            "12kpNxrWr15aRvqWEpBtYJZUKEqvrqFQvg",
            0.08360000
        ],
        [
            "1DyNaapimQowSpMJYucaw4DFrNyKGEXRJo",
            0.00000000
        ]
    ]
]

How come I get so many addresses? When I listed all available accounts and their addresses there were 5 listed.
And also, none of the above addresses has any balance in them..
Jump to: