Module key
Expand description
Bitcoin keys.
This module provides keys used in Bitcoin that can be roundtrip (de)serialized.
Structs§
- Compressed
Public Key - An always-compressed Bitcoin ECDSA public key
- Invalid
Address Version Error - Invalid address version in decoded base58 data.
- Invalid
Base58 Payload Length Error - Decoded base58 data was an invalid length.
- Keypair
- Opaque data structure that holds a keypair consisting of a secret and a public key.
- Private
Key - A Bitcoin ECDSA private key
- Pubkey
Hash - A hash of a public key.
- Public
Key - A Bitcoin ECDSA public key
- Secp256k1
- The secp256k1 engine, used to execute all signature operations.
- SortKey
- An opaque return type for PublicKey::to_sort_key
- Tweaked
Keypair - Tweaked BIP-340 key pair
- Tweaked
Public Key - Tweaked BIP-340 X-coord-only public key
- Uncompressed
Public KeyError - Segwit public keys must always be compressed.
- WPubkey
Hash - SegWit version of a public key hash.
- XOnly
Public Key - An x-only public key, used for verification of Taproot signatures and serialized according to BIP-340.
Enums§
- From
Slice Error - Error returned while generating key from slice.
- From
WifError - Error generated from WIF key format.
- Parity
- Represents the parity passed between FFI function calls.
- Parse
Compressed Public KeyError - Error returned when parsing a
CompressedPublicKey
from a string. - Parse
Public KeyError - Error returned while constructing public key from string.
Traits§
- TapTweak
- A trait for tweaking BIP340 key types (x-only public keys and key pairs).
- Verification
- Marker trait for indicating that an instance of
Secp256k1
can be used for verification.
Type Aliases§
- Untweaked
Keypair - Untweaked BIP-340 key pair
- Untweaked
Public Key - Untweaked BIP-340 X-coord-only public key