Author

Topic: JSON API Accounts (Read 882 times)

hero member
Activity: 725
Merit: 500
June 02, 2013, 08:49:01 AM
#11
Yea, I'm going to use one account per user (so that you can transfer coins internally without hitting the blockchain) and then I'll do a separate database label system for both addresses and transactions so people can tag their stuff.
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
June 01, 2013, 10:57:38 PM
#10
Unfortunately you are probably not going to find Bitcoin's accounts helpful here (as they are only in effect *tied* to an address for the purpose of detecting an incoming tx).

They are simply not designed for any purpose other than for labeling tx's and moves - if you want something more then an external DB is going to be your best option.
hero member
Activity: 725
Merit: 500
June 01, 2013, 10:55:06 AM
#9
It seems labels are deprecated? Why?

I would like to associate addresses with both accounts and labels!

Code:
account -+- address --- label
         |
         +- address --- label

So I guess the way to do this is to create an address either by label or account and then associate the address with the other.

Code:
getnewaddress
setaccount

OR

getaccountaddress
setlabel

legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
April 07, 2013, 08:53:53 AM
#8
I understand that Gox uses their own custom bitcoind - other than that I don't know much more (although I would be sure they are also using a separate DB to manage user accounts).
hero member
Activity: 725
Merit: 500
April 07, 2013, 08:40:10 AM
#7
Yes, just realized one user can have multiple accounts... thanks for the "move" clarification!

Yes, agree accounts should be handled by my own database, the wallet will be bloated enough with just addresses, can't imagine what the Mt.Gox wallet looks like for example, it must be HUUUUGE!

Maybe they have multiple? Or their own wallet implementation?
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
April 07, 2013, 08:38:15 AM
#6
It doesn't have any support for passwords (so you need to use your own DB for that) - it is really just a way of putting labels against tx's (and "moves") and then being able to check "balances" (which btw can be negative).

I might be mistaken but I don't believe that many Bitcoin projects actually use the accounts feature.
hero member
Activity: 725
Merit: 500
April 07, 2013, 08:35:55 AM
#5
Ok, I guess there's no way to configure passwords independently on these accounts?

One ugly way of solving this is to name the account ":" but otherwise you need a separate database for auth. data.
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
April 07, 2013, 08:04:01 AM
#4
Am pretty sure the information is stored in your wallet (so Berkley DB) but I have no idea how well indexed it is.
hero member
Activity: 725
Merit: 500
April 07, 2013, 08:00:12 AM
#3
Ok, thanks!

How are these implemented, is the database fast and scalable?
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
April 07, 2013, 07:27:54 AM
#2
If you transfer amounts between "accounts" (via move) then I am pretty sure that no blockchain tx occurs (the accounts are to help with handling "user accounts" for a Bitcoin service).
hero member
Activity: 725
Merit: 500
April 07, 2013, 07:23:15 AM
#1
Why does the API have accounts?

I mean you wan't the thirdparty to handle accounts since you'll be able to put parts of the BTC in cold storage AND transfer BTC between accounts without creating a transaction in the blockchain!
Jump to: