Crates.io | bitcoin_hd |
lib.rs | bitcoin_hd |
version | 0.10.2 |
source | src |
created_at | 2021-08-26 14:50:53.445288 |
updated_at | 2024-03-20 16:37:43.597418 |
description | Bitcoin hierarchical deterministic derivation library |
homepage | https://lnp-bp.org |
repository | https://github.com/BP-WG/descriptor-wallet |
max_upload_size | |
id | 442605 |
size | 130,938 |
Library for building descriptor-based bitcoin wallets. Everything a modern cold and hot bitcoin wallet needs, but which is not (yet) a part of rust-bitcoin library.
The library clearly separates parts requiring access to private keys from
those which should operate never touching them. It is advised that wallets
should be designed in a way assuming zero private key access for all of their
operations aside from transaction signing; this part must be separated into
other repository/library and be strictly controlled. One may look after
command-line btc-hot
and btc-cold
wallets in bin
directory for an
example of how this can be done.
Library provides
ypub
, zprv
etc).One may install command-line wallets with the following command (requires
rust compiler and rustup
tools to be already installed on a system):
$ rustup default stable
$ rustup update
$ git clone https://github.com/BP-WG/descriptor-wallet
$ cd descriptor-wallet
$ cargo install --path . --locked --all-features
This will add btc-hot
and btc-cold
commands to the system.
Clone the repository and checkout to the desired version (here v0.8.0
):
$ git clone https://github.com/BP-WG/descriptor-wallet
$ cd descriptor-wallet
$ git checkout v0.8.0
Build and tag the Docker image:
$ docker build -t descriptor-wallet:v0.8.0 .
$ docker run descriptor-wallet:v0.8.0 btc-hot --help
$ docker run descriptor-wallet:v0.8.0 btc-cold --help
$ docker run -v $PWD/data:/data descriptor-wallet:v0.8.0 btc-hot seed /data/testnet.seed
$ docker run -v $PWD/data:/data descriptor-wallet:v0.8.0 btc-hot derive --testnet /data/testnet.seed /data/testnet