![]() |
Bitcoin Core 32.1.0
P2P Digital Currency
|
#include <outputtype.h>#include <pubkey.h>#include <uint256.h>#include <cstddef>#include <cstdint>#include <memory>#include <optional>#include <set>#include <string>#include <string_view>#include <unordered_map>#include <vector>Go to the source code of this file.
Classes | |
| class | DescriptorCache |
| Cache for single descriptor's derived extended pubkeys. More... | |
| struct | Descriptor |
| Interface for parsed descriptor objects. More... | |
Typedefs | |
| using | ExtPubKeyMap = std::unordered_map<uint32_t, CExtPubKey> |
Functions | |
| std::vector< std::unique_ptr< Descriptor > > | Parse (std::string_view descriptor, FlatSigningProvider &out, std::string &error, bool require_checksum=false) |
| Parse a descriptor string. | |
| std::string | GetDescriptorChecksum (const std::string &descriptor) |
| Get the checksum for a descriptor. | |
| std::unique_ptr< Descriptor > | InferDescriptor (const CScript &script, const SigningProvider &provider) |
| Find a descriptor for the specified script, using information from provider where possible. | |
| uint256 | CompatDescriptorHash (const Descriptor &desc) |
| Hash of the COMPAT string representation of the descriptor that is not supposed to change over time. | |
| using ExtPubKeyMap = std::unordered_map<uint32_t, CExtPubKey> |
Definition at line 26 of file descriptor.h.
| uint256 CompatDescriptorHash | ( | const Descriptor & | desc | ) |
Hash of the COMPAT string representation of the descriptor that is not supposed to change over time.
Due to the hash's usage in previous versions, the COMPAT string is computed with some quirks.
The hash is the sha256 of the public descriptor using apostrophes as the hardened indicator, except inside of Miniscript expressions, where the public serialization is used as provided.
Definition at line 3025 of file descriptor.cpp.
| std::string GetDescriptorChecksum | ( | const std::string & | descriptor | ) |
Get the checksum for a descriptor.
Definition at line 3011 of file descriptor.cpp.
| std::unique_ptr< Descriptor > InferDescriptor | ( | const CScript & | script, |
| const SigningProvider & | provider ) |
Find a descriptor for the specified script, using information from provider where possible.
A non-ranged descriptor which only generates the specified script will be returned in all circumstances.
For public keys with key origin information, this information will be preserved in the returned descriptor.
Definition at line 3020 of file descriptor.cpp.
| std::vector< std::unique_ptr< Descriptor > > Parse | ( | std::string_view | descriptor, |
| FlatSigningProvider & | out, | ||
| std::string & | error, | ||
| bool | require_checksum = false ) |
Parse a descriptor string.
Included private keys are put in out.
If the descriptor has a checksum, it must be valid. If require_checksum is set, the checksum is mandatory - otherwise it is optional.
If a parse error occurs, or the checksum is missing/invalid, or anything else is wrong, an empty vector is returned.
Definition at line 2994 of file descriptor.cpp.