25f781bef3
For some applications, such as block explorers, it's useful to be able to obtain the public key used in case of P2PK. This is considered general enough for addition into bitcoin library, so this change adds it. The public key is returned only when it's valid and the script is P2PK. To avoid duplicating the logic checking whether a script is P2PK the logic is moved to a new p2pk_pubkey_bytes() method which returns raw bytes and is then called from both is_p2pk() and p2pk_public_key() |
||
---|---|---|
.. | ||
contrib | ||
embedded | ||
examples | ||
fuzz | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml |