Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Keystore API #3

Open
thiagodelgado111 opened this issue Feb 8, 2018 · 0 comments
Open

Keystore API #3

thiagodelgado111 opened this issue Feb 8, 2018 · 0 comments

Comments

@thiagodelgado111
Copy link

A few questions about keystore's API:

  • Are all the methods available being used? Some of them seem redundant when we have getKey? e.g: importPublicKey and importPrivateKey (Maybe I didn't get how they're being used or where. I saw that the former is used by ipfs-log it seems)

  • Should it be responsible for generating / creating keys or just loading it? Currently, we are creating a new key every time a key isn't found at the keystore storage maybe that should be explicit so we don't end up doing that accidentally. Also, for cases where we don't wanna store the key on local storage or leveldb, we could keep generateKey and make it return a key-pair.

  • Suggestion: Can we give the keystore both a key and a signer object via constructor?
    Why: For a dApp you most probably already have a key and a wallet you can use to sign messages.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant