Class: FlowClient::LocalSigner

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

Overview

Implements a local singer using an in-memory key.

Instance Method Summary collapse

Constructor Details

#initialize(private_key) ⇒ LocalSigner

Returns a new instance of LocalSigner.



12
13
14
15
# File 'lib/flow_client/signer.rb', line 12

def initialize(private_key)
  super()
  @private_key = private_key
end

Instance Method Details

#sign(data) ⇒ Object



17
18
19
20
# File 'lib/flow_client/signer.rb', line 17

def sign(data)
  super(data)
  FlowClient::Crypto.sign(data, @private_key)
end