Closed chasefleming closed 3 months ago
The other workaround is potentially to just make the default account/emulator account an argument instead of the target driectory. This could potentially provide more control to the end user while also solving this issue. (i.e. right now everyone is forced to use file keys for emulator account, maybe they don't want to do this, etc.)
@bjartek any thoughts on this? It could be something like flowkit.Init(readerWriter, NewEmulatorAccount(...))
Or, separately creating the account could be an additional step like:
state, err := flowkit.Init(readerWriter)
state.AddAccount(...)
That being said if you prefer what was on the PR that would work as well, which was flowkit.Init(readerWriter, crypto.ECDSA_P256, crypto.SHA3_256, "")
I dont really use keys in files. I find it easier to use env var substitution to keep things secure.
Issue to be solved
You can save the state to a path, but the private key creation only happens at the root level. This means your config and key can be in different locations after saving.
Suggest A Solution
We need a way to give the target directory to the private key creation so it occurs in the same place as the config is created.
What are you currently working on that this is blocking?
No response