#[repr(C)]pub struct SupplyAccountInfo {
pub current_supply: PodElGamalCiphertext,
pub decryptable_supply: PodAeCiphertext,
pub supply_elgamal_pubkey: PodElGamalPubkey,
}
Expand description
Confidential Mint Burn extension information needed to construct a
RotateSupplyElgamalPubkey
instruction.
Fields§
§current_supply: PodElGamalCiphertext
The available balance (encrypted by supply_elgamal_pubkey
)
decryptable_supply: PodAeCiphertext
The decryptable supply
supply_elgamal_pubkey: PodElGamalPubkey
The supply’s elgamal pubkey
Implementations§
Source§impl SupplyAccountInfo
impl SupplyAccountInfo
Sourcepub fn new(extension: &ConfidentialMintBurn) -> Self
pub fn new(extension: &ConfidentialMintBurn) -> Self
Creates a SupplyAccountInfo from ConfidentialMintBurn extension account data
Sourcepub fn decrypt_current_supply(
&self,
aes_key: &AeKey,
elgamal_keypair: &ElGamalKeypair,
) -> Result<u64, TokenError>
pub fn decrypt_current_supply( &self, aes_key: &AeKey, elgamal_keypair: &ElGamalKeypair, ) -> Result<u64, TokenError>
Computes the current supply from the decryptable supply and the difference between the decryptable supply and the elgamal encrypted supply ciphertext
Sourcepub fn generate_rotate_supply_elgamal_pubkey_proof(
&self,
aes_key: &AeKey,
current_supply_elgamal_keypair: &ElGamalKeypair,
new_supply_elgamal_keypair: &ElGamalKeypair,
) -> Result<CiphertextCiphertextEqualityProofData, TokenError>
pub fn generate_rotate_supply_elgamal_pubkey_proof( &self, aes_key: &AeKey, current_supply_elgamal_keypair: &ElGamalKeypair, new_supply_elgamal_keypair: &ElGamalKeypair, ) -> Result<CiphertextCiphertextEqualityProofData, TokenError>
Generates the CiphertextCiphertextEqualityProofData
needed for a
RotateSupplyElgamalPubkey
instruction
Trait Implementations§
Source§impl Clone for SupplyAccountInfo
impl Clone for SupplyAccountInfo
Source§fn clone(&self) -> SupplyAccountInfo
fn clone(&self) -> SupplyAccountInfo
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SupplyAccountInfo
impl Debug for SupplyAccountInfo
Source§impl Default for SupplyAccountInfo
impl Default for SupplyAccountInfo
Source§fn default() -> SupplyAccountInfo
fn default() -> SupplyAccountInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for SupplyAccountInfo
impl PartialEq for SupplyAccountInfo
impl Copy for SupplyAccountInfo
impl Pod for SupplyAccountInfo
impl StructuralPartialEq for SupplyAccountInfo
Auto Trait Implementations§
impl Freeze for SupplyAccountInfo
impl RefUnwindSafe for SupplyAccountInfo
impl Send for SupplyAccountInfo
impl Sync for SupplyAccountInfo
impl Unpin for SupplyAccountInfo
impl UnwindSafe for SupplyAccountInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more