<ol>
<li>Yes</li>
<li>Both. Each of the two keys is used to prove control over the corresponding UTXO of  the two UTXOs used as an input to the transaction</li>
</ol>

CC BY-SA 4.0
2019-11-12T17:51:09.867Z
2019-11-12T17:51:09.867Z
RedGrittyBrick
<p>I can create addresses with private keys and import those keys into my wallet to receive their unspent outputs to later spend.</p>

<p>My question is split into two parts:</p>

<ol>
<li>What exactly happens when you import a private key? Is that private key now stored and its corresponding address now tracked by your wallet?</li>
<li>A new transaction is signed with a private key. Therefore, if I have 1 BTC on one address and import its private key, and 1 BTC on another address and import that, how is it I can now spend 2 BTC in one transaction, which key was used to sign this new transaction?</li>
</ol>

<private-key><private-key-import>
What exactly happens when I import private keys to my wallet?
Anonona
# What exactly happens when I import private keys to my wallet?

(Asked by: username_0 on 2019-11-12)

I can create addresses with private keys and import those keys into my wallet to receive their unspent outputs to later spend.

My question is split into two parts:

1. What exactly happens when you import a private key? Is that private key now stored and its corresponding address now tracked by your wallet?
2. A new transaction is signed with a private key. Therefore, if I have 1 BTC on one address and import its private key, and 1 BTC on another address and import that, how is it I can now spend 2 BTC in one transaction, which key was used to sign this new transaction?

**Tags:** private-key, private-key-import


---

## 1 answers

### Answer by username_1 on 2019-11-12. Score: 1 | Accepted answer

1. Yes
2. Both. Each of the two keys is used to prove control over the corresponding UTXO of the two UTXOs used as an input to the transaction


---

