Class: Sigma::ErgoStateContext
- Inherits:
-
Object
- Object
- Sigma::ErgoStateContext
- Extended by:
- FFI::Library
- Defined in:
- lib/sigma/ergo_state_context.rb
Overview
Blockchain state (last headers, etc)
Instance Attribute Summary collapse
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Class Method Summary collapse
-
.create(pre_header:, headers:) ⇒ ErgoStateContext
Createa new context.
Instance Method Summary collapse
-
#==(esc_two) ⇒ bool
Equality check.
Instance Attribute Details
#pointer ⇒ Object
Returns the value of attribute pointer.
15 16 17 |
# File 'lib/sigma/ergo_state_context.rb', line 15 def pointer @pointer end |
Class Method Details
.create(pre_header:, headers:) ⇒ ErgoStateContext
Createa new context
21 22 23 24 25 26 |
# File 'lib/sigma/ergo_state_context.rb', line 21 def self.create(pre_header:, headers:) pointer = FFI::MemoryPointer.new(:pointer) error = ergo_lib_ergo_state_context_new(pre_header.pointer, headers.pointer, pointer) Util.check_error!(error) init(pointer) end |
Instance Method Details
#==(esc_two) ⇒ bool
Equality check
31 32 33 |
# File 'lib/sigma/ergo_state_context.rb', line 31 def ==(esc_two) ergo_lib_ergo_state_context_eq(self.pointer, esc.pointer) end |