Skip to content

Contributing

Contributions are very much appreciated. This project is maintained by one developer.

If you find an issue, a vulnerability, or a bug, whether you used AI or not, please report it and submit a fix if you can.

Scope

The supported scope is fixed to:

  • Bitcoin
  • EVM Safe accounts
  • Monero

Additional coins and chains will be added in future releases. Do not add a new chain, a new asset family, or a new escrow model in an unrelated pull request. Open a design discussion first.

Security first

Do not weaken a validation, a policy check, a freshness check, a verifier requirement, or a fail closed path to make a test pass.

Do not remove or soften R24. Monero remains experimental and value capped.

If a change affects:

  • Terms canonicalization
  • Approval binding
  • Settlement payload binding
  • Store concurrency
  • Evidence freshness
  • Monero verifier boundaries
  • R24

Treat it as a security change. Include tests for the failure path and explain the threat model in the pull request.

Development setup

git clone https://github.com/klydz/multisig.git
cd multisig
python -m venv .venv
source .venv/bin/activate
pip install ".[all,test]"
pip install ruff mypy

On Windows, activate the environment with:

.venv\Scripts\activate

Run the checks

pytest
ruff check src tests examples
mypy src

The project uses:

  • Python 3.11 or newer
  • Strict mypy settings
  • Ruff with security rules
  • Pytest
  • Hypothesis for property and fuzz tests
  • Coverage with a high threshold

Run the full suite before opening a pull request. If a test requires a native tool that is not available, document the skip and run the rest.

Code style

  • Keep the existing structure, naming, and type style.
  • Use from __future__ import annotations.
  • Prefer frozen dataclasses for value objects.
  • Validate at the boundary and fail closed.
  • Raise the narrowest existing error type.
  • Do not introduce a new dependency without a clear reason.
  • Keep chain modules lazy so optional dependencies stay optional.
  • Do not log secrets or full private evidence.
  • Do not add network calls to the library.

Tests

Add tests for:

  • The happy path
  • The rejection path
  • Boundary values
  • Malformed input
  • Replay and cross binding
  • Concurrency where relevant
  • Regression coverage for the reported bug

Security tests should prove that the library rejects the bad artifact. A test that only checks a happy path is not enough for a security change.

AI assisted contributions

AI assisted contributions are welcome. You are responsible for the code you submit. Review it, understand it, test it, and disclose material AI assistance when it affects review.

Do not paste secrets, private keys, seed phrases, private view keys, or live credentials into an AI tool or a public issue.

Secrets

Never commit:

  • API tokens
  • GitHub tokens
  • PyPI tokens
  • Private keys
  • Seed phrases
  • Private view keys
  • Wallet files
  • Production evidence

Use test vectors and synthetic data. If a secret was committed, rotate it. Do not rely on deleting the commit.

Pull request checklist

  • The change is in scope.
  • The change preserves fail closed behavior.
  • The change does not weaken R24 controls.
  • Tests cover the failure path.
  • pytest passes.
  • ruff check passes.
  • mypy passes.
  • Public API changes are documented.
  • Security relevant changes are called out in the description.
  • No secrets or generated artifacts are included.

Reporting security issues

Do not open a public issue for a report that may affect funds. Read Security and report privately.

Include the affected version, chain, reproduction steps, impact, and any proposed mitigation. Use test data only.

License

By contributing, you agree that your contribution is licensed under the MIT license used by this project.

Next