nanotoken needs a close_account instruction.
Recommended api
- Accounts:
[account_to_close, destination_account, owner].
- Data:
[discriminator]
Functionality:
After checking owner is signer, and that account 1 and account 2 share the same mint index (and doing all other account validation), transfer nonzero balance to destination account, and close the account (transfer lamports to owner, set data len to 0, reassign to system program)
nanotoken needs a
close_accountinstruction.Recommended api
[account_to_close, destination_account, owner].[discriminator]Functionality:
After checking owner is signer, and that account 1 and account 2 share the same mint index (and doing all other account validation), transfer nonzero balance to destination account, and close the account (transfer lamports to owner, set data len to 0, reassign to system program)