Sign a Bitcoin test payment with one key

Sign a payment on Bitcoin Core's local test network and compare the intended recipient, change and fee with what KeySigner shows before you approve.

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

Shared or checked
The KeySigner signing flow receives the test PSBT for review. Bitcoin Core checks the finalized transaction’s signatures and outputs against regtest rules.
Check separately
Regtest acceptance says nothing about another network’s inputs or current fees. Keep this test’s outputs and keys local.
  1. 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.

  2. 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.

  3. 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.

  4. 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.

How to verify your setup

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.

Report a problem with this guide

Explore all setup guides →