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

Set defaults for private key generation #29

Open
andrewkmin opened this issue May 9, 2023 · 1 comment
Open

Set defaults for private key generation #29

andrewkmin opened this issue May 9, 2023 · 1 comment

Comments

@andrewkmin
Copy link
Contributor

Private key generation via cli is quite verbose:

turnkey pk create --key-name some-key --address-format ADDRESS_FORMAT_ETHEREUM --curve CURVE_SECP256K1 --name some-name

We should consider making --address-format and --curve optional, with defaults set to ADDRESS_FORMAT_ETHEREUM and CURVE_SECP256K1 respectively.

Furthermore, we could probably flesh out the flags:

private-keys interacts with private keys

Usage:
  turnkey private-keys [command]

Aliases:
  private-keys, pk

Available Commands:
  create      create a new private key
  list        list private keys for the organization

Flags:
  -h, --help   help for private-keys

Global Flags:
  -k, --key-name string       name of API key with which to interact with the Turnkey API service (default "default")
  -d, --keys-folder string    directory in which to locate keys (default "/Users/andrew/Library/Application Support/turnkey/keys")
      --organization string   organization ID to be used
  -o, --output string         output format (default "json")

Use "turnkey private-keys [command] --help" for more information about a command.
@andrewkmin
Copy link
Contributor Author

andrewkmin commented May 10, 2023

While we're at it, I wonder if it might be worthwhile supporting changes to these defaults (which would be particularly relevant to the --keys-folder flag)

And making sure that pk create works

./turnkey pk create --address-format ADDRESS_FORMAT_ETHEREUM --curve CURVE_SECP256K1 --name queueing-key --keys-folder="/Users/andrew/.config/turnkey/keys" --key-name queueing
{
   "error": "failed to create API client: failed to load API key: failed to read from \"/Users/andrew/Library/Application Support/turnkey/keys/queueing.private\": open /Users/andrew/Library/Application Support/turnkey/keys/queueing.private: no such file or directory"
}

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

1 participant