quantus_cli/cli/
address_format.rs1use sp_core::crypto::Ss58Codec;
7
8pub trait QuantusSS58 {
10 fn to_quantus_ss58(&self) -> String;
11}
12
13impl QuantusSS58 for sp_core::crypto::AccountId32 {
14 fn to_quantus_ss58(&self) -> String {
15 self.to_ss58check()
16 }
17}
18
19impl QuantusSS58 for subxt::ext::subxt_core::utils::AccountId32 {
20 fn to_quantus_ss58(&self) -> String {
21 let bytes: [u8; 32] = *self.as_ref();
22 let sp_account_id = sp_core::crypto::AccountId32::from(bytes);
23 sp_account_id.to_ss58check()
24 }
25}