Struct spl_token_client::token::Token

source ·
pub struct Token<T> { /* private fields */ }

Implementations§

source§

impl<T> Token<T>

source

pub fn new( client: Arc<dyn ProgramClient<T>>, program_id: &Pubkey, address: &Pubkey, decimals: Option<u8>, payer: Arc<dyn Signer> ) -> Self

source

pub fn new_native( client: Arc<dyn ProgramClient<T>>, program_id: &Pubkey, payer: Arc<dyn Signer> ) -> Self

source

pub fn is_native(&self) -> bool

source

pub fn get_address(&self) -> &Pubkey

Get token address.

source

pub fn with_payer(self, payer: Arc<dyn Signer>) -> Self

source

pub fn with_nonce( self, nonce_account: &Pubkey, nonce_authority: Arc<dyn Signer>, nonce_blockhash: &Hash ) -> Self

source

pub fn with_transfer_hook_accounts( self, transfer_hook_accounts: Vec<AccountMeta> ) -> Self

source

pub fn with_compute_unit_price(self, compute_unit_price: u64) -> Self

source

pub fn with_compute_unit_limit( self, compute_unit_limit: ComputeUnitLimit ) -> Self

source

pub fn with_memo<M: AsRef<str>>(&self, memo: M, signers: Vec<Pubkey>) -> &Self

source

pub async fn get_new_latest_blockhash(&self) -> TokenResult<Hash>

source

pub async fn simulate_ixs<S: Signers>( &self, token_instructions: &[Instruction], signing_keypairs: &S ) -> TokenResult<T::SimulationOutput>

source

pub async fn process_ixs<S: Signers>( &self, token_instructions: &[Instruction], signing_keypairs: &S ) -> TokenResult<T::Output>

source

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>

source

pub async fn create_native_mint( client: Arc<dyn ProgramClient<T>>, program_id: &Pubkey, payer: Arc<dyn Signer> ) -> TokenResult<Self>

Create native mint

source

pub async fn create_multisig( &self, account: &dyn Signer, multisig_members: &[&Pubkey], minimum_signers: u8 ) -> TokenResult<T::Output>

Create multisig

source

pub fn get_associated_token_address(&self, owner: &Pubkey) -> Pubkey

Get the address for the associated token account.

source

pub async fn create_associated_token_account( &self, owner: &Pubkey ) -> TokenResult<T::Output>

Create and initialize the associated account.

source

pub async fn create_auxiliary_token_account( &self, account: &dyn Signer, owner: &Pubkey ) -> TokenResult<T::Output>

Create and initialize a new token account.

source

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.

source

pub async fn get_account(&self, account: Pubkey) -> TokenResult<BaseAccount>

Retrieve a raw account

source

pub async fn get_mint_info(&self) -> TokenResult<StateWithExtensionsOwned<Mint>>

Retrive mint information.

source

pub async fn get_account_info( &self, account: &Pubkey ) -> TokenResult<StateWithExtensionsOwned<Account>>

Retrieve account information.

source

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.

source

pub async fn set_authority<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, new_authority: Option<&Pubkey>, authority_type: AuthorityType, signing_keypairs: &S ) -> TokenResult<T::Output>

Assign a new authority to the account.

source

pub async fn mint_to<S: Signers>( &self, destination: &Pubkey, authority: &Pubkey, amount: u64, signing_keypairs: &S ) -> TokenResult<T::Output>

Mint new tokens

source

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

source

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

source

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

source

pub async fn burn<S: Signers>( &self, source: &Pubkey, authority: &Pubkey, amount: u64, signing_keypairs: &S ) -> TokenResult<T::Output>

Burn tokens from account

source

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

source

pub async fn revoke<S: Signers>( &self, source: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>

Revoke a delegate

source

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

source

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

source

pub async fn freeze<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>

Freeze a token account

source

pub async fn thaw<S: Signers>( &self, account: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>

Thaw / unfreeze a token account

source

pub async fn wrap<S: Signers>( &self, account: &Pubkey, owner: &Pubkey, lamports: u64, signing_keypairs: &S ) -> TokenResult<T::Output>

Wrap lamports into native account

source

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

source

pub async fn sync_native(&self, account: &Pubkey) -> TokenResult<T::Output>

Sync native account lamports

source

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

source

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

source

pub async fn harvest_withheld_tokens_to_mint( &self, sources: &[&Pubkey] ) -> TokenResult<T::Output>

Harvest withheld tokens to mint

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub async fn update_interest_rate<S: Signers>( &self, authority: &Pubkey, new_rate: i16, signing_keypairs: &S ) -> TokenResult<T::Output>

Update interest rate

source

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

source

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

source

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

source

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

source

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

source

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.

source

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

source

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

source

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

source

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

source

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.

source

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

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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

source

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

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub async fn confidential_transfer_harvest_withheld_tokens_to_mint( &self, sources: &[&Pubkey] ) -> TokenResult<T::Output>

Harvest withheld confidential tokens to mint

source

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

source

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

source

pub async fn withdraw_excess_lamports<S: Signers>( &self, source: &Pubkey, destination: &Pubkey, authority: &Pubkey, signing_keypairs: &S ) -> TokenResult<T::Output>

source

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

source

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

source

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

source

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.

source

pub async fn token_metadata_update_authority<S: Signers>( &self, current_authority: &Pubkey, new_authority: Option<Pubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>

Update the token-metadata authority in a mint

source

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

source

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

source

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

source

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

source

pub async fn token_group_update_authority<S: Signers>( &self, current_authority: &Pubkey, new_authority: Option<Pubkey>, signing_keypairs: &S ) -> TokenResult<T::Output>

Update the token-group authority in a mint

source

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

source

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§

source§

impl<T> Debug for Token<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more