can someone please help me understand the difference between associated_token::mint and token::mint. I've seen both used interchangeably in anchor account contexts when setting constraints for token accounts.
For example:
...
nft_mint: Account<'info, Mint>,
#[account(
token::mint=nft_mint,
token::authority=signer
)]
nft_token_account: Account<'info, TokenAccount>,
Or
...
nft_mint: Account<'info, Mint>,
#[account(
associated_token::mint=nft_mint,
associated_token::authority=signer
)]
nft_token_account: Account<'info, TokenAccount>,
I've also seen this used too
...
nft_mint: Account<'info, Mint>,
#[account(
constraint=nft_token_account.owner == signer.key(),
constraint=nft_token_account.mint == nft_mint.key()
)]
nft_token_account: Box<Account<'info, TokenAccount>>,