Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to select an existing key for a new deploy alias #414

Open
Isaac-DeFrain opened this issue May 27, 2023 · 2 comments
Open

Allow user to select an existing key for a new deploy alias #414

Isaac-DeFrain opened this issue May 27, 2023 · 2 comments

Comments

@Isaac-DeFrain
Copy link
Contributor

Describe the problem

I added the ability to set the key in an existing deploy alias (among other things), but it would be nice to have the ability to select an existing key when creating a deploy alias instead. I am not familiar enough with yargs to add this feature (I tried but was unsuccessful).

Describe the proposed solution

Instead of always generating a new keypair for a deploy alias, include an option to choose from existing keys.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

@ymekuria
Copy link
Collaborator

Thanks for the suggestion @Isaac-DeFrain. We will look into this. Can you clarify what you are suggesting?

@Isaac-DeFrain
Copy link
Contributor Author

Sure! When creating a deploy alias via zk config, currently a new keypair is always created for the alias. It would be nice to have an option to select one of the existing keypairs in ./keys to use for a new alias. In my mind the flow is something like this:

User runs zk config

  1. User is prompted to enter a deploy alias name.
  2. User is prompted to enter a graphql API URL.
  3. User is prompted to set the transaction fee.

// requested addition option 1
4. User is prompted to generate a new keypair or select an existing keypair from ./keys. It probably makes the most sense to display the generate new option at the top and existing keys below that.

// option 2
4. User is prompted to enter a name for the key. If the name already exists in ./keys, that key will be used. Default name (i.e. just press enter) is the same as the alias and generates a new keypair.

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

No branches or pull requests

2 participants