updated for new content

This commit is contained in:
Shannon Appelcline 2020-08-05 09:49:44 -10:00 committed by GitHub
parent 5d80868c2b
commit e0b2a4492f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,23 +1,25 @@
# Chapter 15: Talking to Bitcoind with C # Chapter 15: Talking to Bitcoind with C
While working with Bitcoin Scripts, we hit the boundaries of what's possible with `bitcoin-cli`: it can't currently be used to generate transactions containing unusual scripts. Fortunately, there are other ways to access the Bitcoin network: programming APIs. Though some APIs will allow you to access _all_ of Bitcoin's functionality, this course will focus on software that uses the same RPC commands that you've already learned, except accessed through programming languages rather than through the command line. While working with Bitcoin Scripts, we hit the boundaries of what's possible with `bitcoin-cli`: it can't currently be used to generate transactions containing unusual scripts. Shell scripts also aren't great for some things, such as creating listener programs that are constantly polling. Fortunately, there are other ways to access the Bitcoin network: programming APIs.
This first programming chapter focuses on the foundational C language and uses it to repeat some of the lessons learned from [Chapter 4](04_0_Sending_Bitcoin_Transactions.md): sending basic transactions before covering some new ground. Consider it a new way to use what you already know and a gateway to the larger world of working with APIs. This section focuses on three different libraries that can be used as the foundation of sophisticated C programming: an RPC library and a JSON library together allow you to recreate a lot of what you did in shell scripts, but now using C; while a ZMQ library links you in to notifications, something you haven't been able to previously access. (The next chapter will cover an even more sophisticated library called Libwally, to finish out this introductory look at programming Bitcoin with C.)
## Objectives for This Chapter ## Objectives for This Chapter
After working through this chapter, a developer will be able to: After working through this chapter, a developer will be able to:
* Create C Programs that Talk to the Bitcoind * Create C Programs that use RPC to Talk to the Bitcoind
* Create Programs Based on Bitcoind Notifications * Create C Programs that use ZMQ to Talk to the Bitcoind
Supporting objectives include the ability to: Supporting objectives include the ability to:
* Understand How to Access RPC with C * Understand how to use an RPC library
* Understand How to Access Bitcoind with C * Understand how to use a JSON library
* Understand the capabilities of ZMQ
* Understand how to use a ZMQ library
## Table of Contents ## Table of Contents
* [Section One: Accessing Bitcoind with C](15_1_Accessing_Bitcoind_with_C.md) * [Section One: Accessing Bitcoind in C with RPC Libraries](15_1_Accessing_Bitcoind_with_C.md)
* [Section Two: Programming Bitcoind with C](15_2_Programming_Bitcoind_with_C.md) * [Section Two: Programming Bitcoind in C with RPC Libraries](15_2_Programming_Bitcoind_with_C.md)
* [Section Three: Receiving Bitcoind Notifications with C](15_3_Receiving_Bitcoind_Notifications_with_C.md) * [Section Three: Receiving Notifications in C with ZMQ Libraries](15_3_Receiving_Bitcoind_Notifications_with_C.md)