Author

Topic: Use 1 private key to import to 3 address types in 1 wallet, can I send it all (Read 172 times)

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Judging by your other thread, it seems that you're trying to give a solution to an XY problem. What are you trying to accomplish? I can't think of one reason you'd need to import the same public key thrice with different address types each time, and then spend these three outputs.
copper member
Activity: 821
Merit: 1992
Quote
can I choose what address among three addresses will store the left over 0.05 Bitcoin?
Yes, you can. But you should make a new address, because address reuse is harmful for your privacy.

Quote
Can I choose a change address I want (just like how I choose a receiving address) for it?
Yes, you can have no change address, one change address, or multiple change addresses. There is nothing like "change" in the protocol, you have just some inputs, and some outputs, inside each transaction, some coins go in, and some coins go out. And transaction creators can control every single input and output.

Quote
Can I choose to receive the 0.05 Bitcoin in the Legacy / Nested Segwit / Native Segwit address?
Yes, you can mix all address types with each other. As long as your public keys are compressed, all of that is standard.

Quote
If I import three addresses from 1 private key and store it in 1 wallet file, that wallet can not create changed addresses for me ?
If you have a private key, you can get a public key out of it. If you have a public key, you can wrap it in every possible address type. The whole concept of "change" is only purely theoretical, because it is all about outputs, no matter how they are generated, and how many of them you have, it is up to transaction creators to choose all inputs and outputs.
sr. member
Activity: 602
Merit: 387
Rollbit is for you. Take $RLB token!
You can only spend the UTXOs that are inside your addresses, you can't chop it up and spend a third of the balance from each address. Because the UTXO (unspent transaction output) is associated with public keys, that means all address formats of that public key share the same UTXOs. So a UTXO can only be spent from exactly one of those addresses. It doesn't matter which, becuase the scripts only check the public key.
I don't have to spend all coin in three addresses (three UTXOs) in one transaction.

If I have 0.1 Bitcoin in each address and 0.3 Bitcoin total. I want to sent you 0.25 Bitcoin, can I choose what address among three addresses will store the left over 0.05 Bitcoin?

Can I choose a change address I want (just like how I choose a receiving address) for it?
Can I choose to receive the 0.05 Bitcoin in the Legacy / Nested Segwit / Native Segwit address?

I understand like changed addresses are created when I create or import a wallet from a seed or master private key. If I import three addresses from 1 private key and store it in 1 wallet file, that wallet can not create changed addresses for me ?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
You can only spend the UTXOs that are inside your addresses, you can't chop it up and spend a third of the balance from each address. Because the UTXO (unspent transaction output) is associated with public keys, that means all address formats of that public key share the same UTXOs. So a UTXO can only be spent from exactly one of those addresses. It doesn't matter which, becuase the scripts only check the public key.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Yes, except Taproot.
It needs a 'Descriptor' in Bitcoin Core and Electrum doesn't support creating/importing Taproot yet.

In Bitcoin Core, it naturally do that in a non-descriptor wallet, it will derive all three address types when you import a PrvKey.

In Electrum, you can import the same PrvKey with three different script type prefix (testnet):

And spend from the three together:
sr. member
Activity: 602
Merit: 387
Rollbit is for you. Take $RLB token!
If I have one private key, use it to import and get 3 address types.

I get Bitcoin in three addresses, Legacy, Nested Segwit, Native Segwit and maybe Taproot.

Can I make a transaction with three or four addresses in a same wallet?

Is a wallet software allowed it?
Jump to: