Bitcoin Forum
April 23, 2024, 03:38:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin API?  (Read 804 times)
Greed (OP)
Newbie
*
Offline Offline

Activity: 25
Merit: 0



View Profile
December 16, 2011, 04:20:06 AM
 #1

Is there some sort of API or bitcoin management suite for linux? I've been planning a bitcoin-based site for quite some time but I hit a speedbump when I realized I'm probably going to have to find a way to generate addresses on demand and then verify them etc. etc. from the same server.

Am I going to have to write a daemon, or do API's/services exist for this kind of thing?

Really, I'm just looking for something that can:

  • Check if balance requested is paid in full
  • Generate unique addresses
  • Send to addresses
1713886739
Hero Member
*
Offline Offline

Posts: 1713886739

View Profile Personal Message (Offline)

Ignore
1713886739
Reply with quote  #2

1713886739
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713886739
Hero Member
*
Offline Offline

Posts: 1713886739

View Profile Personal Message (Offline)

Ignore
1713886739
Reply with quote  #2

1713886739
Report to moderator
1713886739
Hero Member
*
Offline Offline

Posts: 1713886739

View Profile Personal Message (Offline)

Ignore
1713886739
Reply with quote  #2

1713886739
Report to moderator
MORA
Full Member
***
Offline Offline

Activity: 127
Merit: 100



View Profile
December 16, 2011, 06:28:18 PM
 #2

You dont absolutely need bitcoind on the server.
You can pre-generate a large amount of addresses, ie. 100 or 10.000, then save the public (and only the public) address in a database.

When a customer selects to pay with bitcoin, you select and remove a address from the table and ask them to pay to that address.

Then you need a service that will monitor the bitcoin network, seeing that the transactions are public, you just give the service the same list of addresses.
When a payment to one of the addresses is detected, the service will call your server with some params, untill recently there was a service that did just that - bitcoinotify.com - but not sure if it will reappear.

You could also make your own solution, I am trying to do just that with bitcoind, abe and a MySQL database, this still does not need to be on the same server as your website, and by using pre-generated addresses, you dont need to flood your bitcoin wallet with addresses that wont be used, when the customer backs out after getting an address.
You simply wait untill a payment is made to an address, and then adds that address, or uses one of the javascript based ewallets to send the payment to your regular account (since standard bitcoin client cannot import custom addresses, unless you use pywallet and have not encrypted the wallet).

Not sure how to get 0-confirmation to work with abe, it would be neat since that comes within a few seconds of the payment, so you could show a nice graphic while waiting for the initial broadcast of unconfirmed payment, and then show a thank you page.
-but waiting for 2-6confirmations before actually accepting the payment as good in the background.
Greed (OP)
Newbie
*
Offline Offline

Activity: 25
Merit: 0



View Profile
December 17, 2011, 04:57:13 AM
 #3

Thanks for the advice, I suppose I could just generate a veritable shit ton of addresses, but I was looking for some way to make it automated such that I could walk away for a month and have it still be functional etc etc. I guess at this point bitcoind, SQL, and Python are the best way to go about this.
MORA
Full Member
***
Offline Offline

Activity: 127
Merit: 100



View Profile
December 17, 2011, 08:39:32 AM
 #4

If you only expect 1 payment per order, you could reuse the addresses.
The original bitcoin notify suggested this, so after a period of maybe 1week from a purchase you reenter the address in the pool.

Or you could make a webservice of some kind where a different crontab can upload public addresses, ie. once a day check if there is less than 100 addresses left, and then upload 100more, still keeping the private keys off the webserver, so if it gets hacked, they cant use the coins.

But with vanity gen you could make 100.000 addresses, that should last a while Smiley
payb.tc
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
December 17, 2011, 08:47:18 AM
 #5

Thanks for the advice, I suppose I could just generate a veritable shit ton of addresses, but I was looking for some way to make it automated such that I could walk away for a month and have it still be functional etc etc. I guess at this point bitcoind, SQL, and Python are the best way to go about this.

if you want to go away for a month, relying on bitcoind not to freeze up is the last thing you should do.

generating a 'shit ton' of addresses and pulling them from a database would be a MUCH more reliable method if you're going to be away.
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!