use serde::{Deserialize, Serialize};
use serde_bytes::ByteBuf;

use crate::PublicKey;

/// Reset the main secret key
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct ResetMainSecret {
    /// Encrypted private key of the new main secret
    pub encrypted_pri_key: ByteBuf,
    /// Public key of the new main secret
    pub l2_pub_key: PublicKey,
}

/// Create API secret
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(transparent)]
pub struct CreateApiSecret(pub PublicKey);

/// Destroy API secret
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(transparent)]
pub struct DestroyApiSecret(pub PublicKey);
