Bitcoin Forum
June 25, 2024, 05:08:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: moving away from Blockchain (long)  (Read 630 times)
paolgiacometti (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
August 23, 2016, 08:42:20 AM
 #1

Dear all, sorry for my non-native English.

I post here asking for suggestions being that google and stackoverflow did not help me clarifying my doubts.

I had a web site where I can send and receive Bitcoins.

To archive this I used Blockchain API to process notifications of received Bitcoins and the same to process sending Bitcoin to other addresses.

Due to the fact that Blockchain forced me to change my calling method because they changed the API using node.js I was considering to move away from them. However I found lots of issues. The Blockchain wallet can be exported to multibit-hd and the source code is available but due to my limit knowledge of Java I am not able do replicate the same use case flow. Also, due to the fact that multibit-hd does not run as a service I cannot use it on a vps server being that in case of restart the program does not start automatically.

So I tried to use Bitcoinj directly to process payments the software performs the following steps:

  • I create a new wallet with a new address.
    When the software starts it ask via web services the remote site to see if there is some payments do be send to other addresses create a transaction and then process it. But again due to my limit knowledge of Java I was not able to intercept the payment received on the address of the wallet.

I had also a problem because on the testnet the software works but when I move to production network the program seems to start downloading all the Blockchain.

Being that I am much better at C# I also tried to use NBitcoin but again with no success.

So I Google a while and found that it is possible to run Bitcoin core and use rpc call to process payment but Bitcoin-core need first to download and validate all the Blockchain that is nearly 91GB.

So my question is this:
  • What I need is to code a service that uses a local wallet on a vps server (nix or win does not matter) with only a Blockchain address.
    When a new payment is received in the address the program gets the amount of the transaction and communicate it to a website using web-service.
    Programmatically the same software asks the website if new sending payment should be processed and in this case send the Bitcoin from the address.
The limitations are the following

  • I do not want to use third party services or APIs like Blockchain or Coinbase.
    I do not want to download and process all the Blockchain.
Out there is there anyone that have faces the same difficulties and that can give some suggestions?
Thanks for any help
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
August 23, 2016, 01:39:16 PM
 #2

Take a look at Electrum. It is an SPV wallet so it is very lightweight and doesn't need the entire blockchain. (It will need all of the block headers, which is what BitcoinJ was downloading, but those are very small and light compared to actual blocks.) You can communicate with it using JSON-RPC. The blockchain.info master private key should also be able to be imported into the wallet since both use BIP32 HD wallets.

Check out the documentation for interacting with it for a service at http://docs.electrum.org/en/latest/merchant.html

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!