Module keys

Source
Expand description

Key formats

Structs§

GeneratedKey
Output of a GeneratableKey key generation
PrivateKeyGenerateOptions
Options for generating a [PrivateKey]
SinglePriv
A descriptor [bitcoin::PrivateKey] with optional origin information.
SinglePub
A descriptor SinglePubKey with optional origin information.
SortedMultiVec
Contents of a “sortedmulti” descriptor

Enums§

DescriptorKey
Container for public or secret keys
DescriptorPublicKey
The descriptor pubkey, either a single pubkey or an xpub.
DescriptorSecretKey
The descriptor secret key, either a single private key or an xprv.
ExtendedKey
Enum for extended keys that can be either xprv or xpub
KeyError
Errors thrown while working with keys
ScriptContextEnum
Enum representation of the known valid ScriptContexts
SinglePubKey
Single public key without any origin or range information.

Traits§

DerivableKey
Trait for keys that can be derived.
ExtScriptContext
Trait that adds extra useful methods to ScriptContexts
GeneratableDefaultOptions
Trait that allows generating a key with the default options
GeneratableKey
Trait for keys that can be generated
IntoDescriptorKey
Trait for objects that can be turned into a public or secret DescriptorKey
ScriptContext
The ScriptContext for Miniscript. Additional type information associated with miniscript that is used for carrying out checks that dependent on the context under which the script is used. For example, disallowing uncompressed keys in Segwit context

Functions§

any_network
Create a set containing mainnet, testnet, testnet4, signet, and regtest
mainnet_network
Create a set only containing mainnet
merge_networks
Compute the intersection of two sets
test_networks
Create a set containing test networks

Type Aliases§

KeyMap
Alias type for a map of public key to secret key
ValidNetworks
Set of valid networks for a key