mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Adds support for inspecting a hex encoded public key (#7344)
* Adds support for inspecting a hex encoded public key This adds support for inspecting hex encoded public keys to subkey. The command looks like: `subkey inspect --public 0xPUBLICHEX` * Update client/cli/src/commands/utils.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -323,6 +323,14 @@ macro_rules! app_crypto_public_common {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> $crate::TryFrom<&'a [u8]> for Public {
|
||||
type Error = ();
|
||||
|
||||
fn try_from(data: &'a [u8]) -> Result<Self, Self::Error> {
|
||||
<$public>::try_from(data).map(Into::into)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user