-
Notifications
You must be signed in to change notification settings - Fork 76
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 OS specific keychains #1703
base: main
Are you sure you want to change the base?
Changes from all commits
8c06970
883cb8c
eb70734
d4e2500
3ee20b8
1a24c00
4a0c900
755c318
dd07bf7
f042d19
9cf5916
cd515d3
276558d
20c651b
66d1bfc
8b9763e
fdefa2a
36559ea
f98b709
0f3106b
e120595
c4d6f99
c7e2cbc
57ba3a4
0814e4b
74fa05b
7ff1f6a
f263d8d
e2b7342
dabbb27
d9131b4
3ad6b9b
9d02b01
4bddd24
a72276d
65284cc
e9f86e7
4288630
6661b42
b2120d2
24e7b59
cfdb324
8e158a1
2241352
03b84e8
24269ce
e95fa3a
95d8b32
01c8753
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
use crate::commands::config::secret; | ||
|
||
use super::super::config::locator; | ||
use clap::arg; | ||
|
||
use crate::{ | ||
commands::config::{address, locator, secret}, | ||
config::UnresolvedMuxedAccount, | ||
}; | ||
|
||
#[derive(thiserror::Error, Debug)] | ||
pub enum Error { | ||
#[error(transparent)] | ||
|
@@ -13,6 +15,9 @@ pub enum Error { | |
|
||
#[error(transparent)] | ||
StrKey(#[from] stellar_strkey::DecodeError), | ||
|
||
#[error(transparent)] | ||
Address(#[from] address::Error), | ||
} | ||
|
||
#[derive(Debug, clap::Parser, Clone)] | ||
|
@@ -45,6 +50,11 @@ impl Cmd { | |
pub fn public_key(&self) -> Result<stellar_strkey::ed25519::PublicKey, Error> { | ||
if let Ok(key) = stellar_strkey::ed25519::PublicKey::from_string(&self.name) { | ||
Ok(key) | ||
} else if let Ok(unresolved) = self.name.parse::<UnresolvedMuxedAccount>() { | ||
let muxed = unresolved.resolve_muxed_account(&self.locator, self.hd_path)?; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @willemneal When I was testing after merging main, I realized I needed to change this function. I added this |
||
Ok(stellar_strkey::ed25519::PublicKey::from_string( | ||
&muxed.to_string(), | ||
)?) | ||
} else { | ||
Ok(stellar_strkey::ed25519::PublicKey::from_payload( | ||
self.private_key()?.verifying_key().as_bytes(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The keyring crate requires this pkg as a dependency, so I am including it on several of these linux workflows. I just wanted to point this out as a dependency and see if there is any other way I should handle this.