Can a single wallet generate (and use) both SegWit and non-SegWit addresses? Is a Segwit wallet able to generate and use non-Segwit addresses?
I'm using Bitpay's 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?
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 &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.
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.