Bitcoin Forum
May 27, 2024, 11:10:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON API Accounts  (Read 882 times)
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 07, 2013, 11: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!

BANKBOOK GWT Wallet & no-FIAT Billing API
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
April 07, 2013, 11: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).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 07, 2013, 12:00:12 PM
 #3

Ok, thanks!

How are these implemented, is the database fast and scalable?

BANKBOOK GWT Wallet & no-FIAT Billing API
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
April 07, 2013, 12:04:01 PM
 #4

Am pretty sure the information is stored in your wallet (so Berkley DB) but I have no idea how well indexed it is.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 07, 2013, 12:35:55 PM
 #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 "<name>:<pass>" but otherwise you need a separate database for auth. data.

BANKBOOK GWT Wallet & no-FIAT Billing API
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
April 07, 2013, 12:38:15 PM
 #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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 07, 2013, 12:40:10 PM
 #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?

BANKBOOK GWT Wallet & no-FIAT Billing API
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
April 07, 2013, 12:53:53 PM
 #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).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
June 01, 2013, 02:55:06 PM
 #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


BANKBOOK GWT Wallet & no-FIAT Billing API
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
June 02, 2013, 02:57:38 AM
 #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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
June 02, 2013, 12:49:01 PM
Last edit: June 08, 2013, 09:19:57 AM by rupy
 #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.

BANKBOOK GWT Wallet & no-FIAT Billing API
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!