An encapsulated public key.
Synopsis
Declared in <pubkey.h>
class CPubKey;
Member Functions
Name |
Description |
|
Constructors |
Turn this public key into an uncompressed public key. |
|
Derive BIP32 child pubkey. |
|
Get the 256‐bit hash of this public key. |
|
Get the KeyID of this public key (hash of its serialization) |
|
Check whether this is a compressed public key. |
|
fully validate whether this is a valid public key (more expensive than IsValid()) |
|
Check syntactic correctness. |
|
Check if a public key is a syntactically valid compressed or uncompressed key. |
|
Recover a public key from a compact signature. |
|
Implement serialization, as if this was a byte vector. |
|
Initialize a public key using begin/end iterators to byte data. |
|
Deserialize the public key from a stream, as if it were a byte vector. |
|
Verify a DER signature (~72 bytes). If this public key is not fully valid, the return value will be false. |
|
Iterator to the first byte of the serialized public key. |
|
Pointer to the first byte of the serialized public key. |
|
Iterator past the last byte of the serialized public key. |
|
Access the byte at the given position. |
|
Number of bytes in the serialized public key. |
Static Member Functions
Static Data Members
Name |
Description |
Size in bytes of a compact (recoverable) ECDSA signature. |
|
Size in bytes of a compressed public key. |
|
Maximum size in bytes of a DER‐encoded ECDSA signature. |
|
secp256k1: |
Friends
Name |
Description |
Order two public keys lexicographically by their serialized bytes. |
|
Order two public keys lexicographically by their serialized bytes. |
|
Comparator implementation. |
Non-Member Functions
Name |
Description |
Construct the BIP 328 synthetic xpub for a pubkey |
|
Generate a P2PK script for the given pubkey. |
|
Parse a hex‐encoded public key, throwing an RPC error if it is invalid. |
|
Compute the full aggregate pubkey from the given participant pubkeys in their current order. Outputs the secp256k1_musig_keyagg_cache and validates that the computed aggregate pubkey matches an expected aggregate pubkey. This is necessary for most MuSig2 operations. |
|
Compute the full aggregate pubkey from the given participant pubkeys in their current order. |
|
Computes an arbitrary unique session ID to identify ongoing signing sessions. It is the SHA256 of the signing (aggregate) pubkey, the participant pubkey, the sighash, and the pubnonce |
Created with MrDocs