spl_token_2022/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 Extension processor
14pub mod processor;
15
16/// Confidential Mint-Burn proof verification
17pub mod verify_proof;
18
19/// Confidential Mint Burn Extension supply information needed for instructions
20#[cfg(not(target_os = "solana"))]
21pub mod account_info;
22
23/// Confidential mint-burn mint configuration
24#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)]
25#[repr(C)]
26pub struct ConfidentialMintBurn {
27    /// The confidential supply of the mint (encrypted by `encryption_pubkey`)
28    pub confidential_supply: PodElGamalCiphertext,
29    /// The decryptable confidential supply of the mint
30    pub decryptable_supply: PodAeCiphertext,
31    /// The ElGamal pubkey used to encrypt the confidential supply
32    pub supply_elgamal_pubkey: PodElGamalPubkey,
33    /// The amount of burn amounts not yet aggregated into the confidential supply
34    pub pending_burn: PodElGamalCiphertext,
35}
36
37impl Extension for ConfidentialMintBurn {
38    const TYPE: ExtensionType = ExtensionType::ConfidentialMintBurn;
39}