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 new Key type; allowing public keys to be named keys #1700

Open
wants to merge 82 commits into
base: main
Choose a base branch
from

Conversation

willemneal
Copy link
Member

@willemneal willemneal commented Nov 5, 2024

This will allow users to add public keys with keys add so that they can be referenced in commands that need public addresses and contract invoke's that take address arguments.


This is part 1 of 2 in a stack made with GitButler:

@willemneal willemneal self-assigned this Nov 5, 2024
@willemneal willemneal marked this pull request as ready for review November 12, 2024 20:40
This will allow users to add public keys with `keys add` so that they can be referenced in commands that need public addresses and contract invoke's that take address arguments.
FULL_HELP_DOCS.md Outdated Show resolved Hide resolved
cmd/soroban-cli/src/config/key.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/config/key.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/config/key.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/config/key.rs Show resolved Hide resolved
cmd/soroban-cli/src/config/key.rs Show resolved Hide resolved
Copy link
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

One thing I'm thinking of is if it would make sense to merge these two PRs before or after the PRs that add the new signers (ledger & keychain), to reduce conflicts. 🤔

}

impl Args {
pub fn read_secret(&self) -> Result<Secret, Error> {
pub fn read_key(&self) -> Result<Key, key::Error> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could go in config/key.rs instead, since it is also dealing with public keys

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is just for parsing the Arg struct. So it only should be used with the keys add command. Though then maybe it should just go into that command? Since there is no reuse of this function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of like the idea of moving it to the add command, since that is where it's being used. But not merge blocking!

cmd/soroban-cli/src/config/locator.rs Show resolved Hide resolved
cmd/soroban-cli/src/config/locator.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/config/locator.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/commands/tx/args.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/commands/tx/args.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/config/locator.rs Outdated Show resolved Hide resolved
elizabethengelman and others added 27 commits December 12, 2024 11:29
Co-authored-by: Elizabeth Engelman <[email protected]>
This will allow for exporting the phrase later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

3 participants