/OpenWallet

Bitcoin wallet web app

Primary LanguagePythonMIT LicenseMIT

OpenWallet

Bitcoin hot wallet web app

Support Features

Bitcoin Operations

  • Load and recover BIP 84 wallet from a mnemonic (BIP 39).
  • View receive & change addresses, and UTXOs
  • Send Bitcoin to a Bitcoin address, with customized fee. The transaction is a RFB transaction (BIP 125), meaning it can be replaced with higher fee.
  • Generate a receiving address.
  • Support both testnet and mainnet via config.py.
  • Protected with passphrase for login.
  • View pending transactions.

Lightning

  • Overview on channels, peers, and channels
  • Generate Invoice for receiving payment
  • Pay an invoice
  • View invoices and pays.

Hardware Wallet

  • Support Trezor Wallet

Get Started

cd <path to this directory>
python3 -m venv .
. bin/activate
pip install --upgrade pip
pip install -r requirements.txt 
python initdb.py
FLASK_APP=server.py FLASK_ENV=development flask run

For the future run

. bin/activate
FLASK_APP=server.py FLASK_ENV=development flask run

Configuration

Modify config.py for

  • Select testnet or mainnet.

Run on HTTPS

Requires openssl installed. Unfortunately Chrome is supported using this instruction. Safari and Firefox is supported. If you see a warning from Firefox, click on Advance and Accept the risk and Continue.

# Create a self-signed certificate
openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365

# Import cert.pem to the browswer. On macbook, you can import it using `Keychain Access`

# Start the application with certificate
FLASK_APP=server.py FLASK_ENV=development flask run --cert=cert.pem --key=key.pem

Restrict Access with Passphase

Run on HTTPS to avoid exposing the passphrase

  1. Go to Config.py, and set EnableLogin to True.
  2. Run generate_secret.py and enter passphrase.
  3. Run the app.

Assumption on using OpenWallet

  • Only a single user per instance of OpenWallet.

Backend dependencies

  • Eletrcs / Esplora
  • Lightning Node (c-lightning)
  • Bitcoin Core Node

JS dependencies