pub struct RecoverNested<'a> {
pub account: &'a AccountView,
pub mint: &'a AccountView,
pub destination_account: &'a AccountView,
pub owner_account: &'a AccountView,
pub owner_mint: &'a AccountView,
pub wallet: &'a AccountView,
pub token_program: &'a AccountView,
}Expand description
Transfers from and closes a nested associated token account: an associated token account owned by an associated token account.
The tokens are moved from the nested associated token account to the wallet’s associated token account, and the nested account lamports are moved to the wallet.
Note: Nested token accounts are an anti-pattern, and almost always created unintentionally, so this instruction should only be used to recover from errors
§Accounts:
[WRITE]Nested associated token account, must be owned by3[]Token mint for the nested associated token account[WRITE]Wallet’s associated token account[]Owner associated token account address, must be owned by5[]Token mint for the owner associated token account[WRITE, SIGNER]Wallet address for the owner associated token account[]SPL Token program
Fields§
§account: &'a AccountViewNested associated token account, must be owned by owner_associated_token_account
mint: &'a AccountViewToken mint for the nested associated token account
destination_account: &'a AccountViewWallet’s associated token account
owner_account: &'a AccountViewOwner associated token account address, must be owned by wallet_account
owner_mint: &'a AccountViewToken mint for the owner associated token account
wallet: &'a AccountViewWallet address for the owner associated token account
token_program: &'a AccountViewSPL Token program