Bitcoin Forum
May 05, 2024, 08:58:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Ecommerce bitcoin integration and verification  (Read 1493 times)
dacoinminster
Legendary
*
expert
Offline Offline

Activity: 1260
Merit: 1031


Rational Exuberance


View Profile WWW
July 16, 2013, 07:24:20 PM
 #21

I came up with a really easy way to accept bitcoins on a website without installing anything, but it relies on blockexplorer.com: https://bitcointalk.org/index.php?topic=4324.msg77187#msg77187

Also copied to here:
https://en.bitcoin.it/wiki/Lazy_API

It's a really easy (lazy) way to get started accepting bitcoins on a website without installing a bunch of stuff.

1714899520
Hero Member
*
Offline Offline

Posts: 1714899520

View Profile Personal Message (Offline)

Ignore
1714899520
Reply with quote  #2

1714899520
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 16, 2013, 07:35:46 PM
 #22

I wonder why the bitcoind client is not allowed to check on the balances of any address as this would cure the problem perfectly

The problem is that it scans a block, but doesn't record all addresses, since that is a massive database.

Basically, it watches for any addresses in its wallet when a new block arrives, but ignores any others.

Why do you want to be able to check any address?  If you tell the client in advance what ones you are interested in, then that is probably the best way.

It is not so much "any address" it is however addresses that are not in its own wallet.

I am new to bitcoin integration though, so if my ideas of how it works are wrong please do correct me!

(Basically i want 2 wallets; 1 online to allow checking if a payment was made; And 1 offline to store and have the funds sent too.
My logic "thinks" this is the best way to do things, as then if the server is hacked, it would still not be possible to transfer out my shiny bitcoins)

Thanks
Ford

Bitcoind (the daemon for bitcoin) doesn't support watching wallets however you can create one as a workaround.

On secure computer:
1) create a new wallet, expand the keypool for a reasonably large number based on your expected volume for example 1000 keys and encrypt it.  This is the spending wallet.
2) Make a backup of the spending wallet and store in a secure place along with a backup of passphrase.
3) Make a COPY of the spending wallet.  On the copy change the passphrase to a random long (like 80+ charecters) passphrase.  You should NOT record this passphrase anywhere for any reason.  Mashing the keyboard should be sufficient entropy.  This is the watching wallet.

You now have two wallets:
spending wallet
never put on public webserver
secure backup
known strong passphrase

watching wallet
put on public webserver
has an unknown and impossible to brute force passphrase

Technically the private keys are still on the server but the wallets is always locked, nobody (not even you) knows how to unlock it so if an attacker steals the "watching wallet" the coins are unspendable.

You can now use RPC calls on the watching wallet to get next address from keypool, check on incoming transactions, etc.  Eventually the keypool will be exhausted.  Since the watching wallet can not unlock it can't refresh the keypool.  You will get an error trying to get the next address once keypool is exhausted.  At this point you simply need to repeat step 2 above.  Your spending wallet will have refreshed the keypool overtime.  You can make a new copy, randomly encrypt it, and transfer the copy to the webserver.








Pages: « 1 [2]  All
  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!