Question about Sparrow Wallet:

I want to add an existing hardware wallet. Do i use „New Wallet“ or „Import Wallet“ on the start screen?

What is the difference?

#asknostr

#ask nostr:npub1hea99yd4xt5tjx8jmjvpfz2g5v7nurdqw7ydwst0ww6vw520prnq6fg9v2

Reply to this note

Please Login to reply.

Discussion

Use import wallet for your existing HW.

New wallet will generate a new seed.

No it won’t… it lets me choose like nostr:npub1v9qy0ry6uyh36z65pe790qrxfye84ydsgzc877armmwr2l9tpkjsdx9q3h says

Right. When you create a New Wallet in Sparrow, it doesn’t initially know anything about what keystores you intend to use to generate addresses and sign transactions.

If you intend to make a new seed, I believe Sparrow calls this a Software keystore. It can generate 12 or 24 word BIP-39 seed phrases for you, and will require you to record them and reenter them.

It’s possible, for example, to make a 2-of-2 where one keystore is your hardware wallet, and the other keystore is a Software keystore. This is kinda like a poor-man’s multivendor multisig. It would require both Sparrow and your hardware device to leak seed material for someone to compromise your coins.

New Wallet. Then, in the new wallet settings, add your hardware wallet as a Keystore.

I see that option but what is the import wallet good for? 🤔

Import wallet is if you already have a wallet in a different format and want to make it into a full Sparrow wallet.

For example, you could make a 2-of-3 using entirely offline ColdCards. Then, on one of them, export the wallet to a microSD card. That text file basically contains only the XPUBs and master key fingerprints.

You can then import that file to Sparrow, which will set up its own internal storage for UTXO labels etc.

Importing a previously created sparrow wallet

I’d say Import wallet. A new wallet will probably help you set up a, you guessed it, new wallet and generate a new seedphrase aswell.

But I could be wrong

What nostr:npub1v9qy0ry6uyh36z65pe790qrxfye84ydsgzc877armmwr2l9tpkjsdx9q3h says is also true. A little confusing. Maybe new wallet is for both generating a new hot wallet or adding an existing but „new to sparrow“ wallet. And import wallet is only for adding an existing wallet?

Maybe nostr:npub1hea99yd4xt5tjx8jmjvpfz2g5v7nurdqw7ydwst0ww6vw520prnq6fg9v2 can specify? Unfortunately i can’t find the difference in the documentation either

Sparrow calls hardware wallets “keystores”. So if you import a hardware wallet, what Sparrow will actually do is create a new, single-sig wallet with that hardware device as its only keystore.

Either path will yield the same outcome, which you can validate by doing both and comparing the generated addresses.

That‘s a good explanation, thanks. I was afraid that one of these options might import the seed from my hardware wallet into sparrow and thus making my hardwarewallet into a hotwallet

No, absolutely not. Your hardware device’s one job is to protect the seed material while the device is in use. Leaking that seed to your computer would be a fundamental failure of its intended purpose.

What your wallet can report however is its XPUB and master key fingerprint (XFP) from which Sparrow can derive addresses and prepare transactions for signing.

Thank you 🙏💜🫂

It’s a little misleading to non experts like me that two different options let you do the same thing. Maybe a short explanation or example below the options could help.

Yeah, that’s a good idea.

As a general rule of thumb, you pretty much always want to use New Wallet. That’s what I always do.

It’s fairly low effort to create new wallets, so I encourage you to try out different settings and observe how the generated addresses change.

Great advice!

So sparrow understands wallet not really as a whole wallet but rather as a window looking into a wallet. And thus i can create multiple windows looking into the same wallet via different options. Does that come close?

Tried to zap you, but can’t do it unfortunately 😔

No worries, I heard my node is having some kind of issue. Just haven’t looked into it yet.

Yes. To be precise, #Bitcoin does not have an “account” model. It has a transaction model. Transactions involve previously unspent outputs (UTXOs) and yield new outputs. Outputs are locked using scripts, the hashes of which we call “addresses”.

So then what is a wallet? A wallet is, essentially, information that allows the user to:

1. Generate addresses.

2. Create transactions involving those addresses.

3. Determine whether a transaction involves its addresses.

The wallet is the closest thing you have to an “account” in Bitcoin. To discover incoming payments, your wallet needs to connect to a node, which has visibility into all transactions. (The exact mechanism for how the wallet talks to the node can vary).

Strictly speaking the wallet doesn’t need any secret information. It works on what are called “public” data, such as your XPUB, which can be used to generate addresses. You don’t necessarily want to leak this data for privacy reasons, but an entity that gets a hold of it cannot spend your coins.

A keystore, in Sparrow parlance, is something that stores the secret information—the “keys” or seed material. While your wallet needs to at least occasionally connect to a node to discover transactions or broadcast new ones, a keystore has no such need. Its job is solely to secure the seed material while in use.

(Aside: Super strictly speaking, Sparrow allows keystores which contain only public info, such as an XPUB to create watch-only wallets. But the core idea here is that keystores hold secrets and wallets interface with the world.)

So when you create a wallet in Sparrow, it sets up a file with info about the keystores in use. This file has a name and lives on your hard drive. You can create a password to encrypt the file, which protects against malicious code on your computer reading its contents.

If you create two wallet files with different names, but all the same parameters (keystores, etc.) those two wallets will generate the same sequences of addresses and have the same signing capabilities. It’s the same as if you made two text files and pasted the same information into both. The two text files are different files but contain the same information. Same with making duplicate wallets.

