How should webapps handle addresses/wallets?

4

There is a ton of bitcoin information, but it's hard to find up to date best practices for making webapps. I am very comfortable making secure webapps, and I'd like to start some bitcoin related webapps, and using a merchant solution like bitpay is not an option. Could someone steer me towards the right keywords and concepts to do this?

When starting a bitcoin webapp, where each account can send and receive bitcoin, what are the best practices around bitcoin transactions? How are bitcoin transactions around accounts handled for online exchanges? Should each account be set up as a separate wallet? Or is it safe enough to give each account an address and record a balance and transaction history tied to each account? Is it necessary to use bitcoind or are there other methods for making transactions?

What kinds of security/safeguards should all bitcoin webapps have (i.e. is it necessary to have cold storage?, two factor auth, etc)?

Edit: I'd like to originate and also receive bitcoin payments. I want to make it easier for people to get started if they have friends that already have bitcoin. So a bitcoin holder can set up an account. Then s/he can email bitcoin to the friend via the app. The app then emails the friend the transaction details if they already have an account; otherwise it will sends an invitation to create an account along with some intro to bitcoin articles. Paying a X% processing fee doesn't make sense in this case where I expect most transactions to be small.

John

Posted 2013-04-14T13:56:02.380

Reputation: 539

Very hard to answer this without having some idea about the type of app. The most obvious question is if you are going to be the originator of Bitcoin payments or just the recipient, but if you provided more information it would give us the ability to provide a clearer answer.jgm 2013-04-14T14:12:17.803

Sorry, I thought this question might be useful for other webapp developers. I've updated the question.John 2013-04-14T14:44:54.493

I'm not sure what your trying to make, but I know bitfloor and coinbase have good merchant api's which takes care of most of the details your talking about.

Loourr 2013-04-14T20:46:00.727

Answers

1

bitcoind has a feature named "accounts" which does exactly that: handles the balance in separate accounts, which you can map to your users. It automatically generates new addresses for the accounts, can move coins between accounts, etc.

Obviously you must take great care into keeping it as secure as possible.

o0'.

Posted 2013-04-14T13:56:02.380

Reputation: 5 180

bitcoind seems like it will work. How does JSON-RPC fit into this picture?John 2013-04-16T11:47:07.843

@John you may interact with bitcoind using json-rpc).

o0'. 2013-04-16T11:57:28.160