Class: Sigma::Input

Inherits:
Object
  • Object
show all
Extended by:
FFI::Library
Defined in:
lib/sigma/input.rb

Overview

Signed inputs used in signed transactions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pointerObject

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.

Parameters:

  • pointer (FFI::MemoryPointer)

Returns:



20
21
22
# File 'lib/sigma/input.rb', line 20

def self.with_raw_pointer(pointer)
  init(pointer)
end

Instance Method Details

#get_box_idBoxId

Get box id

Returns:



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_proofProverResult

Get spending proof

Returns:



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