Bitcoin Forum
May 21, 2019, 04:05:48 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Wallet address's account needed? To manage users.  (Read 58 times)
wsxdrfv
Newbie
*
Offline Offline

Activity: 322
Merit: 0


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?

1558411548
Hero Member
*
Offline Offline

Posts: 1558411548

View Profile Personal Message (Offline)

Ignore
1558411548
Reply with quote  #2

1558411548
Report to moderator
1558411548
Hero Member
*
Offline Offline

Posts: 1558411548

View Profile Personal Message (Offline)

Ignore
1558411548
Reply with quote  #2

1558411548
Report to moderator
1558411548
Hero Member
*
Offline Offline

Posts: 1558411548

View Profile Personal Message (Offline)

Ignore
1558411548
Reply with quote  #2

1558411548
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1558411548
Hero Member
*
Offline Offline

Posts: 1558411548

View Profile Personal Message (Offline)

Ignore
1558411548
Reply with quote  #2

1558411548
Report to moderator
1558411548
Hero Member
*
Offline Offline

Posts: 1558411548

View Profile Personal Message (Offline)

Ignore
1558411548
Reply with quote  #2

1558411548
Report to moderator
1558411548
Hero Member
*
Offline Offline

Posts: 1558411548

View Profile Personal Message (Offline)

Ignore
1558411548
Reply with quote  #2

1558411548
Report to moderator
hushan
Jr. Member
*
Offline Offline

Activity: 57
Merit: 9


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: 1582
Merit: 1584


https://unblur.ninja =>lightning network testsite


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

starmyc
Member
**
Offline Offline

Activity: 194
Merit: 87

Software engineer


View Profile WWW
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.

Software engineer.
Tip me if you find my help useful: 3QBRMM2CLUTd7hqL4T9Ja2wy6B1VkbXyZ3
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!