In fact, it’s a good practice to make a duplicate right away as practice. Making a duplicate wallet is the same as your recovery procedure. That is, your recovery procedure consists of making a “new” wallet that yields the same addresses to receive and sign.

Thanks for the detailed explanation. I am very interested in this.

So is it also possible to grab that wallet file created by sparrow and copy it into the same directory on another computer? Or do i need to use the Export option for that?

Either should work. You can copy the file directly from ~/.sparrow, IIRC, or export in Sparrow format.

Will try that. Is there any risk involved in moving files around that cointain xpub data? Obviously not going to upload it to the cloud but it will live on multiple devices

Leaking your XPUB is a privacy risk. Whoever gets that knows every address that belongs to your wallet: past, present and future. They don’t necessarily know those addresses belong to *you* personally, but they know the addresses go together.

The most likely way you’ll leak your XPUBs is by connecting to an Electrum server, or a vendor’s wallet that collects this data.

When you start up Sparrow, it’ll ask how you want to connect to your node. Options include Bitcoin Core, private Electrum server, and public Electrum server. For maximum privacy and speed, it’s best to run your own Electrum server. I’ve used ElectrumX and Fulcrum. I’ve heard good things about electrs but I haven’t tried it.

If your wallet has previously been connected to some other service, like, say, your hardware vendor’s app, then your XPUB has in all likelihood already been leaked. The only way to keep this private is to set up your own wallet from scratch and ensure that your wallet software (Sparrow) only connects to a private Electrum server (preferred self-hosted).

Awesome infos. You helped a ton 🙏💪

Planning to spin um my own node soon (hardware is on the way). But i didn’t know that i have to set up a completely new seed then

Well, you don’t *have to* set up a new seed. Only if you’re concerned about privacy.

I’m pretty extreme on the seed security front. Personally, I advocate rolling one’s own seeds offline. That way you know for sure the entropy couldn’t have been known by anyone else. But like I said, this is an extreme position. If you use a passphrase with your hardware-wallet-generated seed you’re probably fine.

I’m also an advocate of multivendor multisig for similar reasons. But here again it increases the complexity of the setup.

Wow! Ton of information here indeed!

I mean. Using the XPUB to generate a watch-only wallet (for instance on Blockstream green) comes in handy I think. But indeed… it “leaks” all your addresses to some software you don’t own. However, that software being open source is “safer”?

If you don’t control the Electrum server you connect to, you can’t know what logging or monitoring they’re using.

For example, they could be running a free and open source Electrum server implementation like Fulcrum, but put it behind a reverse proxy that logs all traffic.

The software running on your wallet and/or hardware signing device can’t protect you against a logging third-party server.

So if you’re running your own node and connect your wallet to electrs, you should be good to go then. Only problem is, I can’t run my node at the moment 😅

Thanks again for your huge help 🙏

I thought through this and have another question:

When i set up a completely fresh keysore because i am afraid my xpub was leaked and then send the funds to the new keystore, aren’t they still trackable by the entity that knows the previous xpub? can‘t they just link the transaction to the new adress? 🤔

Most likely yes… I mean, with logical thinking people could assume that you’re sending it to a new wallet you still own

From the public blockchain perspective, the viewer knows that the coins got sent to a new address, but not that that address belongs to the same entity as the sender. They may infer this, but they can’t know it for sure.

Also, while the viewer knows all the addresses from the previous wallet, at most they can infer one address of the new wallet. Every transaction after that is a mystery. So IMO, you’re better off, even if all you do is shift to a new wallet with a keystore you rolled yourself.

There are other things you can do to mildly improve privacy on chain, such as avoiding exact values in either fiat or Bitcoin terms. Avoiding payments of, say $100 exactly or 0.001 BTC etc.

On-chain privacy is its own field of study. People who are serious about it use CoinJoins to obfuscate UTXO history. Sparrow implemented support for Whirlpool, the backend to Samurai’s CoinJoin implementation, but I haven’t tried it.

Personally, I would say that rolling your own seeds and connecting to your own node is more important.

I see. Thanks for the good explanation 🙏🫂💜

I heard about coinjoins but i haven’t tried it yet because i also heard of people having trouble sending their btc to exchanges after a coinjoin. Not that i plan to cash out, i know what i have, but maybe someday i want to exchange a bigger amount to buy a house.

Thanks for sharing the explanation. I'll look into Sparrow.

Sparrow is my favorite desktop wallet by a pretty large margin. Its philosophy is to show you what’s going on, in as user-friendly a way as possible. It’s not going to hide things from you if it can help it.

I recommend “New Wallet” because it will make explicit what your keystore is and how it relates to the wallet proper.

Don’t be afraid of trying different options. As long as each produces the same sequence of addresses, then the wallets are identical and behave the same.

I believe both options will work

three different answers 🤔

😅 more confused than before 😅

I think if it gives you option to enter the 12/24 seed phrase, then that is the one you want.

Oh no no no. It’s not about importing the seed. I just want to connect my hardware wallet to sparrow

Gotcha.

"If you're ever tying in your seed phrase, something has gone very very wrong"

I did it some time ago and can't remember what I did 😂.

I also did it a few years ago once and the setup screen has changed since than. I can’t remember having any questions setting it up back than. Must have been clearer

Perfect, thanks 🙏