Skip to content

multisig

Offline multisig escrow for Bitcoin, EVM Safe accounts, and Monero.

multisig builds and verifies funding targets, settlement plans, PSBTs, Safe calldata, Monero settlement plans, and signed approval tokens without connecting to a node, RPC endpoint, or wallet. It does not accept private keys, private view keys, wallet files, seed phrases, or multisig secret shares.

  • Distribution: multisig
  • Python import: multisig_escrow
  • Version: 0.1.0
  • Python: 3.11 or newer

Install

pip install multisig
pip install "multisig[bitcoin]"
pip install "multisig[evm]"
pip install "multisig[monero]"

The core package has no runtime dependencies. Chain support is optional and imported lazily.

Supported now

Only these coins and chains are supported for now.

  • Bitcoin: BTC with P2WSH sortedmulti and optional CSV refund.
  • EVM: ETH and allowlisted ERC20 on supported EVM chains with Safe v1.3.0 or v1.4.1.
  • Monero: XMR with experimental CLSAG 2 of 3 and optional pre signed unlock_time refund.

Additional coins and chains will be added in future releases.

Start here

How it works

The library coordinates the escrow agreement and verifies the exact settlement payload. The chain and the signers remain the authority.

  1. Build and validate the escrow terms.
  2. Derive the funding target and verify caller supplied funding evidence.
  3. Build a release or refund proposal for the selected chain.
  4. Verify signatures against the exact proposal payload and signer policy.
  5. Finalize the settlement artifact.
  6. Verify broadcast evidence and record confirmations.

The library does not create keys, sign payloads, scan wallets, contact nodes, or broadcast transactions. Signing devices, wallets, chain readers, and independent verifiers remain external.

Safe reload

A stored record has a terms_hash consistency value, not an authenticated trust anchor. Keep the trusted hash outside the mutable store and verify it on every load.

from multisig_escrow import BitcoinEscrow

trusted_terms_hash = load_trusted_hash_from_signed_manifest(escrow_id)
escrow = BitcoinEscrow.load(
    escrow_id,
    store=store,
    clock=clock,
    trusted_terms_hash=trusted_terms_hash,
)

The same pattern applies to EvmEscrow and MoneroEscrow. Read Terms and Evidence before deploying.

Contributions

Contributions are very much appreciated. 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. This project is maintained by one developer.

For security reports, read Security before opening a public issue.

Security status

R24 remains Critical. Monero CLSAG, RingCT, multisig, parser behavior, wallet interoperability, and the native verifier boundary remain high risk. Monero is experimental and must remain testnet and value capped. Use with real funds only after completing the operator checklist and explicitly accepting R24.

Read Security and the Operator Checklist before deploying.

Package

  • PyPI: https://pypi.org/project/multisig/
  • Repository: https://github.com/klydz/multisig
  • License: MIT. See LICENSE.