Bitcoin Core 28.99.0
P2P Digital Currency
|
#include <outputtype.h>
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <optional>
#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 (const std::string &descriptor, FlatSigningProvider &out, std::string &error, bool require_checksum=false) |
Parse a descriptor string. More... | |
std::string | GetDescriptorChecksum (const std::string &descriptor) |
Get the checksum for a descriptor . More... | |
std::unique_ptr< Descriptor > | InferDescriptor (const CScript &script, const SigningProvider &provider) |
Find a descriptor for the specified script , using information from provider where possible. More... | |
uint256 | DescriptorID (const Descriptor &desc) |
Unique identifier that may not change over time, unless explicitly marked as not backwards compatible. More... | |
using ExtPubKeyMap = std::unordered_map<uint32_t, CExtPubKey> |
Definition at line 16 of file descriptor.h.
uint256 DescriptorID | ( | const Descriptor & | desc | ) |
Unique identifier that may not change over time, unless explicitly marked as not backwards compatible.
This is not part of BIP 380, not guaranteed to be interoperable and should not be exposed to the user.
Definition at line 2399 of file descriptor.cpp.
std::string GetDescriptorChecksum | ( | const std::string & | descriptor | ) |
Get the checksum for a descriptor
.
Definition at line 2385 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.
script
is present in provider
, a descriptor will be returned which is IsSolvable() and encapsulates said information.script
corresponds to a known address type, an "addr()" descriptor will be returned (which is not IsSolvable()).Definition at line 2394 of file descriptor.cpp.
std::vector< std::unique_ptr< Descriptor > > Parse | ( | const std::string & | 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 2368 of file descriptor.cpp.