#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewWalletSecret {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "secretType")]
pub secret_type: Box<crate::models::SecretType>,
#[serde(rename = "pChainAddress", skip_serializing_if = "Option::is_none")]
pub p_chain_address: Option<String>,
#[serde(rename = "privateKey", skip_serializing_if = "Option::is_none")]
pub private_key: Option<String>,
#[serde(rename = "privateKeyFormat", skip_serializing_if = "Option::is_none")]
pub private_key_format: Option<PrivateKeyFormat>,
}
impl NewWalletSecret {
pub fn new(name: String, secret_type: crate::models::SecretType) -> NewWalletSecret {
NewWalletSecret {
name,
secret_type: Box::new(secret_type),
p_chain_address: None,
private_key: None,
private_key_format: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PrivateKeyFormat {
#[serde(rename = "cb58")]
Cb58,
#[serde(rename = "hex")]
Hex,
}
impl Default for PrivateKeyFormat {
fn default() -> PrivateKeyFormat {
Self::Cb58
}
}