#[repr(C)]pub struct ConfidentialTransferAccount {
pub approved: PodBool,
pub pubkey_elgamal: EncryptionPubkey,
pub pending_balance: EncryptedBalance,
pub available_balance: EncryptedBalance,
pub decryptable_available_balance: DecryptableBalance,
pub allow_balance_credits: PodBool,
pub pending_balance_credit_counter: PodU64,
pub expected_pending_balance_credit_counter: PodU64,
pub actual_pending_balance_credit_counter: PodU64,
pub withheld_amount: EncryptedWithheldAmount,
}
Expand description
Confidential account state
Fields
approved: PodBool
true
if this account has been approved for use. All confidential transfer operations for
the account will fail until approval is granted.
pubkey_elgamal: EncryptionPubkey
The public key associated with ElGamal encryption
pending_balance: EncryptedBalance
The pending balance (encrypted by pubkey_elgamal
)
available_balance: EncryptedBalance
The available balance (encrypted by pubkey_elgamal
)
decryptable_available_balance: DecryptableBalance
The decryptable available balance
allow_balance_credits: PodBool
pending_balance
may only be credited by Deposit
or Transfer
instructions if true
pending_balance_credit_counter: PodU64
The total number of Deposit
and Transfer
instructions that have credited pending_balance
expected_pending_balance_credit_counter: PodU64
The expected_pending_balance_credit_counter
value that was included in the last
ApplyPendingBalance
instruction
actual_pending_balance_credit_counter: PodU64
The actual pending_balance_credit_counter
when the last ApplyPendingBalance
instruction was executed
withheld_amount: EncryptedWithheldAmount
The withheld amount of fees. This will always be zero if fees are never enabled.
Implementations
sourceimpl ConfidentialTransferAccount
impl ConfidentialTransferAccount
sourcepub fn approved(&self) -> ProgramResult
pub fn approved(&self) -> ProgramResult
Check if a ConfidentialTransferAccount
has been approved for use
sourcepub fn closable(&self) -> ProgramResult
pub fn closable(&self) -> ProgramResult
Check if a ConfidentialTransferAccount
is in a closable state
Trait Implementations
sourceimpl Clone for ConfidentialTransferAccount
impl Clone for ConfidentialTransferAccount
sourcefn clone(&self) -> ConfidentialTransferAccount
fn clone(&self) -> ConfidentialTransferAccount
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ConfidentialTransferAccount
impl Debug for ConfidentialTransferAccount
sourceimpl Default for ConfidentialTransferAccount
impl Default for ConfidentialTransferAccount
sourcefn default() -> ConfidentialTransferAccount
fn default() -> ConfidentialTransferAccount
Returns the “default value” for a type. Read more
sourceimpl Extension for ConfidentialTransferAccount
impl Extension for ConfidentialTransferAccount
sourceconst TYPE: ExtensionType
const TYPE: ExtensionType
Associated extension type enum, checked at the start of TLV entries
sourceimpl PartialEq<ConfidentialTransferAccount> for ConfidentialTransferAccount
impl PartialEq<ConfidentialTransferAccount> for ConfidentialTransferAccount
sourcefn eq(&self, other: &ConfidentialTransferAccount) -> bool
fn eq(&self, other: &ConfidentialTransferAccount) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ConfidentialTransferAccount) -> bool
fn ne(&self, other: &ConfidentialTransferAccount) -> bool
This method tests for !=
.
impl Copy for ConfidentialTransferAccount
impl Pod for ConfidentialTransferAccount
impl StructuralPartialEq for ConfidentialTransferAccount
Auto Trait Implementations
impl RefUnwindSafe for ConfidentialTransferAccount
impl Send for ConfidentialTransferAccount
impl Sync for ConfidentialTransferAccount
impl Unpin for ConfidentialTransferAccount
impl UnwindSafe for ConfidentialTransferAccount
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more