To clone this project use the --recursive option to also clone the themes/learn submodule:
```
- git clone --recursive git@github.com:MagicalBitcoin/magicalbitcoin.org.git
+ git clone --recursive git@github.com:bitcoindevkit/bitcoindevkit.org.git
```
If you are editing this website, you can run
If you really don't want to pipe the output of `curl` into `sh`, you can also try using a [Docker image](https://hub.docker.com/_/rust) and working inside of it, but that's meant for more advanced
users and won't be covered in this guide.
-## Installing BDK
+## Installing BDK `repl`
-Once Cargo is installed, you can proceed to install the interactive BDK shell directly from the GitHub repository, by running:
+Once Cargo is installed, you can proceed to install the interactive BDK `repl` tool directly from the GitHub repository, by running:
```bash
-cargo install --git https://github.com/bitcoindevkit/bdk --features=cli-utils --example magic
+cargo install --git https://github.com/bitcoindevkit/bdk --features=cli-utils --example repl
```
-This command will probably take a while to finish, since it will fetch and compile all the dependencies and the `bdk` itself. Once it's done, you can check if everything went fine
-by running `magic --help` which should print something like this:
+This command will probably take a while to finish, since it will fetch and compile all the dependencies and the `bdk` library itself. Once it's done, you can check if everything went fine
+by running `repl --help` which should print something like this:
```text
-Magical Bitcoin Wallet 0.1.0
+BDK repl 0.1.0
Riccardo Casatta <riccardo@casatta.it>:Alekos Filini <alekos.filini@gmail.com>
A modern, lightweight, descriptor-based wallet
USAGE:
- magic [FLAGS] [OPTIONS] --descriptor <DESCRIPTOR> [SUBCOMMAND]
+ repl [FLAGS] [OPTIONS] --descriptor <DESCRIPTOR> [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
pre: "<b>3. </b>"
---
-Remember the `magic --help` command you ran before? Let's analyze its output here to figure out the interface:
+Remember the `repl --help` command you ran before? Let's analyze its output here to figure out the interface:
## Flags
### Verbosity
-If you want to increase the verbosity of the output, you should use the `RUST_LOG` environment variable. You can set it like so to see a lot more of what's going on behind the scenes, before running the `magic`
-command. You only have to do this once when you open a new shell, after that you can run the `magic` command multiple times.
+If you want to increase the verbosity of the output, you should use the `RUST_LOG` environment variable. You can set it like so to see a lot more of what's going on behind the scenes, before running the `repl`
+command. You only have to do this once when you open a new shell, after that you can run the `repl` command multiple times.
```bash
-export RUST_LOG="magical_bitcoin_wallet=debug"
+export RUST_LOG="bdk_repl=debug"
```
## Options
| [sign](#sign) | Signs and tries to finalize a PSBT |
| [sync](#sync) | Syncs with the chosen Electrum server |
-These are the main "functions" of the wallet. Most of them are pretty self explanatory, but we'll go over them quickly anyways. You can get more details about every single command by running `magic <subcommand> --help`.
+These are the main "functions" of the wallet. Most of them are pretty self explanatory, but we'll go over them quickly anyways. You can get more details about every single command by running `repl <subcommand> --help`.
### broadcast
This will start electrum RPC interface on port `51401`, the REST interface on `3000` and the esplora UI on `5000` (You can visit with the browser and look for blocks, addresses and transactions)
-You can then add the `-n regtest -s localhost:51401` to the `magic` commands to switch to the local regtest.
+You can then add the `-n regtest -s localhost:51401` to the `repl` commands to switch to the local regtest.
<center>
<!-- https://buttons.github.io/ -->
- <a class="github-button" href="https://github.com/MagicalBitcoin/magical-bitcoin-wallet/subscription" data-icon="octicon-eye" data-show-count="true" aria-label="Watch MagicalBitcoin/magical-bitcoin-wallet on GitHub">Watch</a>
- <a class="github-button" href="https://github.com/MagicalBitcoin/magical-bitcoin-wallet" data-icon="octicon-star" data-show-count="true" aria-label="Star MagicalBitcoin/magical-bitcoin-wallet on GitHub">Star</a>
- <a class="github-button" href="https://github.com/MagicalBitcoin/magical-bitcoin-wallet/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork MagicalBitcoin/magical-bitcoin-wallet on GitHub">Fork</a>
+ <a class="github-button" href="https://github.com/bitcoindevkit/bdk/subscription" data-icon="octicon-eye" data-show-count="true" aria-label="Watch bitcoindevkit/bdk on GitHub">Watch</a>
+ <a class="github-button" href="https://github.com/bitcoindevkit/bdk" data-icon="octicon-star" data-show-count="true" aria-label="Star bitcoindevkit/bdk on GitHub">Star</a>
+ <a class="github-button" href="https://github.com/bitcoindevkit/bdk/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork bitcoindevkit/bdk on GitHub">Fork</a>
</center>
<center>Built with <a href="https://gohugo.io/">Hugo</a></center>
console_log = "0.2"
clap = "2.33"
secp256k1 = { version = "0.17", features = ["rand"] }
-magical-bitcoin-wallet = { git = "https://github.com/MagicalBitcoin/magical-bitcoin-wallet.git", rev = "5683a83", default-features = false, features = ["esplora", "cli-utils", "compiler"] }
+bdk = { git = "https://github.com/BitcoinDevKit/bdk.git", rev = "5683a83", default-features = false, features = ["esplora", "cli-utils", "compiler"] }
serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1.0" }
use clap::AppSettings;
-use magical_bitcoin_wallet::bitcoin;
-use magical_bitcoin_wallet::database::memory::MemoryDatabase;
-use magical_bitcoin_wallet::miniscript;
-use magical_bitcoin_wallet::*;
+use bdk::bitcoin;
+use bdk::database::memory::MemoryDatabase;
+use bdk::miniscript;
+use bdk::*;
use bitcoin::*;