Hey everyone,
I need some help figuring out how to get my wallet's public key for a specific address. From what I gather, the scriptPubKey doesn’t show the public key for Taproot addresses anymore. Using bitcoin-cli commands like validateaddress and getaddressinfo doesn’t give me the pubKey either. The addresses I’m working with are just receive addresses and I haven't done any transactions yet, so I can't pull it from there. Right now, my only option seems to be dumping the private key, importing it into bitcoin-js, and then pulling the pubKey, but that feels kinda sketchy... any better ideas?
How to Find Public Key for Taproot Address
1 reply 73 views
You’re diving into Taproot, huh? Sounds like you’ve got a descriptor wallet.
How are you exporting the private key though? Just curious.
To get that public key, try using getaddressinfo. Look for the extended public key in "parent_desc" and check the derivation path for the internal/external chain index. The number after the slash tells you if it's a receiving (0) or change (1) address. Don’t forget to check the "address_index" in the descriptor too. Then, you can use bitcoin-js or a similar tool to derive the public key from the xpub.
Example command: getaddressinfo
Hope that helps!
Related topics
- Signing an Unsigned Base64 PSBT with Taproot Wallet 0
- Transaction Not Confirmed and Address Confusion 18
- Can I trace my wallet using my IP address? 8
- Finding.onion Address on Windows for Bitcoin Node 13
- HD Wallet vs Descriptor Wallet: What's the Deal? 3
- Do derivative traders move funds to wallets after closing positions? 19