spl_token_2022_interface/extension/confidential_mint_burn/
mod.rs

1use {
2    crate::extension::{Extension, ExtensionType},
3    bytemuck::{Pod, Zeroable},
4    solana_zk_sdk::encryption::pod::{
5        auth_encryption::PodAeCiphertext,
6        elgamal::{PodElGamalCiphertext, PodElGamalPubkey},
7    },
8};
9
10/// Confidential Mint-Burn Extension instructions
11pub mod instruction;
12
13/// Confidential mint-burn mint configuration
14#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)]
15#[repr(C)]
16pub struct ConfidentialMintBurn {
17    /// The confidential supply of the mint (encrypted by `encryption_pubkey`)
18    pub confidential_supply: PodElGamalCiphertext,
19    /// The decryptable confidential supply of the mint
20    pub decryptable_supply: PodAeCiphertext,
21    /// The ElGamal pubkey used to encrypt the confidential supply
22    pub supply_elgamal_pubkey: PodElGamalPubkey,
23    /// The amount of burn amounts not yet aggregated into the confidential supply
24    pub pending_burn: PodElGamalCiphertext,
25}
26
27impl Extension for ConfidentialMintBurn {
28    const TYPE: ExtensionType = ExtensionType::ConfidentialMintBurn;
29}