4

I know that bitcoind is written in C++, but I cannot figure out how to use its API within my program. I have been using a Python wrapper effectively, but I need another process running that is as quick as possible. Is there a library somewhere for bitcoind? Thanks.

Or could you just point me to a good Json-rpc library?

Matthew Darnell
  • 508
  • 1
  • 4
  • 12
  • http://jsonrpc-cpp.sourceforge.net/ unless you are going to take some MAJOR time to look into how bitcoin really works just use the jsonrpc lib which works perfectly. You will also likely not achieve much more speed as the json calls are so much slower than python or C it will not make a difference. – michael.schuett Feb 07 '14 at 06:23
  • Thanks a lot. Really, I thought it would run faster in C++ than Python? – Matthew Darnell Feb 07 '14 at 06:35
  • 1
    Unless you have a very specific use case it is not worth the time to rewrite or pick up a new language. – michael.schuett Feb 07 '14 at 06:38
  • 1
    I already know C++ fairly well, so I wouldn't really be picking it up. I'm needing to log every transaction using walletnotify in bitcoin.conf and insert them into a database. Would you recommend doing this every time a new transaction is received, or doing it in batches every so often? – Matthew Darnell Feb 07 '14 at 06:44
  • why? This is already done in the blockchain. – T9b Feb 07 '14 at 11:13
  • @T9b for example modeling blockchain data – jangorecki Jul 23 '15 at 22:36

2 Answers2

4

Here's a JSON-RPC C++ library.

Loourr
  • 3,050
  • 4
  • 17
  • 35
0

[A Newer Library]

There is a wrapper for Bitcoind JSON/RPC interface written in C++ here. It has tests & full coverage for calls.

behkod
  • 303
  • 1
  • 12