Class: FlowClient::BlockSeal
- Inherits:
-
Object
- Object
- FlowClient::BlockSeal
- Defined in:
- lib/flow_client/block.rb
Overview
Represents a block seal
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#execution_receipt_id ⇒ Object
Returns the value of attribute execution_receipt_id.
-
#execution_receipt_signatures ⇒ Object
Returns the value of attribute execution_receipt_signatures.
-
#result_approval_signatures ⇒ Object
Returns the value of attribute result_approval_signatures.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BlockSeal
constructor
A new instance of BlockSeal.
Constructor Details
#initialize ⇒ BlockSeal
Returns a new instance of BlockSeal.
48 49 50 51 52 53 |
# File 'lib/flow_client/block.rb', line 48 def initialize @block_id = nil @execution_receipt_id = nil @execution_receipt_signatures = [] @result_approval_signatures = [] end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
43 44 45 |
# File 'lib/flow_client/block.rb', line 43 def block_id @block_id end |
#execution_receipt_id ⇒ Object
Returns the value of attribute execution_receipt_id.
43 44 45 |
# File 'lib/flow_client/block.rb', line 43 def execution_receipt_id @execution_receipt_id end |
#execution_receipt_signatures ⇒ Object
Returns the value of attribute execution_receipt_signatures.
43 44 45 |
# File 'lib/flow_client/block.rb', line 43 def execution_receipt_signatures @execution_receipt_signatures end |
#result_approval_signatures ⇒ Object
Returns the value of attribute result_approval_signatures.
43 44 45 |
# File 'lib/flow_client/block.rb', line 43 def result_approval_signatures @result_approval_signatures end |
Class Method Details
.parse_grpc_type(grpc_type) ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/flow_client/block.rb', line 55 def self.parse_grpc_type(grpc_type) block_seal = BlockSeal.new block_seal.block_id = grpc_type.block_id.unpack1("H*") block_seal.execution_receipt_id = grpc_type.execution_receipt_id.unpack1("H*") block_seal.execution_receipt_signatures = grpc_type.execution_receipt_signatures.to_a.map do |sig| sig.unpack1("H*") end block_seal.result_approval_signatures = grpc_type.result_approval_signatures.to_a.map { |sig| sig.unpack1("H*") } block_seal end |