Changeset View
Changeset View
Standalone View
Standalone View
src/script/descriptor.h
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | struct Descriptor { | ||||
* | * | ||||
* @param[in] pos: The position at which to expand the descriptor. If | * @param[in] pos: The position at which to expand the descriptor. If | ||||
* IsRange() is false, this is ignored. | * IsRange() is false, this is ignored. | ||||
* @param[in] provider: The provider to query for private keys in case of | * @param[in] provider: The provider to query for private keys in case of | ||||
* hardened derivation. | * hardened derivation. | ||||
* @param[out] output_scripts: The expanded scriptPubKeys. | * @param[out] output_scripts: The expanded scriptPubKeys. | ||||
* @param[out] out: Scripts and public keys necessary for solving the | * @param[out] out: Scripts and public keys necessary for solving the | ||||
* expanded scriptPubKeys (may be equal to `provider`). | * expanded scriptPubKeys (may be equal to `provider`). | ||||
* @param[out] cache: Cache data necessary to evaluate the descriptor at | * @param[out] write_cache: Cache data necessary to evaluate the descriptor | ||||
* this point without access to private keys. | * at this point without access to private keys. | ||||
*/ | */ | ||||
virtual bool Expand(int pos, const SigningProvider &provider, | virtual bool Expand(int pos, const SigningProvider &provider, | ||||
std::vector<CScript> &output_scripts, | std::vector<CScript> &output_scripts, | ||||
FlatSigningProvider &out, | FlatSigningProvider &out, | ||||
std::vector<uint8_t> *cache = nullptr) const = 0; | DescriptorCache *write_cache = nullptr) const = 0; | ||||
/** | /** | ||||
* Expand a descriptor at a specified position using cached expansion data. | * Expand a descriptor at a specified position using cached expansion data. | ||||
* | * | ||||
* @param[in] pos: The position at which to expand the descriptor. If | * @param[in] pos: The position at which to expand the descriptor. If | ||||
* IsRange() is false, this is ignored. | * IsRange() is false, this is ignored. | ||||
* @param[in] cache: Cached expansion data. | * @param[in] read_cache: Cached expansion data. | ||||
* @param[out] output_scripts: The expanded scriptPubKeys. | * @param[out] output_scripts: The expanded scriptPubKeys. | ||||
* @param[out] out: Scripts and public keys necessary for solving the | * @param[out] out: Scripts and public keys necessary for solving the | ||||
* expanded scriptPubKeys (may be equal to `provider`). | * expanded scriptPubKeys (may be equal to `provider`). | ||||
*/ | */ | ||||
virtual bool ExpandFromCache(int pos, const std::vector<uint8_t> &cache, | virtual bool ExpandFromCache(int pos, const DescriptorCache &read_cache, | ||||
std::vector<CScript> &output_scripts, | std::vector<CScript> &output_scripts, | ||||
FlatSigningProvider &out) const = 0; | FlatSigningProvider &out) const = 0; | ||||
/** | /** | ||||
* Expand the private key for a descriptor at a specified position, if | * Expand the private key for a descriptor at a specified position, if | ||||
* possible. | * possible. | ||||
* | * | ||||
* @param[in] pos: The position at which to expand the descriptor. If | * @param[in] pos: The position at which to expand the descriptor. If | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |