merland / seedpicker

Create your own BIP39 seed phrase, securely and transparently.
http://seedpicker.net
MIT License
44 stars 20 forks source link

Testnet displays xpub instead of tpub #44

Closed mflaxman closed 2 years ago

mflaxman commented 3 years ago

abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon

Screen Shot 2021-06-06 at 4 48 27 PM

I'd expect tpubDFkN51vYF36W4Yfn3wGv5fpmRo3ok7vZZjc1gmRJjumq33L776e6GkP4HGdCVjDqYiBahXCrXQKja8aUZ2xovQNS8WkF46MdY7TLHJLYD7H to be displayed (or at least a way to see that somewhere on the screen without using this tool.

merland commented 3 years ago

Thanks for this suggestion @mflaxman! Could you elaborate a little more on the use case? I have limited experience with testnet. Would it make most sense to display it inside the "Specter box" or under Show More?

mflaxman commented 3 years ago

It's really for advanced-user debug, as end-users don't even know what SLIP132 is. But, if SLIP132 is later deprecated (very possible), then it would become essential.

As a basic idea, without SLIP132 you just have xpub for mainnet and tpub for testnet. SLIP132 introduced version bytes that give you signature type (p2wsh) and network (we already had that). Since output descriptors also give you signature type (wsh(sortedmulti(... is p2wsh there may be no purpose in slip132 going forward as it does cause confusion.

But regardless of what happens with SLIP132, for testnet xpubs are supposed to be encoded as tpubs.

I assume the "Specter box" means the "Show QR" lightbox? For now, I think it makes sense to just replace the xpub in "Show more" with the corresponding tpub, as that's most correct. I didn't notice this earlier because that advanced section isn't actively used. It's mostly useful if you have a coldcard (doesn't speak slip132) on testnet, as that's the only way to get matching value.

Does that make sense?

merland commented 3 years ago

Thanks for the clarification, seems like a no-brainer. If someone needs the xpub for the testnet case, that can be added upon request.

I'm not sure when I can do this but hopefully soon.

I assume the "Specter box" means the "Show QR" lightbox?

Yeah sorry, I was referring to the text "This box contains everything you need to export your extended public key to Specter Desktop."

merland commented 2 years ago

@mflaxman Sorry for the delay, but this should work now. I changed the label to

Extended Public Key in base format (xpub for mainnet and tpub for testnet)

What are your thoughts on the term "base format"? I find it hard to find the perfect term to use since "xpub" can have different meanings...

mflaxman commented 2 years ago

I like base format, although I agree it seems imperfect. I don't have a better term. I think better to add the functionality for now and you can always change the copy later!