Struct spl_token_client::token::Token
source · pub struct Token<T> { /* private fields */ }
Implementations§
source§impl<T> Token<T>where
T: SendTransaction + SimulateTransaction,
impl<T> Token<T>where
T: SendTransaction + SimulateTransaction,
pub fn new( client: Arc<dyn ProgramClient<T>>, program_id: &Pubkey, address: &Pubkey, decimals: Option<u8>, payer: Arc<dyn Signer> ) -> Self
pub fn new_native( client: Arc<dyn ProgramClient<T>>, program_id: &Pubkey, payer: Arc<dyn Signer> ) -> Self
pub fn is_native(&self) -> bool
sourcepub fn get_address(&self) -> &Pubkey
pub fn get_address(&self) -> &Pubkey
Get token address.
pub fn with_payer(self, payer: Arc<dyn Signer>) -> Self
pub fn with_nonce( self, nonce_account: &Pubkey, nonce_authority: Arc<dyn Signer>, nonce_blockhash: &Hash ) -> Self
pub fn with_transfer_hook_accounts( self, transfer_hook_accounts: Vec<AccountMeta> ) -> Self
pub fn with_compute_unit_price(self, compute_unit_price: u64) -> Self
pub fn with_compute_unit_limit( self, compute_unit_limit: ComputeUnitLimit ) -> Self
pub fn with_memo<M: AsRef<str>>(&self, memo: M, signers: Vec<Pubkey>) -> &Self
pub async fn get_new_latest_blockhash(&self) -> TokenResult<Hash>
pub async fn simulate_ixs<S: Signers>( &self, token_instructions: &[Instruction], signing_keypairs: &S ) -> TokenResult<T::SimulationOutput>
pub async fn process_ixs<S: Signers>( &self, token_instructions: &[Instruction], signing_keypairs: &S ) -> TokenResult<T::Output>
pub async fn create_mint<'a, S: Signers>( &self, mint_authority: &'a Pubkey, freeze_authority: Option<&'a Pubkey>, extension_initialization_params: Vec<ExtensionInitializationParams>, signing_keypairs: &S ) -> TokenResult<T::Output>
sourcepub async fn create_native_mint(
client: Arc<dyn ProgramClient<T>>,
program_id: &Pubkey,
payer: Arc<dyn Signer>
) -> TokenResult<Self>
pub async fn create_native_mint( client: Arc<dyn ProgramClient<T>>, program_id: &Pubkey, payer: Arc<dyn Signer> ) -> TokenResult<Self>
Create native mint
sourcepub async fn create_multisig(
&self,
account: &dyn Signer,
multisig_members: &[&Pubkey],
minimum_signers: u8
) -> TokenResult<T::Output>
pub async fn create_multisig( &self, account: &dyn Signer, multisig_members: &[&Pubkey], minimum_signers: u8 ) -> TokenResult<T::Output>
Create multisig
sourcepub fn get_associated_token_address(&self, owner: &Pubkey) -> Pubkey
pub fn get_associated_token_address(&self, owner: &Pubkey) -> Pubkey
Get the address for the associated token account.
sourcepub async fn create_associated_token_account(
&self,
owner: &Pubkey
) -> TokenResult<T::Output>
pub async fn create_associated_token_account( &self, owner: &Pubkey ) -> TokenResult<T::Output>
Create and initialize the associated account.
sourcepub async fn create_auxiliary_token_account(
&self,
account: &dyn Signer,
owner: &Pubkey
) -> TokenResult<T::Output>
pub async fn create_auxiliary_token_account( &self, account: &dyn Signer, owner: &Pubkey ) -> TokenResult<T::Output>
Create and initialize a new token account.
sourcepub async fn create_auxiliary_token_account_with_extension_space(
&self,
account: &dyn Signer,
owner: &Pubkey,
extensions: Vec<ExtensionType>
) -> TokenResult<T::Output>
pub async fn create_auxiliary_token_account_with_extension_space( &self, account: &dyn Signer, owner: &Pubkey, extensions: Vec<ExtensionType> ) -> TokenResult<T::Output>
Create and initialize a new token account.
sourcepub async fn get_account(&self, account: Pubkey) -> TokenResult<BaseAccount>
pub async fn get_account(&self, account: Pubkey) -> TokenResult<BaseAccount>
Retrieve a raw account
sourcepub async fn get_mint_info(&self) -> TokenResult<StateWithExtensionsOwned<Mint>>
pub async fn get_mint_info(&self) -> TokenResult<StateWithExtensionsOwned<Mint>>
Retrive mint information.
sourcepub async fn get_account_info(
&self,
account: &Pubkey
) -> TokenResult<StateWithExtensionsOwned<Account>>
pub async fn get_account_info( &self, account: &Pubkey ) -> TokenResult<StateWithExtensionsOwned<Account>>
Retrieve account information.
sourcepub async fn get_or_create_associated_account_info(
&self,
owner: &Pubkey
) -> TokenResult<StateWithExtensionsOwned<Account>>
pub async fn get_or_create_associated_account_info( &self, owner: &Pubkey ) -> TokenResult<StateWithExtensionsOwned<Account>>
Retrieve the associated account or create one if not found.
Assign a new authority to the account.
sourcepub async fn mint_to<S: Signers>(
&self,
destination: &Pubkey,
authority: &Pubkey,
amount: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn mint_to<S: Signers>( &self, destination: &Pubkey, authority: &Pubkey, amount: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Mint new tokens
sourcepub async fn transfer<S: Signers>(
&self,
source: &Pubkey,
destination: &Pubkey,
authority: &Pubkey,
amount: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn transfer<S: Signers>( &self, source: &Pubkey, destination: &Pubkey, authority: &Pubkey, amount: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens to another account
sourcepub async fn create_recipient_associated_account_and_transfer<S: Signers>(
&self,
source: &Pubkey,
destination: &Pubkey,
destination_owner: &Pubkey,
authority: &Pubkey,
amount: u64,
fee: Option<u64>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_recipient_associated_account_and_transfer<S: Signers>( &self, source: &Pubkey, destination: &Pubkey, destination_owner: &Pubkey, authority: &Pubkey, amount: u64, fee: Option<u64>, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens to an associated account, creating it if it does not exist
sourcepub async fn transfer_with_fee<S: Signers>(
&self,
source: &Pubkey,
destination: &Pubkey,
authority: &Pubkey,
amount: u64,
fee: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn transfer_with_fee<S: Signers>( &self, source: &Pubkey, destination: &Pubkey, authority: &Pubkey, amount: u64, fee: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens to another account, given an expected fee
sourcepub async fn burn<S: Signers>(
&self,
source: &Pubkey,
authority: &Pubkey,
amount: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn burn<S: Signers>( &self, source: &Pubkey, authority: &Pubkey, amount: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Burn tokens from account
sourcepub async fn approve<S: Signers>(
&self,
source: &Pubkey,
delegate: &Pubkey,
authority: &Pubkey,
amount: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn approve<S: Signers>( &self, source: &Pubkey, delegate: &Pubkey, authority: &Pubkey, amount: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Approve a delegate to spend tokens
sourcepub async fn revoke<S: Signers>(
&self,
source: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn revoke<S: Signers>( &self, source: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Revoke a delegate
sourcepub async fn close_account<S: Signers>(
&self,
account: &Pubkey,
lamports_destination: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn close_account<S: Signers>( &self, account: &Pubkey, lamports_destination: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Close an empty account and reclaim its lamports
sourcepub async fn empty_and_close_account<S: Signers>(
&self,
account_to_close: &Pubkey,
lamports_destination: &Pubkey,
tokens_destination: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn empty_and_close_account<S: Signers>( &self, account_to_close: &Pubkey, lamports_destination: &Pubkey, tokens_destination: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Close an account, reclaiming its lamports and tokens
sourcepub async fn freeze<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn freeze<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Freeze a token account
sourcepub async fn thaw<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn thaw<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Thaw / unfreeze a token account
sourcepub async fn wrap<S: Signers>(
&self,
account: &Pubkey,
owner: &Pubkey,
lamports: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn wrap<S: Signers>( &self, account: &Pubkey, owner: &Pubkey, lamports: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Wrap lamports into native account
sourcepub async fn wrap_with_mutable_ownership<S: Signers>(
&self,
account: &Pubkey,
owner: &Pubkey,
lamports: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn wrap_with_mutable_ownership<S: Signers>( &self, account: &Pubkey, owner: &Pubkey, lamports: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Wrap lamports into a native account that can always have its ownership changed
sourcepub async fn sync_native(&self, account: &Pubkey) -> TokenResult<T::Output>
pub async fn sync_native(&self, account: &Pubkey) -> TokenResult<T::Output>
Sync native account lamports
sourcepub async fn set_transfer_fee<S: Signers>(
&self,
authority: &Pubkey,
transfer_fee_basis_points: u16,
maximum_fee: u64,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn set_transfer_fee<S: Signers>( &self, authority: &Pubkey, transfer_fee_basis_points: u16, maximum_fee: u64, signing_keypairs: &S ) -> TokenResult<T::Output>
Set transfer fee
sourcepub async fn set_default_account_state<S: Signers>(
&self,
authority: &Pubkey,
state: &AccountState,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn set_default_account_state<S: Signers>( &self, authority: &Pubkey, state: &AccountState, signing_keypairs: &S ) -> TokenResult<T::Output>
Set default account state on mint
sourcepub async fn harvest_withheld_tokens_to_mint(
&self,
sources: &[&Pubkey]
) -> TokenResult<T::Output>
pub async fn harvest_withheld_tokens_to_mint( &self, sources: &[&Pubkey] ) -> TokenResult<T::Output>
Harvest withheld tokens to mint
sourcepub async fn withdraw_withheld_tokens_from_mint<S: Signers>(
&self,
destination: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn withdraw_withheld_tokens_from_mint<S: Signers>( &self, destination: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Withdraw withheld tokens from mint
sourcepub async fn withdraw_withheld_tokens_from_accounts<S: Signers>(
&self,
destination: &Pubkey,
authority: &Pubkey,
sources: &[&Pubkey],
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn withdraw_withheld_tokens_from_accounts<S: Signers>( &self, destination: &Pubkey, authority: &Pubkey, sources: &[&Pubkey], signing_keypairs: &S ) -> TokenResult<T::Output>
Withdraw withheld tokens from accounts
sourcepub async fn reallocate<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
extension_types: &[ExtensionType],
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn reallocate<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, extension_types: &[ExtensionType], signing_keypairs: &S ) -> TokenResult<T::Output>
Reallocate a token account to be large enough for a set of ExtensionTypes
sourcepub async fn enable_required_transfer_memos<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn enable_required_transfer_memos<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Require memos on transfers into this account
sourcepub async fn disable_required_transfer_memos<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn disable_required_transfer_memos<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Stop requiring memos on transfers into this account
sourcepub async fn enable_cpi_guard<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn enable_cpi_guard<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Prevent unsafe usage of token account through CPI
sourcepub async fn disable_cpi_guard<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn disable_cpi_guard<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Stop preventing unsafe usage of token account through CPI
sourcepub async fn update_interest_rate<S: Signers>(
&self,
authority: &Pubkey,
new_rate: i16,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn update_interest_rate<S: Signers>( &self, authority: &Pubkey, new_rate: i16, signing_keypairs: &S ) -> TokenResult<T::Output>
Update interest rate
sourcepub async fn update_transfer_hook_program_id<S: Signers>(
&self,
authority: &Pubkey,
new_program_id: Option<Pubkey>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn update_transfer_hook_program_id<S: Signers>( &self, authority: &Pubkey, new_program_id: Option<Pubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>
Update transfer hook program id
sourcepub async fn update_metadata_address<S: Signers>(
&self,
authority: &Pubkey,
new_metadata_address: Option<Pubkey>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn update_metadata_address<S: Signers>( &self, authority: &Pubkey, new_metadata_address: Option<Pubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>
Update metadata pointer address
sourcepub async fn update_group_address<S: Signers>(
&self,
authority: &Pubkey,
new_group_address: Option<Pubkey>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn update_group_address<S: Signers>( &self, authority: &Pubkey, new_group_address: Option<Pubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>
Update group pointer address
sourcepub async fn update_group_member_address<S: Signers>(
&self,
authority: &Pubkey,
new_member_address: Option<Pubkey>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn update_group_member_address<S: Signers>( &self, authority: &Pubkey, new_member_address: Option<Pubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>
Update group member pointer address
sourcepub async fn confidential_transfer_update_mint<S: Signers>(
&self,
authority: &Pubkey,
auto_approve_new_account: bool,
auditor_elgamal_pubkey: Option<PodElGamalPubkey>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_update_mint<S: Signers>( &self, authority: &Pubkey, auto_approve_new_account: bool, auditor_elgamal_pubkey: Option<PodElGamalPubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>
Update confidential transfer mint
sourcepub async fn confidential_transfer_configure_token_account<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
context_state_account: Option<&Pubkey>,
maximum_pending_balance_credit_counter: Option<u64>,
elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_configure_token_account<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, context_state_account: Option<&Pubkey>, maximum_pending_balance_credit_counter: Option<u64>, elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, signing_keypairs: &S ) -> TokenResult<T::Output>
Configures confidential transfers for a token account. If the maximum
pending balance credit counter for the extension is not provided,
then it is set to be a default value of 2^16
.
sourcepub async fn confidential_transfer_approve_account<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_approve_account<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Approves a token account for confidential transfers
sourcepub async fn confidential_transfer_empty_account<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
context_state_account: Option<&Pubkey>,
account_info: Option<EmptyAccountAccountInfo>,
elgamal_keypair: &ElGamalKeypair,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_empty_account<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, context_state_account: Option<&Pubkey>, account_info: Option<EmptyAccountAccountInfo>, elgamal_keypair: &ElGamalKeypair, signing_keypairs: &S ) -> TokenResult<T::Output>
Prepare a token account with the confidential transfer extension for closing
sourcepub async fn confidential_transfer_deposit<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
amount: u64,
decimals: u8,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_deposit<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, amount: u64, decimals: u8, signing_keypairs: &S ) -> TokenResult<T::Output>
Deposit SPL Tokens into the pending balance of a confidential token account
sourcepub async fn confidential_transfer_withdraw<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
context_state_account: Option<&Pubkey>,
withdraw_amount: u64,
decimals: u8,
account_info: Option<WithdrawAccountInfo>,
elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_withdraw<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, context_state_account: Option<&Pubkey>, withdraw_amount: u64, decimals: u8, account_info: Option<WithdrawAccountInfo>, elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, signing_keypairs: &S ) -> TokenResult<T::Output>
Withdraw SPL Tokens from the available balance of a confidential token account
sourcepub async fn create_withdraw_proof_context_state<S: Signer>(
&self,
context_state_account: &Pubkey,
context_state_authority: &Pubkey,
withdraw_proof_data: &WithdrawData,
withdraw_proof_signer: &S
) -> TokenResult<T::Output>
pub async fn create_withdraw_proof_context_state<S: Signer>( &self, context_state_account: &Pubkey, context_state_authority: &Pubkey, withdraw_proof_data: &WithdrawData, withdraw_proof_signer: &S ) -> TokenResult<T::Output>
Create withdraw proof context state account for a confidential transfer withdraw instruction.
sourcepub async fn confidential_transfer_transfer<S: Signers>(
&self,
source_account: &Pubkey,
destination_account: &Pubkey,
source_authority: &Pubkey,
context_state_account: Option<&Pubkey>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_elgamal_keypair: &ElGamalKeypair,
source_aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_transfer<S: Signers>( &self, source_account: &Pubkey, destination_account: &Pubkey, source_authority: &Pubkey, context_state_account: Option<&Pubkey>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_elgamal_keypair: &ElGamalKeypair, source_aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens confidentially
sourcepub async fn confidential_transfer_transfer_with_split_proofs<S: Signers>(
&self,
source_account: &Pubkey,
destination_account: &Pubkey,
source_authority: &Pubkey,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_aes_key: &AeKey,
source_decrypt_handles: &SourceDecryptHandles,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_transfer_with_split_proofs<S: Signers>( &self, source_account: &Pubkey, destination_account: &Pubkey, source_authority: &Pubkey, context_state_accounts: TransferSplitContextStateAccounts<'_>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_aes_key: &AeKey, source_decrypt_handles: &SourceDecryptHandles, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens confidentially using split proofs.
This function assumes that proof context states have already been created.
sourcepub async fn confidential_transfer_transfer_with_split_proofs_in_parallel<S: Signers>(
&self,
source_account: &Pubkey,
destination_account: &Pubkey,
source_authority: &Pubkey,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_elgamal_keypair: &ElGamalKeypair,
source_aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
equality_and_ciphertext_validity_proof_signers: &S,
range_proof_signers: &S
) -> TokenResult<(T::Output, T::Output)>
pub async fn confidential_transfer_transfer_with_split_proofs_in_parallel<S: Signers>( &self, source_account: &Pubkey, destination_account: &Pubkey, source_authority: &Pubkey, context_state_accounts: TransferSplitContextStateAccounts<'_>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_elgamal_keypair: &ElGamalKeypair, source_aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, equality_and_ciphertext_validity_proof_signers: &S, range_proof_signers: &S ) -> TokenResult<(T::Output, T::Output)>
Transfer tokens confidentially using split proofs in parallel
This function internally generates the ZK Token proof instructions to create the necessary proof context states.
sourcepub async fn create_equality_proof_context_state_for_transfer<S: Signer>(
&self,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
equality_proof_data: &CiphertextCommitmentEqualityProofData,
equality_proof_signer: &S
) -> TokenResult<T::Output>
pub async fn create_equality_proof_context_state_for_transfer<S: Signer>( &self, context_state_accounts: TransferSplitContextStateAccounts<'_>, equality_proof_data: &CiphertextCommitmentEqualityProofData, equality_proof_signer: &S ) -> TokenResult<T::Output>
Create equality proof context state account for a confidential transfer.
sourcepub async fn create_ciphertext_validity_proof_context_state_for_transfer<S: Signer>(
&self,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
ciphertext_validity_proof_signer: &S
) -> TokenResult<T::Output>
pub async fn create_ciphertext_validity_proof_context_state_for_transfer<S: Signer>( &self, context_state_accounts: TransferSplitContextStateAccounts<'_>, ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, ciphertext_validity_proof_signer: &S ) -> TokenResult<T::Output>
Create ciphertext validity proof context state account for a confidential transfer.
sourcepub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer<S: Signers>(
&self,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
equality_proof_data: &CiphertextCommitmentEqualityProofData,
ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer<S: Signers>( &self, context_state_accounts: TransferSplitContextStateAccounts<'_>, equality_proof_data: &CiphertextCommitmentEqualityProofData, ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, signing_keypairs: &S ) -> TokenResult<T::Output>
Create equality and ciphertext validity proof context state accounts for a confidential transfer.
sourcepub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer_parallel<S: Signers>(
&self,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
equality_proof_data: &CiphertextCommitmentEqualityProofData,
ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
transfer_instruction: &Instruction,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer_parallel<S: Signers>( &self, context_state_accounts: TransferSplitContextStateAccounts<'_>, equality_proof_data: &CiphertextCommitmentEqualityProofData, ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, transfer_instruction: &Instruction, signing_keypairs: &S ) -> TokenResult<T::Output>
Create equality and ciphertext validity proof context state accounts with a confidential transfer instruction.
sourcepub async fn create_range_proof_context_state_for_transfer<S: Signer>(
&self,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
range_proof_data: &BatchedRangeProofU128Data,
range_proof_keypair: &S
) -> TokenResult<T::Output>
pub async fn create_range_proof_context_state_for_transfer<S: Signer>( &self, context_state_accounts: TransferSplitContextStateAccounts<'_>, range_proof_data: &BatchedRangeProofU128Data, range_proof_keypair: &S ) -> TokenResult<T::Output>
Create a range proof context state account for a confidential transfer.
sourcepub async fn create_range_proof_context_state_for_transfer_parallel<S: Signers>(
&self,
context_state_accounts: TransferSplitContextStateAccounts<'_>,
range_proof_data: &BatchedRangeProofU128Data,
transfer_instruction: &Instruction,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_range_proof_context_state_for_transfer_parallel<S: Signers>( &self, context_state_accounts: TransferSplitContextStateAccounts<'_>, range_proof_data: &BatchedRangeProofU128Data, transfer_instruction: &Instruction, signing_keypairs: &S ) -> TokenResult<T::Output>
Create a range proof context state account with a confidential transfer instruction.
sourcepub async fn confidential_transfer_close_context_state<S: Signers>(
&self,
context_state_account: &Pubkey,
lamport_destination_account: &Pubkey,
context_state_authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_close_context_state<S: Signers>( &self, context_state_account: &Pubkey, lamport_destination_account: &Pubkey, context_state_authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Close a ZK Token proof program context state
sourcepub async fn confidential_transfer_transfer_with_fee<S: Signers>(
&self,
source_account: &Pubkey,
destination_account: &Pubkey,
source_authority: &Pubkey,
context_state_account: Option<&Pubkey>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_elgamal_keypair: &ElGamalKeypair,
source_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,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_transfer_with_fee<S: Signers>( &self, source_account: &Pubkey, destination_account: &Pubkey, source_authority: &Pubkey, context_state_account: Option<&Pubkey>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_elgamal_keypair: &ElGamalKeypair, source_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, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens confidentially with fee
sourcepub async fn confidential_transfer_transfer_with_fee_and_split_proofs<S: Signers>(
&self,
source_account: &Pubkey,
destination_account: &Pubkey,
source_authority: &Pubkey,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_aes_key: &AeKey,
source_decrypt_handles: &SourceDecryptHandles,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_transfer_with_fee_and_split_proofs<S: Signers>( &self, source_account: &Pubkey, destination_account: &Pubkey, source_authority: &Pubkey, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_aes_key: &AeKey, source_decrypt_handles: &SourceDecryptHandles, signing_keypairs: &S ) -> TokenResult<T::Output>
Transfer tokens confidentially with fee using split proofs.
This function assumes that proof context states have already been created.
sourcepub async fn confidential_transfer_transfer_with_fee_and_split_proofs_in_parallel<S: Signers>(
&self,
source_account: &Pubkey,
destination_account: &Pubkey,
source_authority: &Pubkey,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_elgamal_keypair: &ElGamalKeypair,
source_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,
equality_and_ciphertext_validity_proof_signers: &S,
fee_sigma_proof_signers: &S,
range_proof_signers: &S
) -> TokenResult<(T::Output, T::Output, T::Output)>
pub async fn confidential_transfer_transfer_with_fee_and_split_proofs_in_parallel<S: Signers>( &self, source_account: &Pubkey, destination_account: &Pubkey, source_authority: &Pubkey, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_elgamal_keypair: &ElGamalKeypair, source_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, equality_and_ciphertext_validity_proof_signers: &S, fee_sigma_proof_signers: &S, range_proof_signers: &S ) -> TokenResult<(T::Output, T::Output, T::Output)>
Transfer tokens confidentially using split proofs in parallel
This function internally generates the ZK Token proof instructions to create the necessary proof context states.
sourcepub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer_with_fee<S: Signers>(
&self,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
equality_proof_data: &CiphertextCommitmentEqualityProofData,
ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer_with_fee<S: Signers>( &self, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, equality_proof_data: &CiphertextCommitmentEqualityProofData, ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, signing_keypairs: &S ) -> TokenResult<T::Output>
Create equality and transfer amount ciphertext validity proof context state accounts for a confidential transfer with fee.
sourcepub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer_with_fee_parallel<S: Signers>(
&self,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
equality_proof_data: &CiphertextCommitmentEqualityProofData,
ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
transfer_instruction: &Instruction,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_equality_and_ciphertext_validity_proof_context_states_for_transfer_with_fee_parallel<S: Signers>( &self, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, equality_proof_data: &CiphertextCommitmentEqualityProofData, ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, transfer_instruction: &Instruction, signing_keypairs: &S ) -> TokenResult<T::Output>
Create equality and transfer amount ciphertext validity proof context state accounts with a confidential transfer instruction.
sourcepub async fn create_fee_sigma_and_ciphertext_validity_proof_context_states_for_transfer_with_fee<S: Signers>(
&self,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
fee_sigma_proof_data: &FeeSigmaProofData,
fee_ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_fee_sigma_and_ciphertext_validity_proof_context_states_for_transfer_with_fee<S: Signers>( &self, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, fee_sigma_proof_data: &FeeSigmaProofData, fee_ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, signing_keypairs: &S ) -> TokenResult<T::Output>
Create fee sigma and fee ciphertext validity proof context state accounts for a confidential transfer with fee.
sourcepub async fn create_fee_sigma_and_ciphertext_validity_proof_context_states_for_transfer_with_fee_parallel<S: Signers>(
&self,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
fee_sigma_proof_data: &FeeSigmaProofData,
fee_ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData,
transfer_instruction: &Instruction,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_fee_sigma_and_ciphertext_validity_proof_context_states_for_transfer_with_fee_parallel<S: Signers>( &self, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, fee_sigma_proof_data: &FeeSigmaProofData, fee_ciphertext_validity_proof_data: &BatchedGroupedCiphertext2HandlesValidityProofData, transfer_instruction: &Instruction, signing_keypairs: &S ) -> TokenResult<T::Output>
Create fee sigma and fee ciphertext validity proof context state accounts with a confidential transfer with fee.
sourcepub async fn create_range_proof_context_state_for_transfer_with_fee<S: Signers>(
&self,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
range_proof_data: &BatchedRangeProofU256Data,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_range_proof_context_state_for_transfer_with_fee<S: Signers>( &self, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, range_proof_data: &BatchedRangeProofU256Data, signing_keypairs: &S ) -> TokenResult<T::Output>
Create range proof context state account for a confidential transfer with fee.
sourcepub async fn create_range_proof_context_state_for_transfer_with_fee_parallel<S: Signers>(
&self,
context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>,
range_proof_data: &BatchedRangeProofU256Data,
transfer_instruction: &Instruction,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn create_range_proof_context_state_for_transfer_with_fee_parallel<S: Signers>( &self, context_state_accounts: TransferWithFeeSplitContextStateAccounts<'_>, range_proof_data: &BatchedRangeProofU256Data, transfer_instruction: &Instruction, signing_keypairs: &S ) -> TokenResult<T::Output>
Create range proof context state account for a confidential transfer with fee.
sourcepub async fn confidential_transfer_apply_pending_balance<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
account_info: Option<ApplyPendingBalanceAccountInfo>,
elgamal_secret_key: &ElGamalSecretKey,
aes_key: &AeKey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_apply_pending_balance<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, account_info: Option<ApplyPendingBalanceAccountInfo>, elgamal_secret_key: &ElGamalSecretKey, aes_key: &AeKey, signing_keypairs: &S ) -> TokenResult<T::Output>
Applies the confidential transfer pending balance to the available balance
sourcepub async fn confidential_transfer_enable_confidential_credits<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_enable_confidential_credits<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Enable confidential transfer Deposit
and Transfer
instructions for a
token account
sourcepub async fn confidential_transfer_disable_confidential_credits<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_disable_confidential_credits<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Disable confidential transfer Deposit
and Transfer
instructions for
a token account
sourcepub async fn confidential_transfer_enable_non_confidential_credits<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_enable_non_confidential_credits<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Enable a confidential extension token account to receive non-confidential payments
sourcepub async fn confidential_transfer_disable_non_confidential_credits<S: Signers>(
&self,
account: &Pubkey,
authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_disable_non_confidential_credits<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Disable non-confidential payments for a confidential extension token account
sourcepub async fn confidential_transfer_withdraw_withheld_tokens_from_mint<S: Signers>(
&self,
destination_account: &Pubkey,
withdraw_withheld_authority: &Pubkey,
context_state_account: Option<&Pubkey>,
withheld_tokens_info: Option<WithheldTokensInfo>,
withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair,
destination_elgamal_pubkey: &ElGamalPubkey,
new_decryptable_available_balance: &DecryptableBalance,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_withdraw_withheld_tokens_from_mint<S: Signers>( &self, destination_account: &Pubkey, withdraw_withheld_authority: &Pubkey, context_state_account: Option<&Pubkey>, withheld_tokens_info: Option<WithheldTokensInfo>, withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair, destination_elgamal_pubkey: &ElGamalPubkey, new_decryptable_available_balance: &DecryptableBalance, signing_keypairs: &S ) -> TokenResult<T::Output>
Withdraw withheld confidential tokens from mint
sourcepub async fn confidential_transfer_withdraw_withheld_tokens_from_accounts<S: Signers>(
&self,
destination_account: &Pubkey,
withdraw_withheld_authority: &Pubkey,
context_state_account: Option<&Pubkey>,
withheld_tokens_info: Option<WithheldTokensInfo>,
withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair,
destination_elgamal_pubkey: &ElGamalPubkey,
new_decryptable_available_balance: &DecryptableBalance,
sources: &[&Pubkey],
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_withdraw_withheld_tokens_from_accounts<S: Signers>( &self, destination_account: &Pubkey, withdraw_withheld_authority: &Pubkey, context_state_account: Option<&Pubkey>, withheld_tokens_info: Option<WithheldTokensInfo>, withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair, destination_elgamal_pubkey: &ElGamalPubkey, new_decryptable_available_balance: &DecryptableBalance, sources: &[&Pubkey], signing_keypairs: &S ) -> TokenResult<T::Output>
Withdraw withheld confidential tokens from accounts
sourcepub async fn confidential_transfer_harvest_withheld_tokens_to_mint(
&self,
sources: &[&Pubkey]
) -> TokenResult<T::Output>
pub async fn confidential_transfer_harvest_withheld_tokens_to_mint( &self, sources: &[&Pubkey] ) -> TokenResult<T::Output>
Harvest withheld confidential tokens to mint
sourcepub async fn confidential_transfer_enable_harvest_to_mint<S: Signers>(
&self,
withdraw_withheld_authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_enable_harvest_to_mint<S: Signers>( &self, withdraw_withheld_authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Enable harvest of confidential fees to mint
sourcepub async fn confidential_transfer_disable_harvest_to_mint<S: Signers>(
&self,
withdraw_withheld_authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn confidential_transfer_disable_harvest_to_mint<S: Signers>( &self, withdraw_withheld_authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Disable harvest of confidential fees to mint
pub async fn withdraw_excess_lamports<S: Signers>( &self, source: &Pubkey, destination: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
sourcepub async fn token_metadata_initialize<S: Signers>(
&self,
update_authority: &Pubkey,
mint_authority: &Pubkey,
name: String,
symbol: String,
uri: String,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_metadata_initialize<S: Signers>( &self, update_authority: &Pubkey, mint_authority: &Pubkey, name: String, symbol: String, uri: String, signing_keypairs: &S ) -> TokenResult<T::Output>
Initialize token-metadata on a mint
sourcepub async fn token_metadata_initialize_with_rent_transfer<S: Signers>(
&self,
payer: &Pubkey,
update_authority: &Pubkey,
mint_authority: &Pubkey,
name: String,
symbol: String,
uri: String,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_metadata_initialize_with_rent_transfer<S: Signers>( &self, payer: &Pubkey, update_authority: &Pubkey, mint_authority: &Pubkey, name: String, symbol: String, uri: String, signing_keypairs: &S ) -> TokenResult<T::Output>
Initialize token-metadata on a mint
sourcepub async fn token_metadata_update_field<S: Signers>(
&self,
update_authority: &Pubkey,
field: Field,
value: String,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_metadata_update_field<S: Signers>( &self, update_authority: &Pubkey, field: Field, value: String, signing_keypairs: &S ) -> TokenResult<T::Output>
Update a token-metadata field on a mint
sourcepub async fn token_metadata_update_field_with_rent_transfer<S: Signers>(
&self,
payer: &Pubkey,
update_authority: &Pubkey,
field: Field,
value: String,
transfer_lamports: Option<u64>,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_metadata_update_field_with_rent_transfer<S: Signers>( &self, payer: &Pubkey, update_authority: &Pubkey, field: Field, value: String, transfer_lamports: Option<u64>, signing_keypairs: &S ) -> TokenResult<T::Output>
Update a token-metadata field on a mint. Includes a transfer for any additional rent-exempt SOL required.
Update the token-metadata authority in a mint
sourcepub async fn token_metadata_remove_key<S: Signers>(
&self,
update_authority: &Pubkey,
key: String,
idempotent: bool,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_metadata_remove_key<S: Signers>( &self, update_authority: &Pubkey, key: String, idempotent: bool, signing_keypairs: &S ) -> TokenResult<T::Output>
Remove a token-metadata field on a mint
sourcepub async fn token_group_initialize<S: Signers>(
&self,
mint_authority: &Pubkey,
update_authority: &Pubkey,
max_size: u32,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_group_initialize<S: Signers>( &self, mint_authority: &Pubkey, update_authority: &Pubkey, max_size: u32, signing_keypairs: &S ) -> TokenResult<T::Output>
Initialize token-group on a mint
sourcepub async fn token_group_initialize_with_rent_transfer<S: Signers>(
&self,
payer: &Pubkey,
mint_authority: &Pubkey,
update_authority: &Pubkey,
max_size: u32,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_group_initialize_with_rent_transfer<S: Signers>( &self, payer: &Pubkey, mint_authority: &Pubkey, update_authority: &Pubkey, max_size: u32, signing_keypairs: &S ) -> TokenResult<T::Output>
Initialize token-group on a mint
sourcepub async fn token_group_update_max_size<S: Signers>(
&self,
update_authority: &Pubkey,
new_max_size: u32,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_group_update_max_size<S: Signers>( &self, update_authority: &Pubkey, new_max_size: u32, signing_keypairs: &S ) -> TokenResult<T::Output>
Update a token-group max size on a mint
Update the token-group authority in a mint
sourcepub async fn token_group_initialize_member<S: Signers>(
&self,
mint_authority: &Pubkey,
group_mint: &Pubkey,
group_update_authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_group_initialize_member<S: Signers>( &self, mint_authority: &Pubkey, group_mint: &Pubkey, group_update_authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Initialize a token-group member on a mint
sourcepub async fn token_group_initialize_member_with_rent_transfer<S: Signers>(
&self,
payer: &Pubkey,
mint_authority: &Pubkey,
group_mint: &Pubkey,
group_update_authority: &Pubkey,
signing_keypairs: &S
) -> TokenResult<T::Output>
pub async fn token_group_initialize_member_with_rent_transfer<S: Signers>( &self, payer: &Pubkey, mint_authority: &Pubkey, group_mint: &Pubkey, group_update_authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>
Initialize a token-group member on a mint
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Token<T>
impl<T> !RefUnwindSafe for Token<T>
impl<T> !Send for Token<T>
impl<T> !Sync for Token<T>
impl<T> Unpin for Token<T>
impl<T> !UnwindSafe for Token<T>
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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