Consider an offline computer that has a list of private keys for bitcoin addresses. The computer has some flavor of Linux installed on it, so it can run common CLI tools and Python scripts.
I would like to create a transaction from one of these private keys into a given bitcoin address, sign it, and securely transfer it to an online computer, possibly using a QR code and a phone QR reader that can publish the signed transaction.
What Have I Tried
- Searching the site, but I only found old answers
- STFW, giving me non-CLI tools or obsolete answers
- Playing with bitcoin-cli
sendtoaddress, but it does not seem to support any given private key, just its own wallet.
How can I securely create a signed transaction with a private key, a destination address, and an amount, from an offline computer using CLI tools?