Bitcoin Forum
May 09, 2024, 12:54:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Wallet address's account needed? To manage users.  (Read 172 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
May 03, 2018, 03:59:39 AM
 #1

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?

1715259274
Hero Member
*
Offline Offline

Posts: 1715259274

View Profile Personal Message (Offline)

Ignore
1715259274
Reply with quote  #2

1715259274
Report to moderator
1715259274
Hero Member
*
Offline Offline

Posts: 1715259274

View Profile Personal Message (Offline)

Ignore
1715259274
Reply with quote  #2

1715259274
Report to moderator
1715259274
Hero Member
*
Offline Offline

Posts: 1715259274

View Profile Personal Message (Offline)

Ignore
1715259274
Reply with quote  #2

1715259274
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715259274
Hero Member
*
Offline Offline

Posts: 1715259274

View Profile Personal Message (Offline)

Ignore
1715259274
Reply with quote  #2

1715259274
Report to moderator
1715259274
Hero Member
*
Offline Offline

Posts: 1715259274

View Profile Personal Message (Offline)

Ignore
1715259274
Reply with quote  #2

1715259274
Report to moderator
hushan
Member
**
Offline Offline

Activity: 61
Merit: 15


View Profile
May 03, 2018, 07:50:05 AM
 #2

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 <account> does not exist, it will be created along with an associated new address that will be returned.

BTC: 38ykUxZeSv5aqav1keCc4KUxXLPPGkfrm5 LTC: MPpWNvqDCVB1PHJt4A28j9oFfc6Y1KKDno ETH: 0x07C8c68d5253247038947EF9495b054160c8737c
mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4922


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
May 03, 2018, 08:03:39 AM
 #3

~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 <account> 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!!!)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
starmyc
Full Member
***
Offline Offline

Activity: 198
Merit: 130

Some random software engineer


View Profile
May 03, 2018, 09:01:55 AM
 #4

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.

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances/addresses listing dumps: https://balances.crypto-nerdz.org/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!