Class: Sigma::Propositions
- Inherits:
-
Object
- Object
- Sigma::Propositions
- Extended by:
- FFI::Library
- Defined in:
- lib/sigma/reduced_transaction.rb
Overview
Propositions list (public keys)
Instance Attribute Summary collapse
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Class Method Summary collapse
-
.create ⇒ Propositions
Create an empty collection.
Instance Method Summary collapse
-
#add_proposition(bytes) ⇒ Object
Add a proposition.
Instance Attribute Details
#pointer ⇒ Object
Returns the value of attribute pointer.
80 81 82 |
# File 'lib/sigma/reduced_transaction.rb', line 80 def pointer @pointer end |
Class Method Details
.create ⇒ Propositions
Create an empty collection
84 85 86 87 88 |
# File 'lib/sigma/reduced_transaction.rb', line 84 def self.create pointer = FFI::MemoryPointer.new(:pointer) ergo_lib_propositions_new(pointer) init(pointer) end |
Instance Method Details
#add_proposition(bytes) ⇒ Object
Add a proposition
92 93 94 95 96 97 |
# File 'lib/sigma/reduced_transaction.rb', line 92 def add_proposition(bytes) b_ptr = FFI::MemoryPointer.new(:uint8, bytes.size) b_ptr.write_array_of_uint8(bytes) error = ergo_lib_propositions_add_proposition_from_bytes(self.pointer, b_ptr, bytes.size) Util.check_error!(error) end |