Blockstream / Blockstream/esplora
electrum: Allow for search of P2PK with only P2PKH address
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 514
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
This has a slightly different nuance from #15 so I believe it is not a duplicate.
**How it differs**: #15 is _"User has a P2PK script or pubkey, they want UTXOs"_ but this issue is _"User has a P2PKH address, they want UTXOs for the associated P2PK to also be returned when transactions/utxos are queried, and the transactions/utxos should be able to be differentiated."_
Use case: Historically P2PK outputs have been indexed by their P2PKH address. This is especially important when notable pubkeys sign messages (which in Bitcoin Core is only possible using P2PKH addresses as the "pubkey" in verification) (See this thread for example: https://twitter.com/BitcoinComfy/status/1602786862749335553)
----
Possible solution
Create a separate index of P2PK->P2PKH converted script hashes which can be queried optionally when the application detects a P2PKH query. (This requires double querying, and might make ordering difficult)
Then, for instance, the block explorer client side code (Esplora/Mempool etc.) could just add a new GUI element on P2PKH address pages that says "P2PK transactions" with a clickable dropdown, and it links to any P2PK transactions.
Then any transaction page that shows a P2PK script in an output could also add a clickable (or mouse hover tooltip) button that reveals a link to the P2PKH address page.
Thoughts?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.