Class: FlowClient::Signature

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSignature

Returns a new instance of Signature.



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

def initialize
  @address = nil
  @signature = nil
  @key_id = nil
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



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

def address
  @address
end

#key_idObject

Returns the value of attribute key_id.



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

def key_id
  @key_id
end

#signatureObject

Returns the value of attribute signature.



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

def signature
  @signature
end

Class Method Details

.parse_grpc_type(pb_signature) ⇒ Object



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

def self.parse_grpc_type(pb_signature)
  signature = Signature.new
  signature.address = pb_signature.address.unpack1("H*")
  signature.signature = pb_signature.signature.unpack1("H*")
  signature.key_id = pb_signature.key_id
  signature
end