How do I accept Bitcoin Cash without using a third-party?

1

I'm looking for a way to accept Bitcoin Cash on my e-commerce site without using a third-party payment processor such as Rocketr. Third party services would not be ideal for me because:

  • I would not hold the private keys to my Bitcoin Cash.
  • I would pay a fee for each transaction.

Seeing this as the case, I'm only willing to use software on my own servers to accept Bitcoin Cash in a security-minded way.

Here's my current approach:

  1. Have two servers: Server A, which runs Apache; and Server B, which runs a Bitcoin Cash wallet such a Bitcoin Unlimited.
  2. Server A requests addresses from Server B through the JSON-RPC interface.
  3. Server A displays the address to the user and pings Server B at intervals until the payment is confirmed.
  4. The user sees a confirmation page and the order is complete.

Advantages to this approach:

  • I hold my private keys.
  • I would not have to "refill" the server with public keys.
  • Private keys (theoretically) never leave Server B.

Disadvantages:

  • Both Server A and Server B must be online in order to accept transactions.
  • Server B must be configured in a way so that the commands dumpprivkey, dumpwallet, createrawtransaction, and send* are disabled. (How?)

 

So, is my approach the way to go, or is there a superior alternative?

kemp

Posted 2018-01-27T05:48:38.410

Reputation: 230

Question was closed 2020-08-17T22:12:04.283

Answers

0

Your Bitcoin cash server may be a target for many since it has all the private keys.

I would suggest you get one private master key and public key.

use your public key to generate addresses and your private key to spend Bitcoins.

You can createrawtransaction and all the other commands using PHP or javascript without the need to have a running server.

these libraries are helpful: bitcoinlib-js for javascript and bitcoin-php for PHP

You may need a server just for broadcast a transaction if you want to send bitcoins. you could use your own server or use public servers like electrum servers or blockchain.info

Adam

Posted 2018-01-27T05:48:38.410

Reputation: 3 369

0

There are POS software for that. Here's the list: https://github.com/dsmurrell/awesome-bitcoin-cash#point-of-sale-systems

If you'd like to use an HD wallet, I suggest Pyxpub.

MCCCS

Posted 2018-01-27T05:48:38.410

Reputation: 8 689