Class: Sigma::Input
- Inherits:
-
Object
- Object
- Sigma::Input
- Extended by:
- FFI::Library
- Defined in:
- lib/sigma/input.rb
Overview
Signed inputs used in signed transactions
Instance Attribute Summary collapse
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Class Method Summary collapse
-
.with_raw_pointer(pointer) ⇒ Input
Takes ownership of an existing Input Pointer.
Instance Method Summary collapse
-
#get_box_id ⇒ BoxId
Get box id.
-
#get_spending_proof ⇒ ProverResult
Get spending proof.
Instance Attribute Details
#pointer ⇒ Object
Returns the value of attribute pointer.
11 12 13 |
# File 'lib/sigma/input.rb', line 11 def pointer @pointer end |
Class Method Details
.with_raw_pointer(pointer) ⇒ Input
Note:
A user of sigma_rb generally does not need to call this function
Takes ownership of an existing Input Pointer.
20 21 22 |
# File 'lib/sigma/input.rb', line 20 def self.with_raw_pointer(pointer) init(pointer) end |
Instance Method Details
#get_box_id ⇒ BoxId
Get box id
26 27 28 29 30 |
# File 'lib/sigma/input.rb', line 26 def get_box_id pointer = FFI::MemoryPointer.new(:pointer) ergo_lib_input_box_id(self.pointer, pointer) Sigma::BoxId.with_raw_pointer(pointer) end |
#get_spending_proof ⇒ ProverResult
Get spending proof
34 35 36 37 38 |
# File 'lib/sigma/input.rb', line 34 def get_spending_proof pointer = FFI::MemoryPointer.new(:pointer) ergo_lib_input_spending_proof(self.pointer, pointer) Sigma::ProverResult.with_raw_pointer(pointer) end |