Closed aslawson closed 3 years ago
Seems like the ideal scenario here is something Valora can use (ReactNative compatible), the browser can use (LocalStorage / IndexedDB compatibility) and something the CLI can use (file system access).
Metamask uses a library called LocalForage, that acts as a thin wrapper around LocalStorage and IndexedDB. AFAICT metamask simply stores private keys with that, encrypted with a password / pin.
Added old description for posterity
.celo
file
Quick Implementation: I see this as basically a state management and persistence library that wraps the LocalWallet functionality already in ContractKit, ideally providing support for each environment we want to run it in. LocalWallet keeps the private key in memory and has support for all operations (sign, decrypt, computeSharedSecret, etc) that we're currently thinking about. In an effort to move away from Geth signing data and controlling keys we just need more people to use this LocalWallet safely.
Could also explore
KeystoreManager
- Basically an API for getting (and decrypting) the private key in a way all the consumers can implement.Use Cases
Thoughts on Clef: