style: format
This commit is contained in:
@@ -10,14 +10,16 @@ use std::str::FromStr;
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct JsonKeyPair {
|
||||
pub tag: Option<String>,
|
||||
pub identity: String,
|
||||
pub pri_key: String,
|
||||
pub pub_key: String,
|
||||
}
|
||||
|
||||
impl JsonKeyPair {
|
||||
pub fn from(pri_key: SecretKey, pub_key: PublicKey) -> Self {
|
||||
pub fn from(pri_key: SecretKey, pub_key: PublicKey, tag: Option<String>) -> Self {
|
||||
JsonKeyPair {
|
||||
tag,
|
||||
identity: make_btc_address(&pub_key),
|
||||
pri_key: format!("{}", pri_key),
|
||||
pub_key: format!("{}", pub_key),
|
||||
|
||||
Reference in New Issue
Block a user