Verify before signing, and sign on an offline machine
The online machine has addresses only. The offline machine has the keys.
The online machine has addresses only. The offline machine has the keys.
Online:
recipes/recover.sh FILE - --goal balance > utxos.jsonl, thentx-build --chain btc --utxos utxos.jsonl --to DEST --sweep --fee-rate 5 > unsigned.json.Copy
unsigned.jsonto the offline machine (USB). Check it there:./blocktools run 'tx-verify --expect-to 1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3 --max-fee 10000 < /in/block170.hex'
(Here the check correctly fails: a raw transaction has no input amounts, so the fee is unknown. A PSBT from
tx-buildcarries them, so the check can pass.)Offline, a human signs:
./blocktools reveal 'seed-repair < /in/seed.txt | seed-to-master | derive --chain btc | tx-sign --tx /in/unsigned.json --expect-to DEST'with a typed code. Then copy the signed tx back.Online:
tx-decode --text < signed.json, thentx-broadcast --chain btc < signed.json(a second code).