Concepts
Tokens and Token-2022
Which accounts Pango understands, and what it does with the others.
A watched account is read in one of two ways, decided by the program that owns it.
| Owner program | How it is read |
|---|---|
| System program | Plain account: lamports and owner program. Your wallet is always one. |
| Token program or Token-2022, 165 bytes or more | Token account: also the amount, the owner, the delegate, the delegated amount and the close authority. |
| Token program, anything else (a mint, a multisig) | Refused at Begin (Unsupported): it is not an account that holds your value. |
| Any other program | Plain account: lamports and owner program. |
Token-2022
The base layout is the same, so amounts, owner, delegate and close authority are checked. Extensions (a permanent delegate, a transfer hook, a transfer fee, a confidential balance) are not interpreted: a permanent delegate is set when the mint is created, so it is not something a transaction you sign can add. A transfer fee shows up as a smaller amount: declare it in the check.
Wrapped SOL
A wrapped SOL account is a token account, so its amount is checked, and its lamports are checked too (they are the same money).