0

As I understood it: My client creates a public key (for recieving) and a private key (for accessing) for each transaction.

And the private key is here that I can send the BTCs I recieved (for all transactions only handled by this same public and private key pair where this private key is the private key).

But what if I want to send a big amount of BTCs but I only have recievied many small amounts? Would I then have to mention each private key for each transaction that I can send this big amount?

3

Private keys are not for using previous transactions, they are for using previous transaction outputs. A single transaction may have many outputs, and many different people may hold the keys to those outputs.

When you send a transaction, you need to reference one or more unspent transaction outputs (UTXOs) to use as inputs of your new transaction. The sum total of these UTXOs must be greater than or equal to the amount you wish to send someone (minus network fees, of course). Any leftover can be specified back to you as "change" in the form of a second output on the transaction that is paid to an address you own.

But what if I want to send a big amount of BTCs but I only have recievied many small amounts? Would I then have to mention each private key for each transaction that I can send this big amount?

You would have to reference all the transaction outputs that you wish to use. This is simply how Bitcoin works. However, you don't "mention each private key", since you should never share your private keys with anyone. What you need to do is sign the transaction with the private keys, which is what lets the rest of the network know that you are allowed to use those UTXOs.

I know this all sounds complicated, but don't worry; your wallet handles all the complexities for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.