Expand description
Compressed Token (CToken) program instruction decoder.
This module provides a macro-derived decoder for the Light Token (CToken) program, which uses non-sequential 1-byte discriminators for Pinocchio instructions.
Note: This decoder only handles Pinocchio (1-byte) instructions. Anchor (8-byte) instructions are not decoded by this macro-derived decoder.
§Instruction Data Formats
Most CToken instructions have optional max_top_up suffix:
- Transfer, MintTo, Burn: 8 bytes (amount) or 10 bytes (amount + max_top_up)
- TransferChecked, MintToChecked, BurnChecked: 9 bytes (amount + decimals) or 11 bytes (+ max_top_up)
- Approve: 8 bytes (amount) or 10 bytes (amount + max_top_up)
- Revoke: 0 bytes or 2 bytes (max_top_up)
Structs§
- CToken
Instruction Decoder - Generated InstructionDecoder implementation
Enums§
- CToken
Instruction - Compressed Token (CToken) program instructions.
Functions§
- format_
mint_ action - Format MintAction instruction data with resolved pubkeys.
- format_
transfer2 - Format Transfer2 instruction data with resolved pubkeys.
- resolve_
mint_ action_ account_ names - Resolve MintAction account names dynamically based on instruction data.
- resolve_
transfer2_ account_ names - Resolve Transfer2 account names dynamically based on instruction data.