Skip to content

andreasgriffin/bitcoin-safe

Repository files navigation

License: GPL v3

Bitcoin Safe

A desktop software for managing your cold storage wallets

Windows Mac OS X Linux
Windows Mac OS X Linux

Comprehensive Feature List

Installation from Git repository

Ubuntu, Debian

  • Install dependencies:

    sudo apt-get install qt6-tools-dev-tools libzbar-dev libxcb-cursor0 '^libqt6.*$' 
  • Install poetry and run bitcoin_safe

    git clone https://github.com/andreasgriffin/bitcoin-safe.git
    cd bitcoin-safe
    pip install poetry  && poetry install && poetry run python -m bitcoin_safe

Mac

  • Clone bitcoin_safe

    open "/Applications/Python 3.12/Install Certificates.command"
    export SSL_CERT_FILE=$(python3 -m certifi) # to fix ssl errors
    git clone https://github.com/andreasgriffin/bitcoin-safe.git
    cd bitcoin-safe
  • Optional: dependency zbar

    brew install zbar  
  • Run bitcoin_safe

    python3 -m pip install poetry && python3 -m poetry install && python3 -m poetry run python3 -m bitcoin_safe

Flatpak build

  • Reproducible Flatpak bundle build via Docker:

    pip install poetry
    poetry install
    poetry run python tools/build.py --targets flatpak --commit None

    This is the default Flatpak path and matches the GitHub workflow structure: the bundle is built inside a Docker container, then startup is tested separately in CI.

  • Host build, install, and smoke-test the Flatpak locally:

    sudo apt-get install flatpak flatpak-builder dbus-daemon desktop-file-utils
    flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    bwrap --ro-bind / / --proc /proc true
    pip install poetry
    poetry install
    poetry run python tools/build.py --targets flatpak --commit None --build-flatpak-on-host
  • The Flatpak bundle is written to dist/Bitcoin-Safe-<version>-<arch>.flatpak.

  • In VS Code the Build Flatpak launch configuration from .vscode/launch.json uses the host build/install/test path.

Development

  • Run the precommit manually for debugging
poetry run pre-commit run --all-files

Python file headers are updated automatically by add-license-header during pre-commit. If the hook rewrites a file, re-stage it and re-run the commit.

Regtest docker environement with electrs and mempool

  • install docker
# see https://docs.docker.com/engine/install/ubuntu/
  • setting up a regtest environment in docker + mempool instance
curl https://getnigiri.vulpem.com | sudo bash # see https://nigiri.vulpem.com/#install
sudo nigiri start
xdg-open http://localhost:5000/
  • This creates
  • Setup mempool instance
sudo apt install docker-compose
git clone https://github.com/ngutech21/nigiri-mempool.git

pushd nigiri-mempool
sudo docker-compose up -d
sleep 10
# this is needed because the database needs time to start up 
sudo docker-compose up -d
popd
xdg-open http://localhost:8080/

# if the mempool is endlessly loading, then get the debug output with
sudo docker-compose logs -f mempool-api

Control the Regtest environment

  • get coins to an address
nigiri rpc generatetoaddress 1 bcrt1qgsnt3d4sny4w4zd5zl9x6jufc5rankqmgphyms9vz0ds73q4xfms655y4c # mine blocks

# or use the internal faucet
nigiri faucet bcrt1qgsnt3d4sny4w4zd5zl9x6jufc5rankqmgphyms9vz0ds73q4xfms655y4c 0.01

Verifying the binaries

  • In Linux the appimage and deb file hashes should match perfectly with your own built version.
  • The Windows exe files are signed, and therefore the signature needs to be stripped.
osslsigncode remove-signature -in signed-binary.exe -out binary-stripped.exe

binary-stripped.exe hash will match the hash of your built version.

Qt designer

Qt componets can be explored with the qt designer:

virtualenv .env-qt-designer
source .env-qt-designer/bin/activate
pip install pyqt6-tools 
pyqt6-tools designer 

Code signing policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation

Privacy policy

This program uses by default

  • Compact Block Filters to fetch blockchain data privately from multiple Bitcoin nodes, without relying on a centralized server
  • fetches mempool fee information from mempool.space

You can still specify your own Electrum, Esplora, or RPC server in "Network settings".

When enabeling the Sync&Chat feature default relays are used to transmit encrypted data to your approved trusted devices. You can specify your own relay(s) in the Sync&Chat settings.

This program will not transfer any other information to other networked systems unless specifically requested by the user or the person installing or operating it.

About

A desktop software for managing your cold storage wallets.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages