Before you start
Computer tools, KeySigner on iPhone and Bitcoin Core regtest
- Pair the computer tools with KeySigner. Use a funded single-key native SegWit address and a transaction file that includes the amounts of the coins it spends. Rehearse on Bitcoin Core regtest.
Data and access
Find and fund the test address
Pair the KeySigner computer tools with your device and create a disposable Bitcoin key. Run keysigner-btc accounts --network regtest. Fund the displayed test address with coins from your local Bitcoin Core regtest node.
Check. The local node reports the funding output for the regtest address listed by KeySigner.
Prepare the transaction file
Import the test address into a watch-only wallet on your regtest node. Use that wallet to create a partially signed Bitcoin transaction (PSBT). Save it as payment.psbt. Make sure the file includes the unspent output and amount for each input.
Check. Decode payment.psbt on the local node and check the input amounts and the intended recipient and change outputs.
Compare the payment on your phone
Run keysigner-btc sign-psbt --network regtest --finalize payment.psbt. On your phone, compare the recipient, amount, fee and any change output with the payment you prepared. Approve if they match.
Check. After approval, the terminal prints a finalized transaction. Decode it locally and compare the outputs and fee with the phone review.
Check the signed transaction
Run Bitcoin Core's testmempoolaccept on your regtest node with the raw transaction from KeySigner. Check that the node accepts the transaction for its mempool before broadcasting it on regtest.
Check. The regtest node reports allowed: true for the signed transaction.
Check your result
The signature is accepted on regtest, and the signed transaction contains the same outputs and fee approved on your phone. Keep the test transaction on the local network.
If you get stuck
KeySigner says an input is missing its amount
Check that the PSBT contains information for every coin it spends. Use your funded watch-only wallet or Bitcoin Core's utxoupdatepsbt with the corresponding output descriptor, then inspect the new file before asking for another approval.