Methods
G
I
N
Class Public methods
new(rpc, key=nil)
# File lib/nanook/key.rb, line 4
def initialize(rpc, key=nil)
  @rpc = rpc
  @key = key
end
Instance Public methods
generate(seed: nil, index: nil)
# File lib/nanook/key.rb, line 9
def generate(seed: nil, index: nil)
  if seed.nil? && index.nil?
    rpc(:key_create)
  elsif !seed.nil? && !index.nil?
    rpc(:deterministic_key, seed: seed, index: index)
  else
    raise ArgumentError.new("This method must be called with either seed AND index params given or no params")
  end
end
id()
# File lib/nanook/key.rb, line 19
def id
  @key
end
info()
# File lib/nanook/key.rb, line 23
def info
  key_required!
  rpc(:key_expand)
end