How to Contribute
Welcome to the Qsafe Wallet Open-Source Contribution. We are thrilled to open-source the Qsafe Wallet and invite developers to contribute to its growth. The Qsafe Wallet is built with Python and follows the design principles of Electrum.
This document will guide you through the steps to get started contributing to the Qsafe Wallet, running it locally, and submitting your changes.
Table of Contents
Prerequisites
Getting Started
How to Contribute
Coding Standards
Testing Your Changes
Submitting Pull Requests
Code of Conduct
Support
1. Prerequisites
Before contributing, ensure you have the following installed:
Python 3.x: We recommend using Python 3.8 or later. You can download it from here.
pip: Python’s package installer to manage dependencies.
Git: To clone the repository and manage your contributions.
Virtual Environment (optional): For isolating dependencies per project.
To check if Python and pip are installed, run:
2. Getting Started
Clone the repository
To begin working on Qsafe Wallet, clone the repository to your local machine:
Create a virtual environment (optional but recommended)
It's good practice to create a virtual environment to manage dependencies:
Install dependencies
Once you're inside the project directory, install the required dependencies:
This will install the Python packages required to run and test Qsafe Wallet locally.
Running the Qsafe Wallet
Start the wallet server locally by running:
For debugging support use -v
flag along with ./run_qsafe
.
3. How to Contribute
There are several ways you can contribute to the Qsafe Wallet:
1. Fixing Bugs
Browse through the open issues on GitHub.
Pick a bug you can fix, investigate the problem, and submit a PR with your fix.
2. Adding Features
If you have a feature in mind, create an issue first to discuss it.
Work on the feature by extending or modifying the appropriate Python scripts and wallet modules.
3. Improving Documentation
If you notice missing or unclear documentation, feel free to improve it. We need detailed documentation to help new contributors.
4. Enhancing Security
Review and improve wallet security (e.g., improve private key handling, encryption).
Check for any security vulnerabilities that can be fixed.
5. Testing and Reviewing
Help test features by running the wallet with different scenarios.
Review pull requests submitted by others, ensuring code quality and consistency.
4. Coding Standards
To maintain high code quality, we follow certain coding standards:
Python Coding Style: We adhere to PEP 8 (Python Enhancement Proposal 8) standards.
Docstrings: All functions and classes should have appropriate docstrings explaining their purpose.
Use
asyncio
: Useasyncio
for asynchronous tasks like handling RPC requests, wallet transactions, etc.Logging: Use Python’s built-in
logging
module to log important actions or errors.
Code Formatting
We use black for automatic code formatting. To auto-format your code, run:
5. Testing Your Changes
Before submitting your code, make sure to test your changes thoroughly.
Running Tests
You can run the test suite to ensure your changes do not break anything:
To add tests for new features or bug fixes, write your tests in the tests
directory. Ensure they follow existing patterns and test edge cases.
6. Submitting Pull Requests
Once you have made your changes, it's time to submit a pull request (PR).
Steps to submit a PR:
Commit your changes: Write clear and descriptive commit messages.
Push to a new branch:
Create a new branch for your feature or bug fix:
Open a pull request: Go to the GitHub repository and create a PR from your branch to the
main
branch.Provide a detailed description: Explain the changes you've made and link any related issues.
Our maintainers will review your PR and give feedback. If everything looks good, your PR will be merged!
7. Code of Conduct
Please follow our Code of Conduct to create a welcoming and inclusive environment for all contributors. Be respectful and constructive in your interactions.
8. Support
If you need help, you can:
Browse the Issues tab on GitHub for open problems or feature requests.
Open a new Issue if you have a question or need clarification.
Join the Qsafe community on Discord or Forum to interact with other developers.
Last updated