Author

Topic: Are there bitcoin command that add or revise account of specific address? (Read 176 times)

full member
Activity: 198
Merit: 130
Some random software engineer
tthis is only working when the address was linked to an account? edit: or do i have to complete syncing the chain? atm listaddressgroupings returns an emty array even though I called getnewaddress several times

Quote
$ bitcoin-cli help listaddressgroupings
listaddressgroupings

Lists groups of addresses which have had their common ownership
made public by common use as inputs or as the resulting change
in past transactions

The addresses must be part of inputs of transactions or of change in existing transactions. Creating addresses are not sufficient. You can read more about it on this stackexchange thread:

Quote
As you probably know, when you make a purchase, the bitcoind or bitcoin-qt client (which both use bitcoin-core) return your change by default to a new address. Well, if decide to use that address for another transaction, you have created a chain of "connectable" transactions. If you're not careful, there are various other ways that you can create connected transactions (like always using the same receiving address). However, if you already generate a new address to receive Bitcoins, this isn't a problem.

There are already numerous programs available that have the ability to scan the blockchain and list such connected transaction chains, which are definite proof that the addresses in question are or have been in the same wallet.

listaddressgroupings is a method that allow users to have the same ability to discern which groups of their addresses are connected on the public blockchain. It allows users to use the (relatively) new coin control functionality with greater awareness of potential privacy-revealing issues.
newbie
Activity: 85
Merit: 0
tthis is only working when the address was linked to an account? edit: or do i have to complete syncing the chain? atm listaddressgroupings returns an emty array even though I called getnewaddress several times
full member
Activity: 198
Merit: 130
Some random software engineer
What is this curl? How to use and when to use?

It is part of the help message.
jr. member
Activity: 413
Merit: 5

Code:
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
If you need this kind of feature, I would recommend using your own software handling all this with your custom features.
Thanks.
What is this curl? How to use and when to use?

And why I need my own software? I feel this is enough for even exchange, isn't it?

full member
Activity: 198
Merit: 130
Some random software engineer
Even if this feature will soon be deprecated, It is still possible using the setaccount method:

Code:
$ bitcoin-cli help setaccount
setaccount "address" "account"

DEPRECATED. Sets the account associated with the given address.

Arguments:
1. "address"         (string, required) The bitcoin address to be associated with an account.
2. "account"         (string, required) The account to assign the address to.

Examples:
> bitcoin-cli setaccount "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "tabby"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Example:

Code:
$ bitcoin-cli getnewaddress "acc1"
35ro3v9uR3xQoBEx8bbQgjB1V3qMSPoSBP

$ bitcoin-cli getaccount "35ro3v9uR3xQoBEx8bbQgjB1V3qMSPoSBP"
acc1

$ bitcoin-cli setaccount "35ro3v9uR3xQoBEx8bbQgjB1V3qMSPoSBP" "acc2"

$ bitcoin-cli getaccount "35ro3v9uR3xQoBEx8bbQgjB1V3qMSPoSBP"
acc2

If you need this kind of feature, I would recommend using your own software handling all this with your custom features.
jr. member
Activity: 413
Merit: 5
So after make new address with bitcoin-cli getnewaddress,

can I add some account (text value like "testuser1") to that specific address.

and later change it?
Jump to: