Changeset View
Changeset View
Standalone View
Standalone View
src/script/descriptor.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | struct Descriptor { | ||||
/** | /** | ||||
* Expand a descriptor at a specified position. | * Expand a descriptor at a specified position. | ||||
* | * | ||||
* pos: the position at which to expand the descriptor. If IsRange() is | * pos: the position at which to expand the descriptor. If IsRange() is | ||||
* false, this is ignored. | * false, this is ignored. | ||||
* provider: the provider to query for private keys in case of hardened | * provider: the provider to query for private keys in case of hardened | ||||
* derivation. | * derivation. | ||||
* output_script: the expanded scriptPubKeys will be put here. | * output_scripts: the expanded scriptPubKeys will be put here. | ||||
* out: scripts and public keys necessary for solving the expanded | * out: scripts and public keys necessary for solving the expanded | ||||
* scriptPubKeys will be put here (may be equal to provider). cache: vector | * scriptPubKeys will be put here (may be equal to provider). cache: vector | ||||
* which will be overwritten with cache data necessary to-evaluate the | * which will be overwritten with cache data necessary to evaluate the | ||||
* descriptor at this point without access to private keys. | * descriptor 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; | std::vector<uint8_t> *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. | ||||
* | * | ||||
* pos: the position at which to expand the descriptor. If IsRange() is | * pos: the position at which to expand the descriptor. If IsRange() is | ||||
* false, this is ignored. cache: vector from which cached expansion data | * false, this is ignored. cache: vector from which cached expansion data | ||||
* will be read. output_script: the expanded scriptPubKeys will be put here. | * will be read. output_scripts: the expanded scriptPubKeys will be put | ||||
* out: scripts and public keys necessary for solving the expanded | * here. out: scripts and public keys necessary for solving the expanded | ||||
* scriptPubKeys will be put here (may be equal to provider). | * scriptPubKeys will be put here (may be equal to provider). | ||||
*/ | */ | ||||
virtual bool ExpandFromCache(int pos, const std::vector<uint8_t> &cache, | virtual bool ExpandFromCache(int pos, const std::vector<uint8_t> &cache, | ||||
std::vector<CScript> &output_scripts, | std::vector<CScript> &output_scripts, | ||||
FlatSigningProvider &out) const = 0; | FlatSigningProvider &out) const = 0; | ||||
}; | }; | ||||
/** Parse a descriptor string. Included private keys are put in out. | /** Parse a descriptor string. Included private keys are put in out. | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |