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

feat: add support for importing private key armor #442

Merged
merged 7 commits into from
Jan 11, 2023

Conversation

zivkovicmilos
Copy link
Member

@zivkovicmilos zivkovicmilos commented Dec 23, 2022

Description

This PR is a follow up PR to #432, and it adds support for importing private key armor.

The command that's been added is:
gnokey import

The command assumes the private key armor being imported is encrypted.
Additionally, this PR also contains test cleanups for the gnokey export unit test, and changes to the KeyBase interface method ImportPrivKey to be analog to ExportPrivKey.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist (for contributors)

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

In addition to a unit test covering this functionality, I've tested out the command using the following:

gnokey import --name NewKey --armor-path ~/gno-test.asc

@zivkovicmilos zivkovicmilos self-assigned this Dec 23, 2022
@zivkovicmilos zivkovicmilos added the 🌱 feature New update to Gno label Dec 23, 2022
pkgs/crypto/keys/keybase.go Outdated Show resolved Hide resolved
@zivkovicmilos zivkovicmilos requested a review from a team as a code owner January 9, 2023 10:47
@zivkovicmilos
Copy link
Member Author

@moul ping for resolving the convo

Should we move forward with merging this?

@moul moul merged commit f95ae9c into gnolang:master Jan 11, 2023
@zivkovicmilos zivkovicmilos deleted the feature/import-keys branch January 12, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 feature New update to Gno
Projects
Development

Successfully merging this pull request may close these issues.

3 participants