Author

Topic: How to send unspent outputs to another address in Electrum? (Read 275 times)

legendary
Activity: 3710
Merit: 1586
using the bech32 wallet you can sweep the two orphaned private keys (legacy and p2sh-segwit)  thereby sending the coins to an address in the bech32 wallet. make sure you append p2wpkh-p2sh: to the private key for the p2sh segwit address (3 address).
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
Sorry I should have been more clear, I'm not trying to make a single transaction from two addresses at once, I'm trying to redirect the UTXO of one of the addresses to my bech32 address, and then repeat the same process for my other address.

But anyway, I was wondering if I purchase something using my legacy address, how to redirect the UTXO from that address to my bech32 address/wallet. Same with my p2sh-segwit address.

It seems that you are talking about auto forwarder or redirect the unspent bitcoin from one of your addresses to your another bitcoin address.
Am I correct?

If I'm correct I think you will need a script to automate send the unspent bitcoin to your other wallet.

Take a look at this one Linux based below.
- https://bitcointalksearch.org/topic/m.3361837

This might be what you looking for.
legendary
Activity: 2268
Merit: 18771
But anyway, I was wondering if I purchase something using my legacy address, how to redirect the UTXO from that address to my bech32 address/wallet. Same with my p2sh-segwit address.
You got the correct answer on the first reply by OmegaStarScream. The only way to redirect your change to a different wallet is to use the "Pay to many" feature.

In your legacy wallet, open the "Send" tab, and then click on Tools -> Pay to many
In the "Pay to" box, enter the address you want to pay, followed by a comma and a space, and then the amount you want to pay
In a new line, enter the address of your Bech32 wallet you want to the change to be sent to, followed by a comma, a space, and then an exclamation mark (!) - the exclamantion mark means "send all remaining funds"
Adjust the fee as you like and hit send

Your "Pay to" box should look something like this:
Code:
1addressforpurchase, 0.1
bc1yourbech32address, !
legendary
Activity: 2380
Merit: 5213
Starting with “3” is a P2SH Nested Segwit addresses.

You can read more details here > Legacy vs Segwit wallets. Whats the difference? / Difference between SegWit addresses.
No
Addresses starting with 3 are P2SH, but they are not always segwit.
Look at the bold part of achow101 post which you suggested to read.

So ive always had my bitcoin in my hardware wallet. Now there are 2 options: Legacy and Segwit. Whats the actual difference ?
Legacy means that you will be using addresses of the form 1... Segwit means that you will be using addresses of the form 3... or bc1... (one is for P2SH nested segwit and the other is for native segwit). Note that 3... addresses are for P2SH addresses in general and are not just for segwit. bc1... addresses are for segwit specifically but not all wallets support it yet.

And following post made by o_e_l_e_o

Addresses which begin with 3 may or may not be SegWit, and may or may not be multi-sig. It all depends on how you set it up. Electrum does not create SegWit addresses beginning with 3 though - it will only let you import them. So if you created your 3 addresses in Electrum, which it very much sounds like you did, then it will be multi-sig legacy rather than SegWit or multi-sig SegWit.



But anyway, I was wondering if I purchase something using my legacy address, how to redirect the UTXO from that address to my bech32 address/wallet. Same with my p2sh-segwit address.
When you send your bitcoins, Electrum automatically send the remaining balance to your change address. As your change address is not a bc1 address, the best thing you can do is to enable "Pay to many" and send the remaining to your bc1 address manually, so there is no remaining bitcoin.

Assume that you are going to send 0.01 BTC to an address while your balance is 0.02 BTC
Send 0.01 to that address and send 0.01 minus transaction fee to your bc1 address. (A better solution for sending the remaining balance suggested by o_e_l_e_o in the next post)
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
OP needs us to enlighten more about his request.

Sorry I should have been more clear, I'm not trying to make a single transaction from two addresses at once, I'm trying to redirect the UTXO of one of the addresses to my bech32 address, and then repeat the same process for my other address.

Are you sure the address starting with 3 is a segwit address?
If you have created that address using Electrum, that's not segwit. That's a legacy address.

I managed to create a segwit wallet by importing a random bip39 seed phrase, and then from the import screen select p2sh-segwit from the "Script type and Derivation path" screen.

But anyway, I was wondering if I purchase something using my legacy address, how to redirect the UTXO from that address to my bech32 address/wallet. Same with my p2sh-segwit address.
legendary
Activity: 2744
Merit: 3097
Top Crypto Casino
As OmegaStarScream suggested, from Electrum, select pay to many, send the payment amount to the merchant's address and the rest to your bech32 address.

A change address is nothing else but a transaction output that your wallet generates and you can set it manually.

asu
legendary
Activity: 1302
Merit: 1136
OP needs us to enlighten more about his request.

Edit: Are you sure the address starting with 3 is a segwit address?
If you have created that address using Electrum, that's not segwit. That's a legacy address.

Starting with “3” is a P2SH Nested Segwit addresses.

You can read more details here > Legacy vs Segwit wallets. Whats the difference? / Difference between SegWit addresses.
legendary
Activity: 2380
Merit: 5213
From my understanding your question is how to import both of legacy segwit address (address starting with 1) and nested segwit address (address starting with 3) in a single wallet and then send the funds to two other addresses.

Create a new wallet in Electrum.
Select "Import addresses or private keys"

Enter private keys of both of your addresses.
Just note that you must add p2wpkh-p2sh: before private key of your segwit address.

Code:
Private key of your legacy address
p2wpkh-p2sh:private key of your segwit address


Then you will have both of your addresses in a single wallet.
In order to be able to send bitcoin to multiple addresses, as OmegaStarScream said, select "tools" at top of the window then click on "Pay to many".

Edit:
Are you sure the address starting with 3 is a segwit address?
If you have created that address using Electrum, that's not segwit. That's a legacy address.
copper member
Activity: 1652
Merit: 1325
I'm sometimes known as "miniadmin"
Not sure this can be done; but you could try to import the private key of the legacy address into the segwit one, and create a single transaction that will take both imputs?
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
Wouldn't it be easier just to make two transactions to the address you want? One from each wallet.

There is also a tab called Coins. It is usually hidden. Click View > Show Coins.

There you can select exactly the output you want to spend, but it has to be in the same wallet.
staff
Activity: 3500
Merit: 6152
If I understood your request, you can simply use the "Pay to many" feature (Tools menu) and send funds to both the seller + your bech32 address at once.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
I have a small amount of bitcoin, 0.0008BTC in a legacy "1" electrum wallet, a larger amount 0.0079BTC in another, segwit "3" electrum wallet, and now I want to send these to my bech32 electrum wallet address. I can always just transfer then directly with a 1 sat/byte transaction fee but if I am going to buy something anyway, how do I tell electrum to direct the unspent transaction outputs to my bech32 address (which is in another wallet)?
Jump to: