Bitcoin Forum
July 24, 2024, 08:22:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creating a specialized listener  (Read 1237 times)
dingrite (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 28, 2013, 06:12:45 PM
 #1


My goal is to create a bot that would listen to the bitcoin network for a list of specific transactions associated with specific bitcoin addresses.

To achieve this I figured it would be best to query the network for the latest blocks, verify them and look for the transactions there.

Does anyone know how I could best do this? A high level description would do.

And I assume libbitcoin is the best cpp lib out there?
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
November 28, 2013, 11:14:39 PM
 #2

Depending on your coding skills this is very easy. 

Call api such as http://blockchain.info/api/blockchain_api

Do your logic

Pause, Repeat.
dingrite (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 28, 2013, 11:32:25 PM
 #3

Thank you but I forgot to mention I do not want to rely on any static source(s).

I want to bootstrap into the p2p network and pull the info out of there.

I also don't want to store the whole blockchain in the process but only the last N blocks. Also the possibility of offline time is possible so it should be able to somehow query only the last N blocks even if the last block it has is N+x (x>0) away.

Sorry I wasn't clearer, I was in a bit of a hurry.
elbandi
Hero Member
*****
Offline Offline

Activity: 525
Merit: 529


View Profile
November 29, 2013, 12:49:39 AM
 #4


My goal is to create a bot that would listen to the bitcoin network for a list of specific transactions associated with specific bitcoin addresses.

To achieve this I figured it would be best to query the network for the latest blocks, verify them and look for the transactions there.

Does anyone know how I could best do this? A high level description would do.

And I assume libbitcoin is the best cpp lib out there?

https://code.google.com/p/bitcoinj/wiki/UsingFromOtherLanguages
here is a sample:
https://github.com/mikehearn/cppjvm/blob/master/mytest/bcj-hello-world.cpp
dingrite (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 29, 2013, 01:34:35 AM
 #5


My goal is to create a bot that would listen to the bitcoin network for a list of specific transactions associated with specific bitcoin addresses.

To achieve this I figured it would be best to query the network for the latest blocks, verify them and look for the transactions there.

Does anyone know how I could best do this? A high level description would do.

And I assume libbitcoin is the best cpp lib out there?

https://code.google.com/p/bitcoinj/wiki/UsingFromOtherLanguages
here is a sample:
https://github.com/mikehearn/cppjvm/blob/master/mytest/bcj-hello-world.cpp


Thank you but I am looking for a C/Cpp implementation, I do not like java dependency and the bot need be able to run without a potential JVM bottleneck. It will be performing a lot of cryptography and many instances may have to be run.
wiggi
Sr. Member
****
Offline Offline

Activity: 403
Merit: 251


View Profile
November 30, 2013, 04:58:31 PM
 #6

a bot that would listen to the bitcoin network for a list of specific transactions associated with specific bitcoin addresses
Patch the Qt-client. Take a look at the console commands (getrawtransaction etc),
everything you need is already there.
cnk
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
December 02, 2013, 11:29:13 AM
 #7


My goal is to create a bot that would listen to the bitcoin network for a list of specific transactions associated with specific bitcoin addresses.


There is a pull request that adds support for watch-only addresses to bitcoind : https://github.com/bitcoin/bitcoin/pull/2861. This PR allows to track transactions and balances without having to know and keep associated private keys in the wallet. Unfortunately, it is unclear when it will be merged.

It is also reported that people are using this in production (custom version of bitcoind).
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!