Bitcoin Core 28.99.0
P2P Digital Currency
|
An object representing a sequence of witness stack elements. More...
#include <miniscript.h>
Public Member Functions | |
InputStack ()=default | |
Construct an empty stack (valid). More... | |
InputStack (std::vector< unsigned char > in) | |
Construct a valid single-element stack (with an element up to 75 bytes). More... | |
InputStack & | SetAvailable (Availability avail) |
Change availability. More... | |
InputStack & | SetWithSig () |
Mark this input stack as having a signature. More... | |
InputStack & | SetNonCanon () |
Mark this input stack as non-canonical (known to not be necessary in non-malleable satisfactions). More... | |
InputStack & | SetMalleable (bool x=true) |
Mark this input stack as malleable. More... | |
Public Attributes | |
Availability | available = Availability::YES |
Whether this stack is valid for its intended purpose (satisfaction or dissatisfaction of a Node). More... | |
bool | has_sig = false |
Whether this stack contains a digital signature. More... | |
bool | malleable = false |
Whether this stack is malleable (can be turned into an equally valid other stack by a third party). More... | |
bool | non_canon = false |
Whether this stack is non-canonical (using a construction known to be unnecessary for satisfaction). More... | |
size_t | size = 0 |
Serialized witness size. More... | |
std::vector< std::vector< unsigned char > > | stack |
Data elements. More... | |
Friends | |
InputStack | operator+ (InputStack a, InputStack b) |
Concatenate two input stacks. More... | |
InputStack | operator| (InputStack a, InputStack b) |
Choose between two potential input stacks. More... | |
An object representing a sequence of witness stack elements.
Definition at line 294 of file miniscript.h.
|
default |
Construct an empty stack (valid).
|
inline |
Construct a valid single-element stack (with an element up to 75 bytes).
Definition at line 315 of file miniscript.h.
InputStack & miniscript::internal::InputStack::SetAvailable | ( | Availability | avail | ) |
Change availability.
Definition at line 299 of file miniscript.cpp.
InputStack & miniscript::internal::InputStack::SetMalleable | ( | bool | x = true | ) |
Mark this input stack as malleable.
Definition at line 321 of file miniscript.cpp.
InputStack & miniscript::internal::InputStack::SetNonCanon | ( | ) |
Mark this input stack as non-canonical (known to not be necessary in non-malleable satisfactions).
Definition at line 316 of file miniscript.cpp.
InputStack & miniscript::internal::InputStack::SetWithSig | ( | ) |
Mark this input stack as having a signature.
Definition at line 311 of file miniscript.cpp.
|
friend |
Concatenate two input stacks.
Definition at line 326 of file miniscript.cpp.
|
friend |
Choose between two potential input stacks.
Definition at line 340 of file miniscript.cpp.
Availability miniscript::internal::InputStack::available = Availability::YES |
Whether this stack is valid for its intended purpose (satisfaction or dissatisfaction of a Node).
The MAYBE value is used for size estimation, when keys/preimages may actually be unavailable, but may be available at signing time. This makes the InputStack structure and signing logic, filled with dummy signatures/preimages usable for witness size estimation.
Definition at line 300 of file miniscript.h.
bool miniscript::internal::InputStack::has_sig = false |
Whether this stack contains a digital signature.
Definition at line 302 of file miniscript.h.
bool miniscript::internal::InputStack::malleable = false |
Whether this stack is malleable (can be turned into an equally valid other stack by a third party).
Definition at line 304 of file miniscript.h.
bool miniscript::internal::InputStack::non_canon = false |
Whether this stack is non-canonical (using a construction known to be unnecessary for satisfaction).
Note that this flag does not affect the satisfaction algorithm; it is only used for sanity checking.
Definition at line 307 of file miniscript.h.
size_t miniscript::internal::InputStack::size = 0 |
Serialized witness size.
Definition at line 309 of file miniscript.h.
std::vector<std::vector<unsigned char> > miniscript::internal::InputStack::stack |
Data elements.
Definition at line 311 of file miniscript.h.