2020-01-20 16:45:49 +00:00
|
|
|
#
|
|
|
|
# Nimbus
|
|
|
|
# (c) Copyright 2019
|
|
|
|
# Status Research & Development GmbH
|
|
|
|
#
|
|
|
|
# Licensed under either of
|
|
|
|
# Apache License, version 2.0, (LICENSE-APACHEv2)
|
|
|
|
# MIT license (LICENSE-MIT)
|
|
|
|
|
2021-06-01 13:34:50 +00:00
|
|
|
import tables, eth/keys
|
2020-01-20 16:45:49 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
KeyStorage* = ref object
|
|
|
|
asymKeys*: Table[string, KeyPair]
|
|
|
|
|
|
|
|
KeyGenerationError* = object of CatchableError
|
|
|
|
|
|
|
|
proc newKeyStorage*(): KeyStorage =
|
|
|
|
new(result)
|
|
|
|
result.asymKeys = initTable[string, KeyPair]()
|