Skip to main content

relay_core/
crypto_meta.rs

1use serde::{Deserialize, Serialize};
2
3/// Information about the cryptography used to encrypt the message.
4#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
5pub struct CryptoMeta {
6    /// Algorithm used for encryption (e.g., "x25519-hkdf-sha256-xchacha20poly1305").
7    pub alg: String,
8    /// Recipient identifier (e.g., public key, fingerprint, or address).
9    pub recipient: String,
10    /// The sender's ephemeral public key used in the encryption process.
11    pub sender_ephemeral: Vec<u8>,
12    /// Nonce used for the encryption.
13    pub nonce: Vec<u8>,
14}