Sha256: 3ca849082200022a22911c2fbcab7d7f5830e03ff8009bb235c503192f1f9cd2

Contents?: true

Size: 496 Bytes

Versions: 5

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true

module FlowClient
  # An abstract super class for the transaction signers. Subclasses must
  # implement the sign method to sign transactions.
  class Signer
    def sign(data); end
  end

  # Implements a local singer using an in-memory key.
  class LocalSigner < Signer
    def initialize(private_key)
      super()
      @private_key = private_key
    end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flow_client-0.2.3 lib/flow_client/signer.rb
flow_client-0.2.3-arm64-darwin-21 lib/flow_client/signer.rb
flow_client-0.2.2 lib/flow_client/signer.rb
flow_client-0.2.1 lib/flow_client/signer.rb
flow_client-0.2.0 lib/flow_client/signer.rb