Expand description
§light-token-interface
Instruction data types for the light-token program.
| Module | Description |
|---|---|
instructions | Instruction structs for mint, transfer, wrap, unwrap |
state | Token account and mint state structs |
discriminator | Instruction discriminator constants |
hash_cache | Precomputed hashes for token account fields |
pool_derivation | SPL/T22 pool account PDA derivation |
token_2022_extensions | Token-2022 extension data types |
error | TokenInterfaceError variants |
Re-exports§
pub use crate::state::BASE_TOKEN_ACCOUNT_SIZE;pub use error::*;pub use pool_derivation::*;pub use token_2022_extensions::*;
Modules§
- discriminator
- Instruction discriminators for the compressed token program.
- error
- hash_
cache - instructions
- pool_
derivation - SPL interface PDA derivation utilities for Light Protocol.
- state
- token_
2022_ extensions
Constants§
- COMPRESSED_
MINT_ SEED - COMPRESSED_
ONLY_ EXTENSION_ SIZE - Size of CompressedOnly extension (16 bytes for two u64 fields: delegated_amount and withheld_transfer_fee)
- CPI_
AUTHORITY - EXTENSION_
METADATA - Extension metadata overhead: Vec length (4) - added when any extensions are present Note: The Option discriminator is the has_extensions bool in the base struct
- LIGHT_
TOKEN_ PROGRAM_ ID - MINT_
ACCOUNT_ SIZE - Size of a Token-2022 mint account
- MINT_
ADDRESS_ TREE - NATIVE_
MINT - POOL_
SEED - Pool PDA seeds
- RESTRICTED_
POOL_ SEED - TRANSFE
R2 - Instruction discriminator for Transfer2
- TRANSFER_
FEE_ ACCOUNT_ EXTENSION_ LEN - Size of TransferFeeAccountExtension: 1 discriminant + 8 withheld_amount
- TRANSFER_
HOOK_ ACCOUNT_ EXTENSION_ LEN - Size of TransferHookAccountExtension: 1 discriminant + 1 transferring