Author

Topic: Wallet address's account needed? To manage users. (Read 192 times)

full member
Activity: 198
Merit: 130
Some random software engineer
I never used the accounts functionality of bitcoin core, but didn't i read somewhere it's deprecated?

Yes. This is literally written as DEPRECATED at all places where the "account" argument can be used:

Code:
$ bitcoin-cli help getnewaddress
getnewaddress ( "account" "address_type" )

Returns a new Bitcoin address for receiving payments.
If 'account' is specified (DEPRECATED), it is added to the address book
so payments received with the address will be credited to 'account'.

[... snap ...]

$ bitcoin-cli help getaccount
getaccount "address"

DEPRECATED. Returns the account associated with the given address.

[... snap ...]

$ bitcoin-cli help getaccountaddress
getaccountaddress "account"

DEPRECATED. Returns the current Bitcoin address for receiving payments to this account.


The account/user management should not be done at the wallet level but by another application/database.
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
~snip~

Account in bitcoin daemon is more like a lable string, address is enough to send and receive coins. But if you want to set a new account for each user for management purpose, you can do that using bitcoind's rpc, refer to getaccountaddress api.

Code:
getaccountaddress

Returns the current bitcoin address for receiving payments to this account. If does not exist, it will be created along with an associated new address that will be returned.

I never used the accounts functionality of bitcoin core, but didn't i read somewhere it's deprecated?
But you are correct tough, the only thing the OP needs is a new, unique address per user (or a set of addresses). I'd say it might be a good idear to keep the account management in a seperate database (create a small relational db and keep track of which user "owns" which addresses, do make sure you keep track of change addresses when he spends his unspent outputs!!!)
member
Activity: 61
Merit: 15
If there is one coin daemon running, and at that same server, users will join, then issueing addresses to each users.

Then if I want the users can send & receive to/from his address, when I issue address to user, should I attach account string value to that issues address?



Account in bitcoin daemon is more like a lable string, address is enough to send and receive coins. But if you want to set a new account for each user for management purpose, you can do that using bitcoind's rpc, refer to getaccountaddress api.

Code:
getaccountaddress

Returns the current bitcoin address for receiving payments to this account. If does not exist, it will be created along with an associated new address that will be returned.
jr. member
Activity: 413
Merit: 5
If there is one coin daemon running, and at that same server, users will join, then issueing addresses to each users.

Then if I want the users can send & receive to/from his address, when I issue address to user, should I attach account string value to that issues address?

Jump to: