Class: Chain::MockHSM::Key::ClientModule

Inherits:
ClientModule show all
Defined in:
lib/chain/mock_hsm.rb

Instance Attribute Summary

Attributes inherited from ClientModule

#client

Instance Method Summary collapse

Methods inherited from ClientModule

#initialize

Constructor Details

This class inherits a constructor from Chain::ClientModule

Instance Method Details

#create(opts = {}) ⇒ Key

Creates a key object.

Parameters:

  • opts (Hash) (defaults to: {})

    Parameters for MockHSM key creation.

Options Hash (opts):

  • alias (String)

    User specified, unique identifier.

Returns:



44
45
46
# File 'lib/chain/mock_hsm.rb', line 44

def create(opts = {})
  Key.new(client.conn.request('mockhsm/create-key', opts))
end

#query(opts = {}) ⇒ Query

Parameters:

  • opts (Hash) (defaults to: {})

    Filtering information

Options Hash (opts):

  • aliases (Array<String>)

    Optional list of requested aliases, max 200.

Returns:



51
52
53
# File 'lib/chain/mock_hsm.rb', line 51

def query(opts = {})
  Query.new(client, opts)
end