#[repr(C)]pub struct TransferAccountInfo {
pub available_balance: EncryptedBalance,
pub decryptable_available_balance: DecryptableBalance,
}
Expand description
Confidential Transfer extension information needed to construct a Transfer
instruction.
Fields§
§available_balance: EncryptedBalance
The available balance (encrypted by encrypiton_pubkey
)
decryptable_available_balance: DecryptableBalance
The decryptable available balance
Implementations§
source§impl TransferAccountInfo
impl TransferAccountInfo
sourcepub fn new(account: &ConfidentialTransferAccount) -> Self
pub fn new(account: &ConfidentialTransferAccount) -> Self
Create the Transfer
instruction account information from
ConfidentialTransferAccount
.
sourcepub fn generate_transfer_proof_data(
&self,
transfer_amount: u64,
elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
) -> Result<TransferData, TokenError>
pub fn generate_transfer_proof_data( &self, transfer_amount: u64, elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, ) -> Result<TransferData, TokenError>
Create a transfer proof data.
sourcepub fn generate_split_transfer_proof_data(
&self,
transfer_amount: u64,
source_elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
) -> Result<(CiphertextCommitmentEqualityProofData, BatchedGroupedCiphertext2HandlesValidityProofData, BatchedRangeProofU128Data, SourceDecryptHandles), TokenError>
pub fn generate_split_transfer_proof_data( &self, transfer_amount: u64, source_elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, ) -> Result<(CiphertextCommitmentEqualityProofData, BatchedGroupedCiphertext2HandlesValidityProofData, BatchedRangeProofU128Data, SourceDecryptHandles), TokenError>
Create a transfer proof data that is split into equality, ciphertext validity, and range proofs.
sourcepub fn generate_transfer_with_fee_proof_data(
&self,
transfer_amount: u64,
elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
withdraw_withheld_authority_elgamal_pubkey: &ElGamalPubkey,
fee_rate_basis_points: u16,
maximum_fee: u64,
) -> Result<TransferWithFeeData, TokenError>
pub fn generate_transfer_with_fee_proof_data( &self, transfer_amount: u64, elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, withdraw_withheld_authority_elgamal_pubkey: &ElGamalPubkey, fee_rate_basis_points: u16, maximum_fee: u64, ) -> Result<TransferWithFeeData, TokenError>
Create a transfer with fee proof data
sourcepub fn new_decryptable_available_balance(
&self,
transfer_amount: u64,
aes_key: &AeKey,
) -> Result<AeCiphertext, TokenError>
pub fn new_decryptable_available_balance( &self, transfer_amount: u64, aes_key: &AeKey, ) -> Result<AeCiphertext, TokenError>
Update the decryptable available balance.
Trait Implementations§
source§impl Clone for TransferAccountInfo
impl Clone for TransferAccountInfo
source§fn clone(&self) -> TransferAccountInfo
fn clone(&self) -> TransferAccountInfo
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 TransferAccountInfo
impl Debug for TransferAccountInfo
source§impl Default for TransferAccountInfo
impl Default for TransferAccountInfo
source§fn default() -> TransferAccountInfo
fn default() -> TransferAccountInfo
Returns the “default value” for a type. Read more
source§impl PartialEq for TransferAccountInfo
impl PartialEq for TransferAccountInfo
source§fn eq(&self, other: &TransferAccountInfo) -> bool
fn eq(&self, other: &TransferAccountInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TransferAccountInfo
impl Pod for TransferAccountInfo
impl StructuralPartialEq for TransferAccountInfo
Auto Trait Implementations§
impl Freeze for TransferAccountInfo
impl RefUnwindSafe for TransferAccountInfo
impl Send for TransferAccountInfo
impl Sync for TransferAccountInfo
impl Unpin for TransferAccountInfo
impl UnwindSafe for TransferAccountInfo
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,
§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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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