Skip to content

Commit

Permalink
Merge #4: Improve introduction
Browse files Browse the repository at this point in the history
85fb904 Attempt to improve the introduction (Tobin C. Harding)
487ac0f Add a getting_started page (Tobin C. Harding)
93efdca Remove the license badge from the top of the intro page (Tobin C. Harding)

Pull request description:

  Attempt to improve the introduction page.

ACKs for top commit:
  realeinherjar:
    ACK 85fb904

Tree-SHA512: 4ac95d77b3985063475e92e2c5397e1478d02e09fcf5e32210197c9210909b35167d16a8360ea159f9c99283a739dc0f991db114159602553125ff01be91cc0a
  • Loading branch information
tcharding committed Oct 27, 2023
2 parents 43a9c17 + 85fb904 commit bcdce9f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
1 change: 1 addition & 0 deletions cookbook/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
13 changes: 13 additions & 0 deletions cookbook/src/getting_started.md
Original file line number Diff line number Diff line change
@@ -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
```
41 changes: 15 additions & 26 deletions cookbook/src/intro.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
# Rust Bitcoin
# Introduction

[![CC0 1.0][cc-shield]][cc]
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.

[`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).
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:

To add `rust-bitcoin` to your project, run:
- [`Bitcoin Dev Kit`](https://bitcoindevkit.org/)
- [`Lightning Dev Kit`](https://lightningdevkit.org/)

```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.

The book covers various topics, including receiving data over P2P,
parsing blocks and transactions,
and constructing and signing transactions.
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.

## Table of Contents

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)
Expand Down

0 comments on commit bcdce9f

Please sign in to comment.