Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
miniscript::internal::InputStack Struct Reference

An object representing a sequence of witness stack elements. More...

#include <miniscript.h>

Public Member Functions

 InputStack ()=default
 Construct an empty stack (valid).
 InputStack (std::vector< unsigned char > in)
 Construct a valid single-element stack (with an element up to 75 bytes).
InputStackSetAvailable (Availability avail)
 Change availability.
InputStackSetWithSig ()
 Mark this input stack as having a signature.
InputStackSetNonCanon ()
 Mark this input stack as non-canonical (known to not be necessary in non-malleable satisfactions).
InputStackSetMalleable (bool x=true)
 Mark this input stack as malleable.

Public Attributes

Availability available = Availability::YES
 Whether this stack is valid for its intended purpose (satisfaction or dissatisfaction of a Node).
bool has_sig = false
 Whether this stack contains a digital signature.
bool malleable = false
 Whether this stack is malleable (can be turned into an equally valid other stack by a third party).
bool non_canon = false
size_t size = 0
 Serialized witness size.
std::vector< std::vector< unsigned char > > stack
 Data elements.

Friends

InputStack operator+ (InputStack a, InputStack b)
 Concatenate two input stacks.
InputStack operator| (InputStack a, InputStack b)
 Choose between two potential input stacks.

Detailed Description

An object representing a sequence of witness stack elements.

Definition at line 306 of file miniscript.h.

Constructor & Destructor Documentation

◆ InputStack() [1/2]

miniscript::internal::InputStack::InputStack ( )
default

Construct an empty stack (valid).

Here is the caller graph for this function:

◆ InputStack() [2/2]

miniscript::internal::InputStack::InputStack ( std::vector< unsigned char > in)
inline

Construct a valid single-element stack (with an element up to 75 bytes).

Definition at line 327 of file miniscript.h.

Here is the call graph for this function:

Member Function Documentation

◆ SetAvailable()

InputStack & miniscript::internal::InputStack::SetAvailable ( Availability avail)

Change availability.

Definition at line 298 of file miniscript.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetMalleable()

InputStack & miniscript::internal::InputStack::SetMalleable ( bool x = true)

Mark this input stack as malleable.

Definition at line 320 of file miniscript.cpp.

Here is the call graph for this function:

◆ SetNonCanon()

InputStack & miniscript::internal::InputStack::SetNonCanon ( )

Mark this input stack as non-canonical (known to not be necessary in non-malleable satisfactions).

Definition at line 315 of file miniscript.cpp.

Here is the call graph for this function:

◆ SetWithSig()

InputStack & miniscript::internal::InputStack::SetWithSig ( )

Mark this input stack as having a signature.

Definition at line 310 of file miniscript.cpp.

Here is the call graph for this function:

◆ operator+

InputStack operator+ ( InputStack a,
InputStack b )
friend

Concatenate two input stacks.

Definition at line 325 of file miniscript.cpp.

◆ operator|

InputStack operator| ( InputStack a,
InputStack b )
friend

Choose between two potential input stacks.

Definition at line 339 of file miniscript.cpp.

Member Data Documentation

◆ available

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 312 of file miniscript.h.

◆ has_sig

bool miniscript::internal::InputStack::has_sig = false

Whether this stack contains a digital signature.

Definition at line 314 of file miniscript.h.

◆ malleable

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 316 of file miniscript.h.

◆ non_canon

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 319 of file miniscript.h.

◆ size

size_t miniscript::internal::InputStack::size = 0

Serialized witness size.

Definition at line 321 of file miniscript.h.

◆ stack

std::vector<std::vector<unsigned char> > miniscript::internal::InputStack::stack

Data elements.

Definition at line 323 of file miniscript.h.


The documentation for this struct was generated from the following files: