Class: Bitcoin::Protocol::TxInWitness
- Inherits:
-
Object
- Object
- Bitcoin::Protocol::TxInWitness
- Defined in:
- lib/segwit/tx_in_witness.rb
Instance Attribute Summary collapse
-
#script_witness ⇒ Object
readonly
Returns the value of attribute script_witness.
Instance Method Summary collapse
- #add_stack(script) ⇒ Object
-
#initialize ⇒ TxInWitness
constructor
A new instance of TxInWitness.
- #stack ⇒ Object
-
#to_payload ⇒ Object
output witness script in raw binary format with witness.
Constructor Details
#initialize ⇒ TxInWitness
Returns a new instance of TxInWitness.
5 6 7 |
# File 'lib/segwit/tx_in_witness.rb', line 5 def initialize @script_witness = Bitcoin::Protocol::ScriptWitness.new end |
Instance Attribute Details
#script_witness ⇒ Object (readonly)
Returns the value of attribute script_witness.
3 4 5 |
# File 'lib/segwit/tx_in_witness.rb', line 3 def script_witness @script_witness end |
Instance Method Details
#add_stack(script) ⇒ Object
9 10 11 |
# File 'lib/segwit/tx_in_witness.rb', line 9 def add_stack(script) script_witness.stack << script end |
#stack ⇒ Object
18 19 20 |
# File 'lib/segwit/tx_in_witness.rb', line 18 def stack script_witness.stack end |
#to_payload ⇒ Object
output witness script in raw binary format with witness
14 15 16 |
# File 'lib/segwit/tx_in_witness.rb', line 14 def to_payload script_witness.to_payload end |