//! Profile
//!
//! The profile are defined in the NIP-01 and NIP-05. The content, as many
//! others, is encoded as JSON. Because the events are encoded as JSON, the
//! content is a string, not a nested object, but instead a double encoding JSON
//! object
use serde::{Deserialize, Serialize};

/// Profile as defined as NIP-01. NIP-05. Most properties are optional
#[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize, Default)]
pub struct Profile {
    /// Displaying name
    #[serde(skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// User biography
    #[serde(skip_serializing_if = "Option::is_none")]
    pub about: Option<String>,
    /// User name
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Picture. It must be an external
    #[serde(skip_serializing_if = "Option::is_none")]
    pub picture: Option<String>,
    /// Lightning payment address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lud06: Option<String>,
    /// Website definition
    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<String>,
    /// Where the NIP-05
    #[serde(skip_serializing_if = "Option::is_none")]
    pub nip05: Option<String>,
}
