fix: gnokey add -derivation-path flag#5123
Open
D4ryl00 wants to merge 2 commits intognolang:masterfrom
Open
Conversation
Collaborator
🛠 PR Checks Summary🔴 Pending initial approval by a review team member, or review from tech-staff Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
a3ce554 to
2cec998
Compare
Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
2cec998 to
f7d1719
Compare
Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5122
This PR updates
gnokey add -derivation-pathto actually derive, create, and persist the resulting accounts in the keybase, instead of only printing the derived addresses.The
-derivation-pathflag is defined as an array, seegno/tm2/pkg/crypto/keys/client/add.go
Line 36 in 33412c2
So this PR treats it as accepting multiple derivation paths in a single invocation.
gnokeycreates and stores a separate key for each path.base-<account>-<index>.Note for reviewers
The GitHub “Files changed” view for
add.goisn’t very helpful because the change includes a refactor. The main new logic is concentrated around:https://github.com/D4ryl00/gno/blob/f7d17190a123d51bf372804d8c07645bceacd6d0/tm2/pkg/crypto/keys/client/add.go#L236-L300