<p>I am not familiar with the wallets generated by BitPay's Bitcore specifically, but there is no general issue preventing a wallet from generating addresses of various output formats. If BitPay's wallets can only either do one or the other that would be a local implementation quirk.</p>
<p>While it is possible to maintain separate wallets for each user, it is rather costly to do your accounting on-chain.</p>
<p>The more common mode of operations for services that take custody of user funds is to only maintain a single deposit wallet. You would then generate a new address on this &quot;omnibus wallet&quot; for each user deposit. Since the addresses are unique, you can use the address to tell which customer to credit in your internal accounting.</p>
<p>However, on the operational side, you can batch multiple withdrawals into a single transaction and even move part of the funds to a cold wallet to improve your security.</p>

CC BY-SA 4.0
2020-10-28T21:06:05.913Z
"If BitPay's wallets can only either do one or the other that would be a local implementation quirk." Yes, that was indeed the issue. Bitpay's Bitcore expects an address type as a parameter for creating new wallets. Then, it uses that value whenever you ask it to create a new address. So I just added another parameter for the createAddress flow, and there I pass the addressType. Now wallets created with this system can generate and use all types of addresses. Funnily enough, the system knows how to sign everything. I have no idea why they would tie one address type with the wallet.
Daniel Portugal
CC BY-SA 4.0
2020-10-29T03:54:34.967Z
Maybe they assumed that it's too confusing for users to have more than one type of address or something.
Murch
CC BY-SA 4.0
2020-10-28T17:11:49.697Z
2020-10-28T17:11:49.697Z
Murch
<p><strong>Is a Segwit wallet able to generate and use non-Segwit addresses?</strong></p>
<p>I'm using <a href="https://github.com/bitpay/bitcore" rel="nofollow noreferrer">Bitpay's Bitcore</a> to create wallets and generate new addresses for the users of my platform. I'm also using Bitcore-wallet-client to sign transactions.</p>
<p>My users have legacy wallets right now. I intend to migrate their wallets to native Segwit, but they will also need legacy addresses so that they can receive coins from anywhere. (right?)</p>
<p>Is it possible to have only one wallet per user, generating both types of addresses, or will I have to manage two wallets per user?</p>
<p>And if I have to manage two wallets per user, utxos from one wallet won't be available to the other, obviously. What's the best way to deal with their 'split balance'? Should I orient users to send all their coins to the bc1 address of the new Segwit wallet? But then, whenever they receive funds in their legacy addresses, they'd have to transfer again to the bc1 address in order to make Segwit transactions. It makes no sense - or does it? What am I missing?</p>

<wallet><address><segregated-witness><bech32-address>
Can a single wallet generate (and use) both SegWit and non-SegWit addresses?
Daniel Portugal
# Can a single wallet generate (and use) both SegWit and non-SegWit addresses?

(Asked by: username_0 on 2020-10-28)

**Is a Segwit wallet able to generate and use non-Segwit addresses?**

I'm using [Bitpay's Bitcore](https://github.com/bitpay/bitcore) to create wallets and generate new addresses for the users of my platform. I'm also using Bitcore-wallet-client to sign transactions.

My users have legacy wallets right now. I intend to migrate their wallets to native Segwit, but they will also need legacy addresses so that they can receive coins from anywhere. (right?)

Is it possible to have only one wallet per user, generating both types of addresses, or will I have to manage two wallets per user?

And if I have to manage two wallets per user, utxos from one wallet won't be available to the other, obviously. What's the best way to deal with their 'split balance'? Should I orient users to send all their coins to the bc1 address of the new Segwit wallet? But then, whenever they receive funds in their legacy addresses, they'd have to transfer again to the bc1 address in order to make Segwit transactions. It makes no sense - or does it? What am I missing?

**Tags:** wallet, address, segregated-witness, bech32-address


---

## 1 answers

### Answer by username_1 on 2020-10-28. Score: 2 | Accepted answer

I am not familiar with the wallets generated by BitPay's Bitcore specifically, but there is no general issue preventing a wallet from generating addresses of various output formats. If BitPay's wallets can only either do one or the other that would be a local implementation quirk.

While it is possible to maintain separate wallets for each user, it is rather costly to do your accounting on-chain.

The more common mode of operations for services that take custody of user funds is to only maintain a single deposit wallet. You would then generate a new address on this "omnibus wallet" for each user deposit. Since the addresses are unique, you can use the address to tell which customer to credit in your internal accounting.

However, on the operational side, you can batch multiple withdrawals into a single transaction and even move part of the funds to a cold wallet to improve your security.

> **Comments:**
> **username_0**: "If BitPay's wallets can only either do one or the other that would be a local implementation quirk." Yes, that was indeed the issue. Bitpay's Bitcore expects an address type as a parameter for creating new wallets. Then, it uses that value whenever you ask it to create a new address. So I just added another parameter for the createAddress flow, and there I pass the addressType. Now wallets created with this system can generate and use all types of addresses. Funnily enough, the system knows how to sign everything. I have no idea why they would tie one address type with the wallet.  
> **username_1**: Maybe they assumed that it's too confusing for users to have more than one type of address or something.  

---

