
I am not sure on the terminology I should use to correctly ask my questions so don't read it too literally. This topic is about Ledger and Trezor hardware wallets.
I want to understand better how a hardware wallet works compared to a wallet like sparrow or electrum for example.
In sparrow and electrum wallet, the server will know all your public addresses that are inside your wallet.
Is it the same way with a hardware wallet? When I connect the hw wallet to a third party wallet, will the server know all the addresses that are inside my hw wallet?
If you are running your own node, everything you do will be limited to your own node or server, but if you are using an external server/node, there is a high chance they are going to see everything from your wallet addresses. Your wallet needs to be synced to date before you can see the total balance of Bitcoin left on your wallet's addresses. If you don't want any person to see everything, you have to run your own for your privacy, or alternatively, you can choose to connect your hardware with the server (external) with a single private key load on your hardware, only if you want to risk that particular wallet address been watch.
What I think is confusing is that hw wallets can have more than just bitcoin. They can have other coins like eth and sol and many more. That means a server shouldn't be able to get all the addresses on the hw wallet.
I am guessing it might be that the third party wallet will automatically get all the hw wallet addresses for every blockchain, then it's up to the third party wallet how it has been built. The third party wallet could and it seems to be the standard, query all addresses at the same time. All Bitcoin addresses get sent to a bitcoin server, all eth addresses get sent to a eth node, etc, everything done at the same time.
But in theory there could be third party wallet that give you a choice to not query all addresses at the same time.
Using a hardware wallet, you need a node/server to broadcast your transaction. The best way you can do is to run your own node or rely on/trust another node. Most often the SPV servers, but most hardware companies (Ledger, for example) have their own nodes which you can connect via USB or Bluetooth, and some of their servers don't run only Bitcoin nodes, their other servers support Ethereum, Solana, BNB and many more chains they support. If you are using their applications, your transactions will quickly get broadcasted, but then you are relying on their servers and can see everything about your transactions and wallet addresses.
I have also read 2 things that seem contradicting. There is a popular scam where they sell used hw wallets after they have copied the seed phrase so they can recover it later when the new owner puts money into it. That's why they officially warn to never buy second hand hw wallets. But I've also read you can create new seed phrase and private keys. You can have several wallets inside the he wallet and switch between them so third party wallets will not know about the other wallets you have on the hw wallet. If that's possible then the scam threat isn't that serious if you just create a new seed phrase?
Using a passphrase might be helpful in this situation, it helps you generate different wallet addresses even with the same seed phrase, but the best option is if you are buying a hardware wallet, don't buy from a secondary seller, buy directly and get it shipped to your house address. That's the best way to avoid any loopholes regarding this. Creating multiple seed phrases just to avoid these kinds of situations is not helpful; scammers are smart asses every day.
A friend asked me if she can just create a new address in her hw wallet, will it be secret address? Or is it likely coinanalys or some bitcoin server would be able to link that new address to all the other ones inside the hw wallet?
Like I said before, using a public server/node puts you at risk of being watched by coin analysts. You can create hundreds of seed phrases and connect your wallet to a public node; they will know about your transaction and IP address, but with your own node, you can anonymise everything about your wallet addresses. Even if you connect your node to another node, you can use Tor to route your IP address.