This workshop will guide you through the creation of a multisig wallet using Python and the Bitcoin utilities library. A multisig wallet requires multiple signatures to authorize a transaction, enhancing security.
Before you begin, ensure you have the following installed:
- Python 3.x
- Git
- Clone the repository:
git clone <repository-url>
cd <repository-name>- Run the setup script:
chmod +x setup.sh
./setup.shThis will:
- Create a Python virtual environment
- Install all required dependencies
- Make the program executable
- Activate the virtual environment:
source .hxckr/bin/activateIf you prefer to set up manually, you can:
- Create a new virtual environment:
python3 -m venv .hxckr- Activate the virtual environment:
source .hxckr/bin/activate- Install the required packages:
pip install -r requirements.txtThe entry point to the workshop is the main.py file. To pass the first stage, you need to create an empty commit and push it to the remote repository.
git commit --allow-empty -m "Pass the first stage"
git pushStudy the code in the main.py file and fix the bugs. There are comments in the code that will guide you to the solution. When you are done, create a new commit and push it to the remote repository.
git commit -am "Pass the stage"
git pushYou can also run the program manually to test your changes.
./your_program.sh- Fix the bugs in the program
- Missing validation for required_signatures > 0
- Ignoring config parameter
- Missing initialization of redeem_script and addresses
- Not clearing existing keypairs before generating new ones
- Not calling create_multisig_addresses()
- Add a check for required_signatures > 0
- Add a check for config parameter
- Initialize redeem_script and addresses
- Clear existing keypairs before generating new ones
- Call create_multisig_addresses()
deactivate