The included scripts are sufficient to author and sign transactions independent of the Unchained Capital platform.
Scripts are included to sign with the Trezor One and Ledger Nano S hardware wallets. Other wallets have not been tested and probably will not work.
- Python 3
- Pipenv
- Trezor One
Whenever you are executing a python script, make sure you are in the
virtual environment provided by pipenv shell
To install dependencies for both Trezor and Ledger Signing:
make dev-dependencies
- Unplug all hardware wallets.
- If not already there, enter the virtual environment with
pipenv shell
make python-test
- Plug in a Trezor initialized with these wallet words:
merge alley lucky axis penalty manage latin gasp virus captain wheel deal
chase fragile chapter boss zero dirt stadium tooth physical valve kid plunge
- If not already there, enter the virtual environment with
pipenv shell
make python-test-integration
Be prepared to press confirm
many times on your device.
To run the unit and integration tests together, unplug you hardware wallet and run
make python-test-full
This will display complete coverage information.
- Unplug all hardware wallets.
make js-test
- Plug in a Ledger with the following wallet words (same as above) and open the Bitcoin Ledger app.
merge alley lucky axis penalty manage latin gasp virus captain wheel deal
chase fragile chapter boss zero dirt stadium tooth physical valve kid plunge
make js-test-integration
Examples of the full set of command line scripts are available in examples/run_all_trezor.sh and examples/run_all_ledger.sh.
If you are starting from a funded multisig vault and corresponding information, examples are provided in examples/spend_only_trezor.sh and examples/spend_only_ledger.sh. Both signers need identical input and output files, so either confirm they are the same, or have one signer pass their files to the other signer.
The steps are the same for both Trezor and Ledger:
- Modify the template at either templates/template_trezor.sh or templates/template_ledger.sh
- Enter the BIP32 For the key you control
- Enter the amount you are sending (in BTC) to the output address
- Enter the Output address
- Enter the Change address (the remaining balance less fees will be sent here)
- Enter files names a. If you have the signature file for the other signer, make sure the filename matches the location and name of that file
- Enter your Redeem Script
- Enter your Multisig Address (the one you are spending from)
- Remove the
--testnet
flag if you are constructing a mainnet transaction - Plug in and unlock your hardware wallet
- Execute the script, and confirm the information presented on the wallet
- The raw transaction will be printed to the terminal