Class: FlowClient::ProposalKey

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_client/proposal_key.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address: nil, key_id: nil, sequence_number: nil) ⇒ ProposalKey

Returns a new instance of ProposalKey.



9
10
11
12
13
# File 'lib/flow_client/proposal_key.rb', line 9

def initialize(address: nil, key_id: nil, sequence_number: nil)
  @address = address
  @sequence_number = sequence_number
  @key_id = key_id
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



5
6
7
# File 'lib/flow_client/proposal_key.rb', line 5

def address
  @address
end

#key_idObject

Returns the value of attribute key_id.



5
6
7
# File 'lib/flow_client/proposal_key.rb', line 5

def key_id
  @key_id
end

#sequence_numberObject

Returns the value of attribute sequence_number.



5
6
7
# File 'lib/flow_client/proposal_key.rb', line 5

def sequence_number
  @sequence_number
end

Class Method Details

.parse_grpc_type(type) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/flow_client/proposal_key.rb', line 15

def self.parse_grpc_type(type)
  signature = ProposalKey.new
  signature.address = type.address.unpack1("H*")
  signature.sequence_number = type.sequence_number
  signature.key_id = type.key_id
  signature
end