From 93efdca98267be745ece2f2007687248f6980c46 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 12 Oct 2023 09:38:17 +1100 Subject: [PATCH 1/3] Remove the license badge from the top of the intro page The license is at the bottom already, no need to force it down peoples throat. --- cookbook/src/intro.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/cookbook/src/intro.md b/cookbook/src/intro.md index 300bb8c..d1bc6cf 100644 --- a/cookbook/src/intro.md +++ b/cookbook/src/intro.md @@ -1,7 +1,5 @@ # Rust Bitcoin -[![CC0 1.0][cc-shield]][cc] - [`rust-bitcoin`](https://github.com/rust-bitcoin/rust-bitcoin) is a library for working with Bitcoin in Rust. It contains Bitcoin network protocol and associated primitives. You can find more by reading the [documentation](https://docs.rs/bitcoin). From 487ac0ff188d0811f0f4ea728b6d03fa906d533c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 24 Oct 2023 12:29:53 +1100 Subject: [PATCH 2/3] Add a getting_started page Most devs know how to do the cargo stuff, its good to have but no need to be front and centre. Move the basic cargo stuff to its own page so as not to clutter the intro. While we move it, change the text to mention that "rand-std" is useful for playing around because one can generate keys. Production devs should probably know what they are doing with secrets anyways. --- cookbook/src/SUMMARY.md | 1 + cookbook/src/getting_started.md | 13 +++++++++++++ cookbook/src/intro.md | 14 +------------- 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 cookbook/src/getting_started.md diff --git a/cookbook/src/SUMMARY.md b/cookbook/src/SUMMARY.md index 3ec9e4e..6f04990 100644 --- a/cookbook/src/SUMMARY.md +++ b/cookbook/src/SUMMARY.md @@ -2,6 +2,7 @@ [Introduction](./intro.md) +- [Getting started](getting_started.md) - [Constructing and Signing Transactions](tx.md) - [SegWit V0](tx_segwit-v0.md) - [Taproot](tx_taproot.md) diff --git a/cookbook/src/getting_started.md b/cookbook/src/getting_started.md new file mode 100644 index 0000000..43bbdf7 --- /dev/null +++ b/cookbook/src/getting_started.md @@ -0,0 +1,13 @@ +# Getting Started + +To add `rust-bitcoin` to your project, run: + +```bash +cargo add bitcoin +``` + +If you are just exploring you probably want to use the "rand-std" feature so you can generate random keys: + +```bash +cargo add bitcoin --features=rand-std +``` diff --git a/cookbook/src/intro.md b/cookbook/src/intro.md index d1bc6cf..9c2b5fb 100644 --- a/cookbook/src/intro.md +++ b/cookbook/src/intro.md @@ -4,19 +4,6 @@ It contains Bitcoin network protocol and associated primitives. You can find more by reading the [documentation](https://docs.rs/bitcoin). -To add `rust-bitcoin` to your project, run: - -```bash -cargo add bitcoin -``` - -Additionally, you can add flags to enable features. -Here's an example: - -```bash -cargo add bitcoin --features=rand-std -``` - This cookbook provides straightforward examples that showcase effective approaches for accomplishing typical Bitcoin-related programming tasks, and utilizing the Rust ecosystem's crates. @@ -29,6 +16,7 @@ and constructing and signing transactions. This book contains: +1. [Getting Started](getting_started.md) 1. [Constructing and Signing Transactions](tx.md) 1. [SegWit V0](tx_segwit-v0.md) 1. [Taproot](tx_taproot.md) From 85fb904a323a76eea8845c19294e2c22a2e5a9c6 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 12 Oct 2023 09:44:22 +1100 Subject: [PATCH 3/3] Attempt to improve the introduction Make an attempt to improve the introduction by doing: - Explain the rust-bitcoin org/crate difference - Explicitly state that this book is about all org crates - Mention bdk and ldk - Mention that the book is WIP --- cookbook/src/intro.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/cookbook/src/intro.md b/cookbook/src/intro.md index 9c2b5fb..30ddd6f 100644 --- a/cookbook/src/intro.md +++ b/cookbook/src/intro.md @@ -1,20 +1,23 @@ -# Rust Bitcoin +# Introduction -[`rust-bitcoin`](https://github.com/rust-bitcoin/rust-bitcoin) is a library for working with Bitcoin in Rust. -It contains Bitcoin network protocol and associated primitives. -You can find more by reading the [documentation](https://docs.rs/bitcoin). +This book is created and maintained by those involved in the +[`rust-bitcoin`](https://github.com/rust-bitcoin) GitHub organization, contributions are +appreciated. It covers various crates from the org and as such, aims to be useful to developers +wanting to write code in Rust that interacts with the Bitcoin network. It is specifically not +limited to just the [`rust-bitcoin`](https://github.com/rust-bitcoin/rust-bitcoin) crate, although +that is a good starting point if you want a one-stop-shop for interacting with Bitcoin in Rust. -This cookbook provides straightforward examples that showcase effective approaches -for accomplishing typical Bitcoin-related programming tasks, -and utilizing the Rust ecosystem's crates. +There are a number of good libraries outside of the `rust-bitcoin` organization that use the crates +covered here, two that you might like to check out are: -The book covers various topics, including receiving data over P2P, -parsing blocks and transactions, -and constructing and signing transactions. +- [`Bitcoin Dev Kit`](https://bitcoindevkit.org/) +- [`Lightning Dev Kit`](https://lightningdevkit.org/) -## Table of Contents +Finally, this book is currently a work inn progress but hopes to eventually cover various topics, +including parsing blocks and transactions, constructing and signing transactions, receiving data +over the peer-to-peer network, plus fun stuff you can do with miniscript. -This book contains: +## Table of Contents 1. [Getting Started](getting_started.md) 1. [Constructing and Signing Transactions](tx.md)